/* Reset básico */
* {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

/* Variables CSS para colores principales */
:root {
    --primary-orange: #ff6600; /* Un tono de naranja principal */
    --text-color-dark: #333; /* Color oscuro para el texto principal */
    --text-color-medium: #666; /* Nuevo: Color medio para texto secundario (usado en el subtítulo de la sección "Acerca de") */
    --button-bg-color: #FFA500; /* Un naranja para el fondo del botón */
    --primary-blue: #003366;
    --background-blue-shape: #2b5585; /* Nuevo: Color específico de la forma azul de la imagen original "Acerca de" */
    --page-background: #f0f0f0; /* Color de fondo general de la página */
    }

/* Estilos generales del cuerpo */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif, 'Poppins';
    overflow-x: hidden;
    overflow-y: scroll; 
    min-height: 100vh;
    display: flex;
    flex-direction: column; 
    background-color: var(--page-background); 
    position: relative;
}

/* --- CAMBIOS CLAVE PARA EL OVERLAY GRIS OSCURO --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

body.overlay-active::before {
    opacity: 1;
    visibility: visible;
}

body.modal-open {
    overflow: hidden;
}

/*----------------------------- NAV BAR ----------------------------------*/
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 10000; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border-bottom: 2px solid #ccc;
    height: 70px;
    transition: background-color 0.3s ease, border-bottom 0.3s ease;
}

.logo-container {
    flex: 0 0 auto;
}

.overlay-image { 
    max-width: 150px;
    height: auto;
    cursor: pointer;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: var(--primary-orange);
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
}

.nav-links a.active {
    color: #ff6600;
}

.nav-links a:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.2);
    color: #003366;
}
.nav-links li.contacto a {
    color: white;
    padding: 8px 15px;
    transition: color 0.3s ease;
}

.navbar.scrolled {
    background-color: #003366;
    border-bottom-color: #001a33;
}

.nav-links li.contacto a:hover {
    background-color: #e67e00;
    color: white;
    transform: none;
}

.contacto {
    background-color: var(--primary-blue);
    border-radius: 25px;
    transition: background-color 0.3s ease;
}

.contacto a {
    color: white;
    padding: 8px 15px;
}

.contacto a:hover {
    background-color: #e67e00;
    color: white;
    transform: none;
}

main {
    margin-top: 70px; /* Asegura que el contenido no se oculte detrás de la navbar */
    background-color: var(--page-background);
}

/* Estilos básicos para el contenedor del desplegable */
.has-dropdown {
    position: relative;
    z-index: 1001; /* Más alto que el overlay, pero por debajo de la navbar */
}

/* --- ANIMACIÓN PARA EL REBOTE --- */
@keyframes bounceInDownFromTop {
    0% {
        opacity: 0;
        transform: translateY(-80px) scale(0.7); /* Empieza 80px arriba, más pequeño (más atrás) */
    }
    60% {
        opacity: 1;
        transform: translateY(10px) scale(1.05); /* Baja más allá del final y se agranda un poco (primer rebote) */
    }
    75% {
        transform: translateY(-5px) scale(0.98); /* Sube ligeramente y se encoge un poco */
    }
    90% {
        transform: translateY(2px) scale(1.01); /* Baja de nuevo y se agranda casi al final */
    }
    100% {
        transform: translateY(0) scale(1); /* Posición y tamaño final */
    }
}


.dropdown-menu {
    display: block;
    visibility: hidden;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 20px 48px 46px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
    top: 100%; /* Posición inicial relativa al padre */
    right: 0;
    left: auto;
    opacity: 0;
    transition: background-color 0.3s ease-in-out;
    border-radius: 5px;
}

.dropdown-menu.show {
    visibility: visible;
    animation: bounceInDownFromTop 0.8s ease forwards;
}

.dropdown-menu.scrolled {
    background-color: var(--primary-blue);
}


/* Estilo para los enlaces del menú desplegable */
.dropdown-menu li a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.dropdown-menu li a:hover {
    background-color: rgba(0,0,0,0.2);
}

.dropdown-menu.scrolled li a {
    color: white;
}

.has-dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s; /* Elimina el retraso al mostrar */
}

.dropdown-arrow {
    margin-left: 5px;
    font-size: 0.8em;
}

/* Estilos para el botón de hamburguesa */
.hamburger-button {
    display: none; /* Ocultar por defecto en pantallas grandes */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
}

.hamburger-icon {
    width: 35px; /* Ajusta el tamaño de tu imagen */
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* ----------------- Mobile hamburger panel ----------------- */
/* Keep desktop behavior, override for small screens */
@media (max-width: 992px) {
    .hamburger-button { display: block; }
    .overlay-image { max-width: 120px; }
}

@media (max-width: 768px) {
    .navbar {
        justify-content: space-between;
        align-items: center;
        height: 60px;
        padding: 10px 15px;
    }

    /* Hide desktop horizontal nav, use off-canvas panel */
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 45px; /* Alinea el menú debajo del navbar */
        left: 0;
        background-color: var(--primary-blue, #003366);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 10000;
        padding: 0;
    }

    .nav-links.active {
        display: flex  ;
    }

    .nav-links li {
        margin: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links a {
        color: white; /* Color de los enlaces en el menú móvil */
        text-align: left;
        padding: 15px 20px;
        font-size: 16px;
    }
    

    /* ensure hamburger icon visible */
    .hamburger-button {
        display: block;
    }

}

/* Small phones: slightly taller hero spacing so off-canvas doesn't overlap controls */
@media (max-width: 420px) {
    .nav-links { width: 90%; }
}

.nav-links li.contacto a {
    color: white;
    padding: 8px 15px;
    transition: color 0.3s ease;
}

.navbar.scrolled {
    background-color: #003366;
    border-bottom-color: #001a33;
}

.nav-links li.contacto a:hover {
    background-color: #e67e00;
    color: white;
    transform: none;
}

.contacto {
    background-color: var(--primary-blue);
    border-radius: 25px;
    transition: background-color 0.3s ease;
}

.contacto a {
    color: white;
    padding: 8px 15px;
}

/* Force hamburger visibility and positioning on small screens */
@media (max-width: 992px) {
    .hamburger-button {
        display: block !important;
        position: absolute;
        right: 12px;
        top: 12px;
        z-index: 12002; /* above navbar and panel */
        background: transparent;
        padding: 6px;
    }

    .hamburger-icon {
        width: 34px !important;
        height: auto !important;
        display: block !important;
    }

    /* Ensure navbar has relative positioning so absolute button anchors correctly */
    .navbar { position: fixed; }
}

.contacto a:hover {
    background-color: #e67e00;
    color: white;
    transform: none;
}

main {
    margin-top: 70px; 
    background-color: var(--page-background);
}

/* Estilos básicos para el contenedor del desplegable */
.has-dropdown {
    position: relative;
    z-index: 1001; 
}

/* --- ANIMACIÓN PARA EL REBOTE --- */
@keyframes bounceInDownFromTop {
    0% {
        opacity: 0;
        transform: translateY(-80px) scale(0.7); /* Empieza 80px arriba, más pequeño (más atrás) */
    }
    60% {
        opacity: 1;
        transform: translateY(10px) scale(1.05); /* Baja más allá del final y se agranda un poco (primer rebote) */
    }
    75% {
        transform: translateY(-5px) scale(0.98); /* Sube ligeramente y se encoge un poco */
    }
    90% {
        transform: translateY(2px) scale(1.01); /* Baja de nuevo y se agranda casi al final */
    }
    100% {
        transform: translateY(0) scale(1); /* Posición y tamaño final */
    }
}


.dropdown-menu {
    display: block;
    visibility: hidden;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 20px 48px 46px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
    top: 100%; 
    right: 0;
    left: auto;
    opacity: 0;
    transition: background-color 0.3s ease-in-out;
    border-radius: 5px;
}

.dropdown-menu.show {
    visibility: visible;
    animation: bounceInDownFromTop 0.8s ease forwards;
}

.dropdown-menu.scrolled {
    background-color: var(--primary-blue);
}


/* Estilo para los enlaces del menú desplegable */
.dropdown-menu li a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.dropdown-menu li a:hover {
    background-color: rgba(0,0,0,0.2);
}

.dropdown-menu.scrolled li a {
    color: white;
}

.has-dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.dropdown-arrow {
    margin-left: 5px;
    font-size: 0.8em;
}

/* Estilos para el botón de hamburguesa */
.hamburger-button {
    display: none; /* Ocultar por defecto en pantallas grandes */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
}

.hamburger-icon {
    width: 35px; /* Ajusta el tamaño de tu imagen */
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}


/* --- Estilos para la sección de título "Aviso de Privacidad" --- */
.privacy-hero {
    padding: 40px;
    margin-top: 70px; 
    width: 100%;
    box-sizing: border-box;
    text-align: center; 
}

.privacy-hero-content h1 {
    color: #07477D;
    font-size: 42px;
    font-family: 'Poppins', sans-serif; 
    font-weight: 700;
    line-height: 1.1; 
    word-wrap: break-word;
    margin: 0;
}

/* --- Estilos para la sección del eslogan/frase introductoria --- */
.privacy-tagline {
    padding: 40px;
    width: 100%;
    box-sizing: border-box;
    text-align: center; 
}

.privacy-tagline-content p {
    color: #424242;
    font-size: 32px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.1; 
    word-wrap: break-word;
    margin: 0 auto; 
    max-width: 800px;
}

/* --- Estilos para la sección principal del Aviso de Privacidad --- */
.privacy-policy-section {
    padding: 40px;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
}

.privacy-policy-content {
    max-width: 960px; 
    margin: 0 auto; 
}

.privacy-policy-content p,
.privacy-policy-content ul li {
    color: black;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.4;
    word-wrap: break-word;
    margin-bottom: 1em;
}

.privacy-policy-content h2 {
    color: black;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin-top: 2em;
    margin-bottom: 1em;
}

.privacy-policy-content h3 {
    color: black;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 500;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.privacy-policy-content ul {
    margin-bottom: 1em;
    padding-left: 20px;
}

.privacy-policy-content ul li {
    margin-bottom: 0.5em;
}

.privacy-policy-content a {
    color: #007bff;
    text-decoration: underline;
}


/*----------------------------- PIE DE PÁGINA ----------------------------------*/
footer {
    background-color: var(--primary-blue); 
    color: #ffffff;
    padding: 20px;
    text-align: center;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
    padding: 0 20px;
}

/* Define las columnas del pie de página */
.footer-content .logo,
.footer-content .contact-info,
.footer-content .quick-links {
    flex: 1;
    min-width: 280px;
    max-width: 33%;
    text-align: left;
    padding: 0 10px;
}

.footer-content .logo p {
    font-size: 0.9em;
    line-height: 1.4;
    margin-top: 10px;
}

.contact-info p {
    margin-bottom: 15px; 
    font-size: 1em;
    line-height: 1.1em; 
}

.contact-info p strong {
    font-size: 1.2em; 
    color: white; 
    display: block;
    margin-bottom: 2px; 
}

.contact-info {
    padding-top: 10px;
    padding-bottom: 10px; 
}

/* --- CAMBIOS AQUÍ para Enlaces Rápidos --- */
.quick-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px; 
}

.quick-links p { 
    width: 100%; 
    margin-bottom: 10px;
    font-weight: bold; 
    text-align: left;
}

.quick-links a {
    display: inline-block;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 2px 5px; 
    border-radius: 3px;
}

.quick-links a:hover {
    color: var(--primary-orange);
}
/* --- FIN CAMBIOS para Enlaces Rápidos --- */


.sco {
    margin-top: 10px;
    display: flex;
    list-style: none;
    padding: 0;
}

.sco li {
    margin-right: 15px;
}

.sco li a {
    color: #ccc;
    font-size: 2em;
    transition: color 0.3s ease;
}

.sco li a:hover {
    color: var(--primary-orange); 
}


/* Estilos para el texto de copyright del footer */
.footer-copyright-text {
    margin-top: 20px;
    font-size: 0.9em; 
    color: #ffffff;
}

/* Estilos para los enlaces dentro del texto de copyright */
.footer-copyright-text a {
    color: #ffffff; 
    text-decoration: none; 
    transition: color 0.3s ease; 
}

/* Estilo cuando el mouse pasa por encima del enlace */
.footer-copyright-text a:hover {
    color: var(--primary-orange, #FF6600);
}

footer {
    background-color: #003366;
    color: #ffffff;
    padding: 20px;
    text-align: center;
}

/* Footer responsive: apilar columnas y ajustar tamaños en móvil */
@media (max-width: 768px) {
    footer {
        padding: 16px 12px;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 0 8px;
    }

    .footer-content .logo,
    .footer-content .contact-info,
    .footer-content .quick-links {
        max-width: 100%;
        width: 100%;
        padding: 0;
        text-align: center;
    }

    .footer-content .logo img {
        width: 140px;
        height: auto;
        margin: 0 auto 8px auto;
        display: block;
    }

    .contact-info p,
    .quick-links a {
        font-size: 0.95em;
    }

    .quick-links {
        flex-direction: column;
        gap: 6px;
        align-items: center;
    }

    .sco {
        justify-content: center;
        gap: 8px;
    }

    .footer-copyright-text {
        text-align: center;
        font-size: 0.85em;
        margin-top: 12px;
    }
}

@media (max-width: 420px) {
    .footer-content .logo img { width: 120px; }
    .contact-info p, .quick-links a { font-size: 0.9em; }
}
/* Estilo para la línea divisoria del footer */
footer > div:nth-of-type(2) {
    border-bottom: 1px solid #ffffff;
    margin-top: 20px;
    width: 70%;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Cambios SOLO para vista teléfono (<=480px) ===== */
@media (max-width: 480px) {
    /* Mostrar botón hamburguesa y posicionarlo de forma fija dentro del header */
    .hamburger-button {
        display: block !important;
        position: absolute !important;
        right: 12px !important;
        top: 12px !important;
        z-index: 13000 !important;
        background: transparent !important;
        padding: 6px !important;
    }

    .hamburger-icon {
        width: 34px !important;
        height: auto !important;
        display: block !important;
    }

    /* Panel de navegación full-width debajo de la navbar, exclusivo para teléfonos */
    .nav-links {
        display: none !important;
        flex-direction: column !important;
        width: 100% !important;
        position: fixed !important;
        top: 60px !important; /* deja el espacio del header */
        left: 0 !important;
        height: calc(50vh - 60px) !important;
        background-color: var(--primary-blue, #003366) !important;
        z-index: 12500 !important;
        overflow-y: auto !important;
        padding: 0 !important;
    }

    /* Mostrar el panel cuando está activo */
    .nav-links.active {
        display: flex !important;
    }

    .nav-links li {
        margin: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    }

    .nav-links a {
        color: #ffffff !important;
        padding: 16px 18px !important;
        font-size: 16px !important;
        text-align: left !important;
        display: block !important;
    }

    /* Submenús dentro del panel (colapsables) */
    .nav-links .dropdown-menu {
        display: none !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        padding-left: 12px !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.22s ease-in-out !important;
    }
    .has-dropdown.open > .dropdown-menu,
    .has-dropdown.active > .dropdown-menu,
    .nav-links .dropdown-menu.show {
        display: block !important;
        max-height: 1000px !important;
        overflow: visible !important;
    }

    /* Evitar que otros elementos creen stacking contexts por encima */
    .navbar { z-index: 13000 !important; }

    /* Forzar colores: fondo azul y texto blanco para menú y submenú sólo en teléfonos */
    .nav-links {
        background-color: var(--primary-blue, #003366) !important;
    }

    .nav-links a,
    .nav-links .has-dropdown > a,
    .nav-links .dropdown-menu li a,
    .nav-links .dropdown-arrow {
        color: #ffffff !important;
    }

    /* Submenú: mantener fondo azul cuando se despliega */
    .nav-links .dropdown-menu {
        background-color: var(--primary-blue, #003366) !important;
    }

    /* Si hay enlaces con clase .contacto, mantener el estilo (ya blanco), pero asegurar contraste */
    .nav-links li.contacto a {
        background-color: rgba(0,0,0,0.08) !important;
        color: #ffffff !important;
    }
}