/* ===========================
   ESTILOS GENERALES
=========================== */
body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f7f7f7;
    margin: 0;
    padding: 0;
    color: #333;
    overflow-x: hidden;
}

/* ===========================
   NAVBAR
=========================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 1px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 10;
    background: linear-gradient(to right, #13253d, #00548b, #72c4bd, #e0eed9);
}

.logo img {
    height: 70px;
    display: block;
}

.menu {
    display: flex;
    gap: 50px;
}

.menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    padding: 20px 20px;
    transition: 0.3s;
}

/* ===========================
   DROPDOWN
=========================== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    color: #ffffff;
    font-weight: bold;
    padding: 20px 20px;
    display: block;
    transition: color 0.3s ease;
}

.dropdown-content {
    display: none;
    position: absolute;
    min-width: 200px;
    top: 60px;
    left: 0;
    background: linear-gradient(135deg, #0a3d62, #1e8bc3, #72c4bd);
    border-radius: 12px;
    box-shadow: 0 12px 25px rgba(0,0,0,0.25);
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.35s ease;
    z-index: 999;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: #ffffff;
    padding: 14px 18px;
    text-decoration: none;
    display: block;
    font-weight: 600;
    transition: background 0.3s ease, padding-left 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background: rgba(255,255,255,0.15);
    padding-left: 24px;
}

/* ===========================
   REGRESAR
=========================== */
.regresar {
    position: fixed;
    bottom: 25px;
    right: 15px;

    padding: 10px 18px;
    background-color: #005195;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 900;
}

.regresar:hover {
    background-color: #003d6e;
}


/* ===========================
   HERO
=========================== */
.colectores-hero {
    width: 100%;
    padding: 120px 20px 80px;
    background: linear-gradient(to right, #0a3d62, #1e8bc3);
    text-align: center;
    color: white;
}

.colectores-hero h1 {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.colectores-hero p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* ===========================
   MÓDULOS
=========================== */
.colectores-modulos {
    width: 85%;
    margin: 60px auto;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.modulo {
    display: flex;
    gap: 40px;
    align-items: center;
}

.modulo.reverse {
    flex-direction: row-reverse;
}

/* IMAGEN */
.modulo-img {
    flex: 1;
    background: #eef5f5;
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);

    display: flex;
    justify-content: center;
    align-items: center;

    /* elimina el alto fijo */
    height: auto;
}

.modulo-img img {
    width: 50%;
    max-width: 400px;
}


/* INFO */
.modulo-info {
    flex: 1;
    padding: 20px 10px;
}

.modulo-info h2 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #0a3d62;
    margin-bottom: 5px;
}

.modulo-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #00b3b3;
    margin-bottom: 15px;
}

.modulo-info p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #333;
    text-align: justify;
}

/* ===========================
   MANTENIMIENTO
=========================== */
.colectores-mantenimiento {
    width: 85%;
    margin: 40px auto 100px;
    text-align: center;
}

.colectores-mantenimiento h2 {
    font-size: 2.9rem;
    font-weight: 900;
    -webkit-background-clip: text;
    color: #005195;
    letter-spacing: 1px;
    position: relative;

 
    padding-bottom: 0;      /* sin espacio extra */
    text-shadow: 3px 5px 0 rgba(0,82,149,0.185);

    display: block;
    width: fit-content;
    margin: 0 auto 10px;    /* centrado real */
}

.colectores-mantenimiento h2::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 65px;           /* sube la línea para que quede pegada */
    width: 70%;
    height: 5px;            /* línea delgada = más pegada visualmente */
    background: #72c4bd;
    border-radius: 4px;
}


.mantenimiento-grid {
    display: flex;
    gap: 30px;
}

.mantenimiento-grid .item {
    flex: 1;
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    border-top: 6px solid #00b3b3;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.mantenimiento-grid h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #005195;
    margin-bottom: 10px;
}

.mantenimiento-grid p {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #000000;
    text-align: justify;
}

/* ===========================
   MENÚ HAMBURGUESA
=========================== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 9999;
    margin-right: 15px;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: #154377; /* azul visible */
    border-radius: 3px;
    transition: 0.3s;
}

/* MENÚ MÓVIL */
.menu-mobile {
    display: none;
    position: absolute;
    top: 80px;
    right: 0;
    width: 100%;
    background: linear-gradient(to right, #13253d, #00548b, #72c4bd);
    padding: 25px 0;
    flex-direction: column;
    text-align: center;
    gap: 20px;
    z-index: 999;
}

.menu-mobile a {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    padding: 10px 0;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 850px) {

    /* Oculta menú normal */
    .menu {
        display: none !important;
    }

    /* Muestra hamburguesa */
    .hamburger {
        display: flex !important;
    }

    /* Menú móvil cuando está abierto */
    .menu-mobile.show {
        display: flex !important;
    }

    /* Ajustes de módulos */
    .modulo {
        flex-direction: column;
        text-align: center;
    }

    .modulo.reverse {
        flex-direction: column;
    }

    .mantenimiento-grid {
        flex-direction: column;
    }

    /* Corrección overflow */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    .menu-mobile {
        left: 0;
        right: 0;
    }
}

/* ==========================================
   CORRECCIÓN GLOBAL DE OVERFLOW HORIZONTAL
========================================== */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
}

/* Evita que los módulos se salgan */
.modulo,
.modulo-img,
.modulo-info {
    max-width: 100% !important;
}

/* Evita que las imágenes empujen el layout */
.modulo-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* Evita que el menú móvil se desplace */
.menu-mobile {
    left: 0 !important;
    right: 0 !important;
}

/* Evita que cualquier contenedor rompa el ancho */
* {
    box-sizing: border-box;
    max-width: 100%;
}

/* TÍTULO MANTENIMIENTO — VERSIÓN MÓVIL */
@media (max-width: 600px) {

    .colectores-mantenimiento {
        width: 90%;
        margin: 40px auto 70px;
    }

    .colectores-mantenimiento h2 {
        font-size: 2rem;
        text-align: center;
        margin: 0 auto 18px;
        padding-bottom: 8px;
    }

    .colectores-mantenimiento h2::after {
        bottom: 0;          /* línea pegada al texto */
        width: 80%;
        height: 4px;
    }

    .mantenimiento-grid {
        flex-direction: column;
        gap: 20px;
    }

    .mantenimiento-grid .item {
        padding: 20px;
    }

    .mantenimiento-grid h3 {
        font-size: 1.3rem;
    }

    .mantenimiento-grid p {
        font-size: 1rem;
    }
}
