/* ==========================================
   VARIABLES Y ESTILOS GENERALES
   ========================================== */
:root {
    --primary-color: #2397C8;      /* Azul Celeste del logo */
    --primary-dark: #106286;       /* Azul Celeste Oscuro */
    --navy-dark: #0B3B5C;          /* Azul Oscuro institucional */
    --accent-yellow: #F7C927;      /* Amarillo del listón */
    --text-color: #2D3748;         /* Texto oscuro */
    --bg-light: #F8FAFC;           /* Fondo claro */
    --white: #FFFFFF;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--navy-dark);
    margin-bottom: 10px;
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #64748B;
    margin-bottom: 40px;
}

/* ==========================================
   BOTONES E INSIGNIAS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--navy-dark);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #062338;
    transform: translateY(-2px);
}

.btn-whatsapp {
    background-color: #25D366;
    color: var(--white);
}

.btn-whatsapp:hover {
    background-color: #1EBE57;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 15px 32px;
    font-size: 1.05rem;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(35, 151, 200, 0.15);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.badge-accent {
    background-color: var(--accent-yellow);
    color: var(--navy-dark);
}

/* ==========================================
   HEADER / NAVEGACIÓN RESPONSIVE
   ========================================== */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo-img {
    height: 45px;
    width: auto;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--navy-dark);
    cursor: pointer;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu a.nav-link {
    text-decoration: none;
    color: var(--navy-dark);
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-menu a.nav-link:hover {
    color: var(--primary-color);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(11, 59, 92, 0.9), rgba(35, 151, 200, 0.8)), url('DSC_0011.JPG') center/cover no-repeat;
    color: var(--white);
    padding: 140px 0 100px;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ==========================================
   VIDEO Y REPRODUCTOR
   ========================================== */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================
   ÁREAS O DEPARTAMENTOS
   ========================================== */
.deptos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.depto-card {
    background: var(--white);
    padding: 40px 25px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-bottom: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.depto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.depto-icon {
    width: 70px;
    height: 70px;
    background: rgba(35, 151, 200, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
}

.depto-card h3 {
    font-family: var(--font-heading);
    color: var(--navy-dark);
    font-size: 1.35rem;
    margin-bottom: 15px;
}

.depto-card p {
    font-size: 0.95rem;
    color: #4A5568;
    line-height: 1.7;
}

/* ==========================================
   MATERIAS Y ACCORDION DESPLEGABLE
   ========================================== */
.materias-accordion {
    max-width: 850px;
    margin: 30px auto 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.malla-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    overflow: hidden;
    text-align: left;
    transition: box-shadow 0.3s ease;
}

.malla-card[open] {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.malla-header {
    padding: 20px 25px;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    list-style: none; /* Remueve la flecha por defecto del navegador */
}

.malla-header::-webkit-details-marker {
    display: none; /* Para Safari / Chrome antigüos */
}

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title i {
    font-size: 1.5rem;
}

.header-title h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 0;
}

.toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Rotación de la flecha al estar desplegado */
.malla-card[open] .toggle-icon {
    transform: rotate(180deg);
}

.bg-primer-ano { background-color: #2E7D32; }
.bg-segundo-ano { background-color: #E65100; }
.bg-tercer-ano { background-color: var(--navy-dark); }

.materias-list {
    list-style: none;
    padding: 20px 30px;
    margin: 0;
    background-color: var(--white);
}

.materias-list li {
    padding: 12px 0;
    border-bottom: 1px solid #E2E8F0;
    font-size: 1rem;
    color: var(--text-color);
    position: relative;
    padding-left: 25px;
}

.materias-list li:last-child {
    border-bottom: none;
}

.materias-list li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.4rem;
    position: absolute;
    left: 0;
    top: 8px;
}

/* ==========================================
   REQUISITOS Y ADMISIONES
   ========================================== */
.requisitos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.req-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.req-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.req-icon {
    font-size: 2.5rem;
    color: var(--navy-dark);
    margin-bottom: 15px;
}

.req-card p {
    font-size: 1rem;
    color: var(--text-color);
}

.req-card small {
    display: block;
    font-size: 0.85rem;
    color: #64748B;
    margin-top: 5px;
}

/* ==========================================
   COSTOS Y MODALIDADES
   ========================================== */
.costos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    align-items: center;
}

.cost-card {
    background: var(--white);
    padding: 40px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.cost-card:hover {
    transform: translateY(-5px);
}

.cost-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--navy-dark);
    margin-bottom: 15px;
}

.cost-card .price {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 15px;
}

.cost-card p {
    font-size: 0.95rem;
    color: #64748B;
}

.cost-card.highlight {
    background: var(--navy-dark);
    color: var(--white);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(11, 59, 92, 0.3);
    padding: 50px 20px;
    border: 2px solid var(--accent-yellow);
}

.cost-card.highlight h3 { color: var(--white); }
.cost-card.highlight .price { color: var(--accent-yellow); }
.cost-card.highlight p { color: rgba(255,255,255,0.85); }

/* ==========================================
   GALERÍA DE FOTOS Y LIGHTBOX
   ========================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    height: 220px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.more-photos-box {
    margin-top: 30px;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2000;
}

.lightbox:target {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 3px solid var(--white);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    text-decoration: none;
}

/* ==========================================
   SECCIÓN PODCAST
   ========================================== */
.podcast-card {
    background: linear-gradient(135deg, var(--navy-dark), #0d4b75);
    color: var(--white);
    border-radius: 16px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.podcast-info h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.podcast-info p {
    margin-bottom: 25px;
    opacity: 0.9;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background-color: var(--navy-dark);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    height: 40px;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-social h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ==========================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: var(--white);
    border-radius: 50px;
    text-align: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* ==========================================
   REGLAS MEDIA QUERIES (RESPONSIVE DESIGN)
   ========================================== */

/* Tablets y pantallas medianas (<= 992px) */
@media (max-width: 992px) {
    .podcast-card {
        grid-template-columns: 1fr;
        padding: 30px;
    }

    .hero h1 {
        font-size: 2.3rem;
    }
}

/* Móviles (<= 768px) */
@media (max-width: 768px) {
    .section {
        padding: 50px 0;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 75px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 75px);
        background-color: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 20px;
        transition: left 0.3s ease;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .cost-card.highlight {
        transform: scale(1);
        padding: 40px 20px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 26px;
        bottom: 20px;
        right: 20px;
    }
}

/* Pantallas muy pequeñas (<= 480px) */
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .malla-header {
        padding: 15px 20px;
    }

    .header-title h3 {
        font-size: 1.1rem;
    }
}