/* ======== VARIABLES Y ESTILOS GLOBALES ======== */
:root {
    --header-height: 70px;
    --color-yellow: #FFC107; /* Color principal de San Juan Conduce */
    --color-black: #121212; /* Color secundario oscuro */
    --color-white: #FFFFFF;
    --color-light-gray: #F5F5F5; /* Fondo claro general */
    --color-dark-gray: #333333; /* Texto oscuro general */
    --color-text-light: #666666; /* Texto secundario/descriptivo */
    --font-primary: 'Poppins', sans-serif;
    --font-display: 'Montserrat', sans-serif;
    --gradient-yellow: linear-gradient(45deg, #FFD54F, #FFC107); /* Degradado amarillo */
    --gradient-bg: linear-gradient(180deg, var(--color-light-gray) 0%, var(--color-white) 100%); /* Fondo suave */
    --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.08); /* Sombra ligera */
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12); /* Sombra más pronunciada */
}
*, *::before, ::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-primary);
    color: var(--color-dark-gray);
    background-color: var(--color-white);
    padding-top: var(--header-height); /* Para que el contenido no se oculte bajo el header fijo */
}

/* Revertir el borde de prueba si ya verificaste que funciona */
/* body { border: none !important; } */

.container {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 20px;
}
.section {
    padding: 100px 0;
}
.section__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--color-black);
    text-align: center;
    margin-bottom: 60px;
    text-wrap: balance;
}
.gradient-text {
    background: var(--gradient-yellow);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
/* ======== BOTONES GENERALES ======== */
.button {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-size: 1rem;
}
.button span {
    position: relative;
    z-index: 2;
}
.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 1;
}
.button:hover::before {
    width: 300px;
    height: 300px;
}
.button--primary {
    background: var(--color-yellow);
    color: var(--color-black);
    box-shadow: var(--shadow-medium);
}
.button--primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(255, 193, 7, 0.4);
}
.button--secondary {
    background-color: transparent;
    color: var(--color-black);
    border: 2px solid var(--color-black);
    box-shadow: none;
}
.button--secondary:hover {
    background-color: var(--color-black);
    border-color: var(--color-black);
    color: var(--color-yellow);
    transform: translateY(-5px);
}
.button--small {
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 30px;
}
.button--small i {
    margin-right: 5px;
}

/* ======== HEADER Y NAVEGACIÓN ======== */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    background-color: var(--color-white);
    box-shadow: none;
}
.header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}
.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav__logo {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-black);
}
.nav__logo i {
    margin-right: 8px;
    color: var(--color-yellow);
}
.nav__list {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}
.nav__link {
    color: var(--color-dark-gray);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    transition: var(--transition-smooth);
}
.nav__link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-yellow);
    transition: width 0.3s ease;
}
.nav__link:hover::after {
    width: 100%;
}
.nav__toggle, .nav__close {
    font-size: 1.5rem;
    color: var(--color-black);
    cursor: pointer;
    background: none;
    border: none;
    display: none; /* Ocultar por defecto en desktop */
}

/* ESTILOS ESPECÍFICOS PARA BOTONES EN NAVEGACIÓN */
.nav__item .nav__link--cta {
    padding-bottom: 0;
    line-height: normal;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: var(--gradient-yellow);
    color: var(--color-black) !important;
    padding: 10px 25px;
    border-radius: 50px;
    box-shadow: var(--shadow-medium);
    font-weight: 600;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nav__item .nav__link--cta::after {
    content: none;
}
.nav__item .nav__link--cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(255, 193, 7, 0.4);
    color: var(--color-black) !important;
}
.nav__item .nav__link--cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 1;
}
.nav__item .nav__link--cta:hover::before {
    width: 150px;
    height: 150px;
}
.nav__item .nav__link--secondary-cta {
    padding-bottom: 0;
    line-height: normal;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--color-black) !important;
    border: 2px solid var(--color-black);
    padding: 10px 25px;
    box-shadow: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    border-radius: 50px;
}
.nav__item .nav__link--secondary-cta::after {
    content: none;
}
.nav__item .nav__link--secondary-cta:hover {
    background-color: var(--color-black);
    border-color: var(--color-black);
    color: var(--color-yellow) !important;
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}
.nav__item .nav__link--secondary-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 1;
}
.nav__item .nav__link--secondary-cta:hover::before {
    width: 150px;
    height: 150px;
}
/* FIN ESTILOS PARA BOTONES EN NAVEGACIÓN */

/* ======== SECCIÓN HERO ======== */
.hero {
    padding-top: var(--header-height);
    height: 100vh;
    min-height: 600px; /* Ajuste para pantallas más pequeñas */
    background-color: var(--color-light-gray);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    text-align: center; /* Centra texto en móvil */
}
.hero__container {
    z-index: 2;
    position: relative;
    margin-inline: auto; /* Centra el contenedor en móvil */
}
.hero__text {
    max-width: 650px;
    margin-inline: auto; /* Centra el texto */
}
.hero__subtitle {
    background: var(--color-black);
    color: var(--color-yellow);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: inline-block;
}
.hero__title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--color-black);
    margin-bottom: 25px;
    letter-spacing: -1px;
}
.hero__description {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    margin-bottom: 40px;
    color: var(--color-text-light);
    max-width: 550px;
    margin-inline: auto; /* Centra la descripción */
}
.hero__wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 150px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='1' d='M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,138.7C672,128,768,160,864,176C960,192,1056,192,1152,176C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 3;
}

/* ======== ESTILOS ESPECÍFICOS DEL MAPA ======== */
.map-controls {
    display: flex;
    justify-content: flex-end; /* Alinea el botón a la derecha */
    margin-bottom: 20px;
    padding-inline: 10px; /* Pequeño padding para el botón en los bordes */
}

#map {
    height: 70vh; /* Altura responsiva */
    min-height: 400px; /* Altura mínima para asegurar visibilidad en pantallas pequeñas */
    width: 100%;
    border: 3px solid var(--color-black);
    box-shadow: var(--shadow-medium);
    border-radius: 20px;
    position: relative;
    background-color: var(--color-light-gray);
}

/* Clases de utilidad */
.mt-3 {
    margin-top: 1rem;
}

/* ======== FOOTER ======== */
.footer {
    background-color: var(--color-black);
    color: var(--color-light-gray);
    padding: 50px 0;
    border-top: 5px solid var(--color-yellow);
}
.footer__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer__left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer__left .nav__logo {
    color: var(--color-white);
    justify-content: flex-start; /* Asegura alineación a la izquierda en desktop */
}
.footer__left p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-top: 5px;
}
.footer__social {
    display: flex;
    gap: 20px;
}
.footer__social a {
    color: var(--color-white);
    font-size: 1.5rem;
    transition: var(--transition-smooth);
}
.footer__social a:hover {
    color: var(--color-yellow);
    transform: translateY(-4px);
}

/* ======== BOTÓN FLOTANTE DE WHATSAPP ======== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.25);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: var(--transition-smooth);
}
.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128C7E;
}

/* ======== BOTÓN SCROLL-UP ======== */
.scroll-up {
    background-color: var(--color-yellow);
    color: var(--color-black);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    z-index: 50;
    transition: bottom 0.4s, transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow-medium);
    border: none;
    text-decoration: none;
    position: fixed;
    right: 25px;
    bottom: -20%;
}
.scroll-up:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0, 0.2);
}
.scroll-up.show {
    bottom: 25px;
}

/* ======== MODAL ======== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: var(--color-white);
    padding: 30px;
    border-radius: 15px;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    text-align: center;
}
.modal.active .modal-content {
    transform: translateY(0);
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.8rem;
    color: var(--color-black);
    cursor: pointer;
    border: none;
    background: none;
    transition: var(--transition-smooth);
}
.modal-close:hover {
    color: var(--color-yellow);
    transform: rotate(90deg);
}
.modal-content h4 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--color-black);
    margin-bottom: 15px;
}
.modal-content p {
    margin-bottom: 10px;
    line-height: 1.7;
    color: var(--color-text-light);
}
.modal-image-placeholder {
    width: 100%;
    height: 180px;
    background-color: var(--color-light-gray);
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text-light);
    font-size: 3rem;
    border: 1px dashed #ccc;
    overflow: hidden;
}
.modal-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block; /* Asegura que la imagen se muestre si se carga */
}

/* --- ESTILOS PARA LAS PÁGINAS INDIVIDUALES DE PROVINCIAS --- */
.main-province-content {
    padding-top: 50px; /* Espacio para el header fijo */
    text-align: left; /* Contenido de provincia a la izquierda por defecto */
}
.province-details-content {
    background-color: var(--color-white);
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    padding: 30px;
    margin-top: 30px;
    line-height: 1.7;
}
.province-details-content p {
    margin-bottom: 10px;
}
.province-details-content strong {
    color: var(--color-black);
}
.province-detail-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-soft);
}
.back-button {
    margin-bottom: 30px;
    display: inline-flex; /* Para alinear el icono y el texto */
    align-items: center;
}
.back-button i {
    margin-right: 8px;
}


/* --- MEDIA QUERIES PARA RESPONSIVIDAD --- */
@media (max-width: 768px) {
    .section {
        padding: 80px 0;
    }
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--color-light-gray);
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        padding: 100px 40px;
        transition: right 0.4s ease-in-out;
        z-index: 100;
    }
    .nav__menu.show-menu {
        right: 0;
    }
    .nav__list {
        flex-direction: column;
        gap: 40px;
    }
    .nav__link {
        font-size: 1.2rem;
    }
    .nav__menu.show-menu .nav__item .nav__link--cta,
    .nav__menu.show-menu .nav__item .nav__link--secondary-cta {
        margin-top: 20px;
        width: 100%;
        max-width: 250px;
        margin-inline: auto;
        display: flex;
        background: var(--gradient-yellow);
        color: var(--color-black) !important;
        border: 2px solid var(--color-black);
    }
    .nav__menu.show-menu .nav__item .nav__link--secondary-cta {
        background-color: transparent;
    }
    .nav__menu.show-menu .nav__item .nav__link--secondary-cta:hover {
        background-color: var(--color-black);
        border-color: var(--color-black);
        color: var(--color-yellow) !important;
    }
    .nav__toggle, .nav__close {
        display: block;
        z-index: 101;
    }
    .hero {
        min-height: 550px; /* Más pequeño en móvil */
        padding-top: calc(var(--header-height) + 20px); /* Ajuste del padding */
        padding-bottom: 50px; /* Espacio inferior */
    }
    .hero__title {
        line-height: 1.2;
    }
    .hero__description {
        font-size: 1rem;
    }
    .footer__container {
        flex-direction: column;
        text-align: center;
    }
    .footer__left .nav__logo {
        justify-content: center; /* Centra el logo en el footer en móvil */
    }
    .whatsapp-float {
        width: 50px;
        height: 50px;
        right: 20px;
        bottom: 20px;
        font-size: 24px;
    }
    .scroll-up {
        right: 15px;
        bottom: 15px;
        width: 45px;
        height: 45px;
    }
    .scroll-up.show {
        bottom: 15px;
    }

    #map {
        height: 50vh; /* Más responsivo en móvil */
        min-height: 300px;
    }
    .modal-content {
        max-width: 90%;
        padding: 20px;
    }
    .modal-content h4 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    .map-controls {
        justify-content: center; /* Centra el botón en móvil */
    }
    .province-detail-image {
        height: 200px; /* Ajusta altura de imagen en página de provincia para móvil */
    }
}