/* VARIABLES Y BASE*/
:root {
    --primary-color: #00625d;
    --text-color: #333333;
    --bg-light: #f4f4f4;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    margin: 0;
    padding-top: 70px; /* Espacio para el header fijo */
    line-height: 1.6;
    overflow-x: hidden !important; 
    width: 100%;
}

*, *::before, *::after {
    box-sizing: border-box;
}

h1, h2, h3 { font-family: var(--font-heading); text-transform: uppercase; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* NAVBAR (ENCABEZADO)*/
#atIdViewHeader {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
}

.navbar {
    background-color: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    width: 100%;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px; /* Para usar más pantalla */
    margin: 0 auto;
    padding: 10px 40px; /* Más padding a los lados */
    box-sizing: border-box;
}

/* Logo */
.navbar-brand { flex-shrink: 0 !important; }
.navbar-brand a { display: flex; align-items: center; gap: 10px; font-weight: bold; font-size: 1.5rem; }
.navbar-logo { height: 45px; transition: filter 0.4s ease; }
.QTKDff { transition: color 0.4s ease; }

/* Estado Inicial (Arriba) - Letras y logo blanco */
.navbar:not(.scrolled) .nav-link,
.navbar:not(.scrolled) .QTKDff { color: #ffffff; }
.navbar:not(.scrolled) .navbar-logo,
.navbar:not(.scrolled) svg { filter: brightness(0) invert(1); }

/* Estado Scrolleds - Letras y logo normal, fondo blanco */
.navbar.scrolled {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.navbar.scrolled .nav-link,
.navbar.scrolled .QTKDff { color: #333333; }
.navbar.scrolled .navbar-logo,
.navbar.scrolled svg { filter: none; }

/* Buscador y Botón Hamburguesa */
.search-wrapper { cursor: pointer; flex-shrink: 0 !important; }
#menu-toggle { display: none; cursor: pointer; color: #ffffff; padding-right: 15px;}
.navbar.scrolled #menu-toggle { color: #333333; }

/* MENÚ PRINCIPAL Y EFECTO HOVER ANIMADO */
.nav-menu {
    display: flex;
    align-items: center;
    flex-grow: 1; 
    justify-content: center; 
}

.nav-list {
    display: flex;
    gap: 35px; 
    align-items: center;
    flex-wrap: nowrap !important; 
    white-space: nowrap !important;
}

/* Estilo de los enlaces limpios */
.nav-link { 
    font-weight: 600 !important; 
    font-size: 15px !important; 
    font-family: 'Open Sans', sans-serif !important; 
    transition: color 0.3s; 
    padding: 5px 0; 
    position: relative;
    text-decoration: none;
}

/* Base de la línea mágica */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; /* Oculta por defecto */
    height: 3px;
    background-color: transparent;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

/* --- ESTADO: PÁGINA ACTUAL (Siempre visible) --- */
.navbar:not(.scrolled) .nav-indicate::after {
    width: calc(100% + 10px);
    background-color: #ffffff;
}
.navbar.scrolled .nav-indicate::after {
    width: calc(100% + 10px);
    background-color: var(--primary-color);
}

/* --- ESTADO: HOVER (Al pasar el mouse) --- */
.navbar:not(.scrolled) .nav-link:hover::after {
    width: calc(100% + 10px);
    background-color: #ffffff;
}
.navbar.scrolled .nav-link:hover::after {
    width: calc(100% + 10px);
    background-color: var(--primary-color);
}

/* Cambio de color de la letra al hacer Hover (barra blanca) */
.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-indicate {
    color: var(--primary-color) !important;
}

/* SUBMENÚ DESPLEGABLE (MORE) */
#more-btn {
    display: none;
    position: relative;
}

.dropdown-box {
    position: absolute;
    top: 100%; 
    right: 0;
    left: auto;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border-radius: 4px;
    min-width: 200px;
    padding: 10px 0;
    z-index: 9999;
}
#more-btn:hover .dropdown-box { display: block !important; }
.dropdown-box .nav-link { color: #333333 !important; display: block; padding: 10px 20px; }
.dropdown-box .nav-link:hover { background-color: rgba(0, 98, 93, 0.08); color: var(--primary-color) !important; }
/* Ocultar línea animada dentro del menú desplegable */
.dropdown-box .nav-link::after { display: none !important; }

/* PORTADA (HERO BANNER) */
.hero-banner {
    background-image: url('../assets/images/BACKGROUND.webp');
    background-size: cover;
    background-position: center;
    height: 345px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: -70px;
}
.hero-banner::before  {
    content: ""; position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}
.hero-banner .section-title {
    font-family: 'Oswald', sans-serif !important;
    font-size: 4.8rem !important; /* Tamaño gigante */
    text-transform: uppercase !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    text-shadow: 2px 4px 10px rgba(0,0,0,0.6) !important;
    max-width: 1000px;
    margin: 0 auto;
    color: #ffffff !important;
    padding: 0 20px;
}

/* LÍNEA VERDE TÍTULO PORTADA */
.titulo-portada {
    position: relative;
    padding-bottom: 25px !important;
}
.titulo-portada::after {
    content: '';
    position: absolute;
    bottom: 0; 
    left: 50%;
    transform: translateX(-50%);
    width: 1050px; 
    height: 12px; 
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* SECCIONES Y CONTENIDO */
/* Párrafos base */
.yaqOZd p {
    font-size: 1.1rem !important;
    line-height: 1.5 !important;
    color: #444444 !important;
}

/* Franjas Verdes */
.lQAHbd {
    background-color: var(--primary-color);
    padding: 15px 0;
    margin: 40px 1 20px 0;
}
.lQAHbd .jgG6ef { 
    color: #ffffff; 
    font-size: 30px !important; 
    font-family: 'Oswald', sans-serif !important;
    text-transform: uppercase !important;
    font-weight: 400 !important;
    letter-spacing: 1px;
}

/* Títulos Misión/Visión con línea ajustable */
.titulo-subrayado {
    color: #00625d !important;
    text-align: center;
    position: relative; 
    padding-bottom: 20px !important; 
    margin-bottom: 20px;
    font-family: var(--font-body);
    font-weight: 700;
}
.titulo-subrayado::after {
    content: '';
    position: absolute;
    bottom: calc(100% - -30px); 
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% + 52px); 
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Contenedor Misión/Visión */
.mision-vision-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}
.mv-columna {
    flex: 1;
}

/* Grid para imágenes/tarjetas */
.grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}
.card {
    flex: 1 1 180px; 
    max-width: 220px;
    background-color: #ffffff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-5px); }
.card-image-wrapper {
    width: 100%; 
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}
.card-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
/* Para cards compactas*/
.card-compacta {
    flex: 1 1 187px !important;  
    max-width: 240px !important; 
    padding: 8px !important;   
}

.card-compacta .card-image-wrapper {
    height: 175px !important;    /* Reduce la altura de la caja del icono */
    margin-bottom: 8px !important;
}

.card-compacta p {
    font-size: 0.80rem !important;
    line-height: 1.2 !important;
}

/* TARJETAS DE DOCUMENTOS PDM-OT */
.card-documento {
    flex: 1 1 250px !important;  
    max-width: 290px !important; 
}

.map-card{
    flex: 1 1 180px; 
    max-width: 820px;
    background-color: #ffffff;
    padding: 5px;
    display: flex;
    flex-direction:column-reverse;
    align-items: center;
    transition: transform 0.3s ease;
}

/*PIE DE PÁGINA */
.site-footer {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 40px 20px !important;
    margin-top: 40px !important;
}

.footer-container {
    display: flex;
    align-items: center; 
    justify-content: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 100px; 
}

.footer-logo { flex-shrink: 0; }
.footer-logo img {
    height: auto !important;
    max-width: 180px !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)) !important;
    display: block;
}

.footer-info {
    flex-grow: 1;
    text-align: left;
}
.footer-info p {
    margin: 5px 0 !important;
    color: #ffffff !important;
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
}
.footer-info a {
    color: #ffffff !important;
    text-decoration: underline !important;
    font-size: 1.05rem !important;
    transition: opacity 0.3s ease;
}
.footer-info a:hover { opacity: 0.8; }

/* Estilos Específicos: Fases PDM-OT*/

.fase-row {
    display: flex;
    flex-wrap: nowrap; 
    align-items: center;
    max-width: 1000px; 
    margin: 0 auto 40px auto;
    gap: 40px; 
}

.fase-img {
    width: 45%; 
    flex-shrink: 0; 
}

.fase-img img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: block;
}

.fase-text {
    width: 55%;
}

.fase-text h3 {
    margin-top: 0; 
}

/* Vista Responsive PDM-OT */
@media (max-width: 768px) {
    .fase-row {
        flex-wrap: wrap;
        gap: 20px;
    }
    .fase-img, .fase-text {
        width: 100%; 
    }
}

/* ESTILOS ESPECÍFICOS: OTROS RECURSOS */
.two-columns-list {
    list-style-type: none; 
    padding: 0; 
    margin: 0; 
    text-align: left; 
    font-family: 'Open Sans', Arial, sans-serif; 
    font-size: 11pt; 
    font-weight: 300; 
    line-height: 1.8;
    column-count: 2;
    column-gap: 40px;
}
.two-columns-list li { margin-bottom: 8px; }
.two-columns-list a { color: #333; text-decoration: underline; transition: color 0.2s; }
.two-columns-list a:hover { color: #00625d; }

@media (max-width: 768px) {
    .two-columns-list { column-count: 1; } 
}

/* Vista Responsive para MÓVILES Y PANTALLAS PEQUEÑAS */
@media (max-width: 900px) {
    /* REORDENAR NAVBAR: Menu (Izq), Logo (Centro), Lupa (Der) */
    .navbar-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 20px !important;
    }

    #menu-toggle { 
        order: 1 !important; 
        display: flex !important; 
        flex: 1;
        justify-content: flex-start;
        padding-right: 0 !important; 
    }
    
    .navbar-brand { 
        order: 2 !important; 
        flex: 2;
        display: flex;
        justify-content: center;
        margin: 0 auto !important; 
    }
    
    .search-wrapper { 
        order: 3 !important; 
        flex: 1; 
        display: flex;
        justify-content: flex-end;
        margin-right: 0 !important; 
    }

/* LÍNEAS VERDES (Título principal como bloque físico) */
    .titulo-portada {
        position: relative !important;
    }
    
    .titulo-portada::after {
        content: '';
        position: absolute !important;
        bottom: 0 !important;
        
        /* CENTRADO ABSOLUTO */
        left: 50% !important; 
        transform: translateX(-50%) !important;

        width: 250px !important;
        height: 4px !important;
        background-color: var(--primary-color) !important;
        border-radius: 2px;
    }
    
    .titulo-subrayado {
        padding-bottom: 0 !important;
        padding-top: 0 !important;
        border: none !important;
    }

    .titulo-subrayado::after {
        display: none !important; /* Apagar líneas individuales */
    }

    /* Evitar que el texto se corte */
    .hero-banner .section-title { 
        font-size: 2.2rem !important; 
        
        /* Desglosamos los márgenes para no matar el espacio de la línea */
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 0 !important;
        
        /* ESPACIO CORRECTO PARA SEPARAR LA LÍNEA*/
        padding-bottom: 35px !important; 
    }

    .yaqOZd {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .yaqOZd p, .yaqOZd ul li {
        text-align: left !important; 
    }
    

    /* MENÚ DESPLEGABLE MÓVIL */
    .nav-menu { display: none; }
    .nav-menu.menu-abierto {
        display: block;
        position: absolute;
        top: 100%; 
        left: 0; 
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 0;
        z-index: 999;
    }
    .nav-list { 
        flex-direction: column !important; 
        flex-wrap: wrap !important;
        white-space: normal !important;
        gap: 0 !important;
    }
    .nav-link { 
        color: #333333 !important; 
        display: block; 
        padding: 15px 20px !important; 
        border-bottom: 1px solid #eeeeee; 
        width: 100%;
        text-align: left;
    }
    
    /* Apagar botones de escritorio */
    #more-btn { display: none !important; }
    .nav-link::after { display: none !important; }
    .navbar.scrolled #menu-toggle svg { stroke: #333333; }

    /* COLUMNAS (una debajo de la otra) */
    .mision-vision-wrapper {
        flex-direction: column !important;
        gap: 40px !important;
        padding: 30px 20px 0 20px !important; 
        margin: 20px auto !important;
        position: relative !important; 
    }
    
    .mision-vision-wrapper::before {
        content: '';
        position: absolute;
        top: 0; 
        left: 50%;
        transform: translateX(-50%);
        width: 80% !important; 
        max-width: 300px !important;
        height: 4px !important;
        background-color: var(--primary-color) !important;
        border-radius: 2px;
    }

    .mv-columna {
        width: 100% !important; 
        display: block !important;
    }
    
    /* Excepción para centrar siempre el texto de las tarjetas */
    .card p {
        text-align: center !important;
    }

    .card p {
        font-size: 0.85rem !important; 
        line-height: 1.4 !important;   
    }
    /*Títulos dentro de las cards */
    .card h3 {
        font-size: 1.2rem !important;
    }

    /* 6. FOOTER MÓVIL */
    .footer-container {
        flex-direction: column !important;
        text-align: center !important;
        gap: 20px !important;
    }
    .footer-info {
        text-align: center !important;
    }
    .footer-logo img {
        margin: 0 auto !important;
    }
}