/* ===== BASE ===== */
:root {
    --primary-dark: #0A2E3F;
    --primary: #1C6E6F;
    --primary-light: #3A9FA0;
    --accent: #D4AF37;
    --accent-dark: #B38F2F;
    --white: #FFFFFF;
    --gray-100: #F8F9FA;
    --gray-200: #E9ECEF;
    --gray-700: #495057;
    --gray-900: #212529;
    --shadow-sm: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.02);
    --shadow-md: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.02);
    --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--gray-700);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-inscripciones {
    background: var(--primary-dark);
    color: white;
    border: 1px solid transparent;
}

.btn-inscripciones:hover {
    background: transparent;
    border-color: var(--primary-dark);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-hero {
    background: var(--accent);
    color: var(--primary-dark);
    font-size: 1rem;
    padding: 14px 32px;
    box-shadow: var(--shadow-sm);
}

.btn-hero:hover {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    transform: translateY(-3px);
}

.btn-programa {
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent-dark);
    justify-content: center;
}

.btn-programa:hover {
    background: var(--accent);
    color: var(--primary-dark);
}

.btn-form {
    background: var(--accent);
    color: var(--primary-dark);
    width: 100%;
    justify-content: center;
    font-weight: 700;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
    background: transparent;
}

.header.scrolled {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0.6rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    height: 70px;
    width: auto;
    transition: height 0.3s;
}

.header.scrolled .logo {
    height: 55px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 1.8rem;
}

.nav-list a {
    font-weight: 600;
    color: var(--primary-dark);
    transition: color 0.2s;
    position: relative;
}

.nav-list a:hover {
    color: var(--accent);
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.2s;
}

.nav-list a:hover::after {
    width: 100%;
}

/* Botón hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-dark);
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Transformación a "X" */
.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, rgba(10, 46, 63, 0.342), rgba(28, 110, 111, 0.253)), url('../img/banner2026.jpg') center/cover no-repeat;
}

.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
    color: rgb(255, 255, 255);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    color: white;
}

.highlight {
    color: var(--accent);
    border-bottom: 3px solid var(--accent);
}

.subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* ===== VALORES ===== */
.valores {
    padding: 5rem 0;
    background: var(--gray-100);
}

.valores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.valor-card {
    background: white;
    padding: 2rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.03);
}

.valor-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.valor-icon {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.valor-card h3 {
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.btn-mas-info {
    background: transparent;
    border: 1px solid var(--primary-light);
    color: var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: 40px;
    margin-top: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
}

.btn-mas-info:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== MODALES DE VALORES ===== */
.modal-valor {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1100;
    justify-content: center;
    align-items: center;
}

.modal-valor.show {
    display: flex;
}

.modal-valor .modal-content {
    background: white;
    max-width: 600px;
    width: 90%;
    border-radius: 24px;
    position: relative;
    animation: fadeInUp 0.3s;
}

.modal-text {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-700);
}

/* ===== NUMERALIA ===== */
.numeros {
    padding: 5rem 0;
    background: white;
}

.numeros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.numero-item i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.numero-valor {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-dark);
    display: block;
    line-height: 1.2;
}

.numero-item p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* ===== CARRUSELES (SWIPER) ===== */
.swiper {
    padding: 20px 0 60px !important;
}

.swiper-slide {
    height: auto !important;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--accent) !important;
    background: rgba(255,255,255,0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 1.2rem;
}

.swiper-pagination-bullet-active {
    background: var(--accent) !important;
}

.programas-swiper, .testimonios-swiper {
    padding-left: 40px !important;
    padding-right: 40px !important;
}

/* ===== PROGRAMAS ===== */
.programas {
    padding: 5rem 0;
    background: white;
}

.programa-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.programa-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.programa-img {
    height: 240px;
    background-size: cover;
    background-position: center;
}

.programa-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.programa-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.btn-mas-info-programa {
    background: var(--accent);
    color: var(--primary-dark);
    border: none;
    border-radius: 40px;
    padding: 8px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0.5rem 0;
    width: 100%;
    font-size: 0.9rem;
}

.btn-mas-info-programa:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* ===== TESTIMONIOS ===== */
.testimonios {
    padding: 5rem 0;
    background: var(--gray-100);
}

.testimonio-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonio-img {
    height: 220px;
    overflow: hidden;
}

.testimonio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.testimonio-card:hover .testimonio-img img {
    transform: scale(1.03);
}

.testimonio-content {
    padding: 1.8rem;
    flex: 1;
}

.testimonio-content i {
    font-size: 2rem;
    color: var(--accent);
    opacity: 0.5;
    margin-bottom: 1rem;
    display: block;
}

.btn-ver-modal-testimonio {
    background: var(--accent);
    color: var(--primary-dark);
    border: none;
    border-radius: 40px;
    padding: 10px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.8rem 0 0;
    width: 100%;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-ver-modal-testimonio:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
}

/* ===== MODALES PARA PROGRAMAS Y TESTIMONIOS ===== */
.modal-programa, .modal-testimonio {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1200;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
}

.modal-programa.show, .modal-testimonio.show {
    display: flex;
}

.modal-programa-content, .modal-testimonio-content {
    background-color: white;
    width: 90%;
    max-width: 900px;
    border-radius: 24px;
    position: relative;
    animation: fadeInUp 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-programa-content, .modal-testimonio-content {
        flex-direction: row;
        max-width: 1000px;
    }
}

.modal-programa-imagen, .modal-testimonio-imagen {
    flex: 1;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-programa-imagen img, .modal-testimonio-imagen img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 16px;
}

.modal-programa-texto, .modal-testimonio-texto {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: 70vh;
}

.modal-programa-texto h2, .modal-testimonio-texto h2 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.modal-programa-texto p, .modal-testimonio-texto p {
    line-height: 1.6;
    color: var(--gray-700);
    white-space: pre-line;
}

.close-modal-programa, .close-modal-testimonio {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 36px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10;
    background: rgba(255,255,255,0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.close-modal-programa:hover, .close-modal-testimonio:hover {
    background: var(--accent);
    color: white;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary-dark);
    color: var(--gray-200);
    padding-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
}

.footer-logo {
    height: 65px;
    margin-bottom: 1rem;
}

.contact-info p {
    margin: 0.6rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-form h3, .footer-social h3 {
    color: white;
    margin-bottom: 1.2rem;
}

.footer-form input, .footer-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: none;
    border-radius: 40px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-family: inherit;
}

.footer-form input::placeholder, .footer-form textarea::placeholder {
    color: #ccc;
}

.footer-form textarea {
    border-radius: 20px;
    resize: vertical;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    background: rgba(255,255,255,0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.social-links a:hover {
    background: var(--accent);
    color: var(--primary-dark);
}

.map-container {
    margin-top: 1rem;
    border-radius: 20px;
    overflow: hidden;
}

.footer-bottom {
    background: rgba(0,0,0,0.2);
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 0.5rem;
}

/* Botón scroll top */
#btnScrollTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    box-shadow: var(--shadow-md);
    transition: 0.2s;
    z-index: 99;
}

#btnScrollTop:hover {
    background: var(--accent);
    transform: scale(1.05);
}

/* ===== HEADER: TEXTO BLANCO SIN SCROLL ===== */
.header:not(.scrolled) .nav-list a,
.header:not(.scrolled) .nav-list a:visited {
    color: white !important;
}

.header:not(.scrolled) .nav-list a:hover {
    color: var(--accent) !important;
}

.header:not(.scrolled) .btn-inscripciones {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgb(255, 255, 255);
    color: white;
}

.header:not(.scrolled) .btn-inscripciones:hover {
    background: rgb(255, 255, 255);
    color: var(--primary-dark);
    border-color: white;
}

/* Líneas del hamburguesa en blanco sin scroll */
.header:not(.scrolled) .hamburger span {
    background-color: white;
}

/* Cuando el menú está activo, las líneas siempre deben ser oscuras (para que la "X" se vea sobre fondo blanco) */
.hamburger.active span {
    background-color: var(--primary-dark) !important;
}



/* ===== RESPONSIVE (MÓVIL) ===== */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    /* Mostrar hamburguesa */
    .hamburger {
        display: flex !important;
    }

    /* Menú desplegable */
    .nav-list {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: left 0.3s ease;
        gap: 1.5rem;
        z-index: 999;
        overflow-y: auto;
    }

    .nav-list.active {
        left: 0;
    }

    .nav-list a {
        color: var(--primary-dark) !important;
        font-size: 1.2rem;
    }

    /* Botón inscripciones dentro del menú móvil: fondo oscuro, texto blanco */
    .nav .btn-inscripciones {
        margin: 1rem auto;
        display: inline-block;
        background: var(--primary-dark);
        color: white;
        border: none;
    }
    /* Anular el efecto de header sin scroll sobre el botón en móvil */
    .header:not(.scrolled) .btn-inscripciones {
        background: var(--primary-dark);
        color: white;
    }

    /* Hero */
    .hero {
        min-height: 80vh;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .section-title {
        font-size: 1.8rem;
    }

    /* Carruseles: ocultar flechas y ajustar padding */
    .programas-swiper, .testimonios-swiper {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .swiper-button-next, .swiper-button-prev {
        display: none;
    }
}

@media (max-width: 576px) {
    .logo {
        height: 60px;
    }
    .nav {
        gap: 8rem;
    }
    .hero h1 {
        font-size: 1.7rem;
    }
    .btn-hero {
        padding: 10px 20px;
    }
    .numeros-grid {
        grid-template-columns: 1fr 1fr;
    }
        /* Carruseles: ocultar flechas y ajustar padding */
    .programas-swiper, .testimonios-swiper {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .swiper-button-next, .swiper-button-prev {
        display: none;
    }
}
/* FORZAR COLOR OSCURO EN EL MENÚ DESPLEGADO, AUNQUE EL HEADER ESTÉ SIN SCROLL */
.header:not(.scrolled) .nav-list.active a {
    color: var(--primary-dark) !important;
}

/* También para el botón de inscripciones dentro del menú en ese estado */
.header:not(.scrolled) .nav-list.active .btn-inscripciones {
    background: var(--primary-dark);
    color: white;
}

/* ===== AJUSTES EXTREMOS (320px) ===== */
@media (max-width: 320px) {
    /* Header */
    .logo {
        height: 40px;
    }
    .btn-inscripciones {
        padding: 5px 10px;
        font-size: 0.65rem;
    }
    .hamburger {
        width: 20px;
        height: 15px;
    }
    .hamburger span {
        height: 2px;
    }
    .hamburger.active span:nth-child(1) {
        transform: translateY(6.5px) rotate(45deg);
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-6.5px) rotate(-45deg);
    }

    /* Hero */
    .hero h1 {
        font-size: 1.2rem;
    }
    .subtitle {
        font-size: 0.85rem;
    }
    .btn-hero {
        padding: 6px 14px;
        font-size: 0.75rem;
    }

    /* Secciones generales */
    .valores, .programas, .testimonios, .numeros {
        padding: 2rem 0;
    }
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    /* Grids */
    .valores-grid, .numeros-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .numeros-grid {
        grid-template-columns: 1fr;
    }

    /* Tarjetas */
    .valor-card {
        padding: 1rem;
    }
    .programa-img {
        height: 150px;
    }
    .testimonio-img {
        height: 140px;
    }



    /* Modales */
    .modal-programa-imagen img, .modal-testimonio-imagen img {
        max-height: 150px;
    }
    .modal-programa-texto, .modal-testimonio-texto {
        padding: 0.8rem;
    }
    .modal-programa-texto h2, .modal-testimonio-texto h2 {
        font-size: 1.2rem;
    }
    .modal-programa-texto p, .modal-testimonio-texto p {
        font-size: 0.8rem;
    }
    .close-modal-programa, .close-modal-testimonio {
        width: 26px;
        height: 26px;
        font-size: 20px;
    }

    /* Botón volver arriba */
    #btnScrollTop {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

        /* Carruseles: ocultar flechas y ajustar padding */
    .programas-swiper, .testimonios-swiper {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .swiper-button-next, .swiper-button-prev {
        display: none;
    }
}

/* ===== AJUSTES EXTREMOS (320px) ===== */
@media (max-width: 375px) {
    /* Header */
    .logo {
        height: 40px;
    }
    .btn-inscripciones {
        padding: 5px 10px;
        font-size: 0.65rem;
    }
    .hamburger {
        width: 20px;
        height: 15px;
    }
    .hamburger span {
        height: 2px;
    }
    .hamburger.active span:nth-child(1) {
        transform: translateY(6.5px) rotate(45deg);
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-6.5px) rotate(-45deg);
    }

    /* Hero */
    .hero h1 {
        font-size: 1.2rem;
    }
    .subtitle {
        font-size: 0.85rem;
    }
    .btn-hero {
        padding: 6px 14px;
        font-size: 0.75rem;
    }

      /* Carruseles: ocultar flechas y ajustar padding */
    .programas-swiper, .testimonios-swiper {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .swiper-button-next, .swiper-button-prev {
        display: none;
    }
}