/* =========================================
   VARIABLES Y RESET
   ========================================= */
:root {
    --primary-color: #F5A623; /* Naranja/Amarillo de los botones */
    --text-dark: #333333;
    --text-light: #777777;
    --footer-bg: #1E1810;
    --bg-light: #FAFAFA;
    --font-heading: 'Merriweather', serif;
    --font-body: 'Montserrat', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   COMPONENTES (Botones, Contenedores)
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(245, 166, 35, 0.3);
}

.btn-solid {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-solid:hover {
    background-color: #e09612;
    color: #fff;
}

/* =========================================
   HEADER & MENÚ HAMBURGUESA
   ========================================= */
header {
    position: absolute; /* Para que quede encima del Hero */
    top: 0; left: 0; width: 100%;
    z-index: 100;
    padding: 20px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container img {
    height: 50px; /* Ajustar según tamaño real del logo cabecera */
}

/* Menú Desktop */
.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: #fff;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Menú Hamburguesa (Oculto en desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1000;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    margin: 6px auto;
    background-color: #fff;
    transition: var(--transition);
}

/* =========================================
   SECCIONES GLOBALES (Layouts)
   ========================================= */
.col-2 {
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 80px 0;
}

.col-2 > div {
    flex: 1;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    background: url('img/hero.webp') no-repeat center center/cover; /* <- Corrección aquí */
    position: relative;
    display: flex;
    align-items: center;
    color: #fff;
}

/* Capa oscura opcional por si el texto no se lee bien sobre la foto */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

.hero .logo-large {
    max-width: 400px;
    margin: 0 auto;
}

/* =========================================
   ÁREAS EDUCATIVAS
   ========================================= */
.areas-educativas {
    padding: 80px 0;
    text-align: center;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.card-area {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.card-area:hover {
    transform: translateY(-5px);
}

.card-area img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-area h4 {
    padding: 15px;
    font-size: 1.1rem;
    margin: 0;
}

/* =========================================
   VIDEO SECTION
   ========================================= */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

/* =========================================
   CTA PRE-FOOTER (Coordinemos horarios)
   ========================================= */
.cta-banner {
    background: url('img/back-footer.webp') center top/cover no-repeat; /* <- Corrección aquí */
    padding: 120px 0 80px;
    text-align: center;
    color: #fff;
}

.cta-banner h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.cta-banner .btn {
    background: #fff;
    color: var(--primary-color);
    border-color: #fff;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background-color: var(--footer-bg);
    color: #fff;
    padding: 40px 0 20px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo img {
    height: 80px;
}

.social-icons a {
    color: #fff;
    font-size: 1.5rem;
    margin-left: 15px;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--primary-color);
}

/* =========================================
   BOTONES FLOTANTES (WSP y SCROLL)
   ========================================= */
.floating-btn {
    position: fixed;
    bottom: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: var(--transition);
    cursor: pointer;
}

.btn-wsp {
    left: 30px;
    background-color: #25D366;
    color: #fff;
    font-size: 35px;
}

.btn-wsp:hover {
    background-color: #1EBE55;
    transform: scale(1.1);
}

.btn-scroll {
    right: 30px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
}

.btn-scroll.show {
    opacity: 1;
    visibility: visible;
}

.btn-scroll:hover {
    background-color: #e09612;
    transform: translateY(-5px);
}

/* =========================================
   RESPONSIVE DESIGN (Móviles y Tablets)
   ========================================= */
@media (max-width: 992px) {
    /* --- CORRECCIÓN DE BORDES PEGADOS --- */
    .container {
        padding: 0 25px !important; /* Reforzamos el respiro lateral en móviles */
    }

    .col-2 {
        flex-direction: column;
        padding: 60px 0; /* Quitamos el padding lateral aquí para que el container haga su trabajo */
        gap: 40px; 
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Menú Hamburguesa Animación Off-Canvas */
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100vw;
        height: 100vh;
        background: rgba(30, 24, 16, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        margin: 15px 0;
    }

    .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);
    }
    
    /* --- CORRECCIONES HERO --- */
    .hero {
        padding-top: 130px; /* Bajamos el contenido para que el menú no lo tape */
        padding-bottom: 60px;
        text-align: center; /* En móvil, el Hero centrado queda más armónico */
    }

    .hero-content h1 {
        font-size: 2.3rem; /* Achicamos título principal */
    }

    .hero .logo-large {
        max-width: 250px; /* Achicamos la medalla gigante */
        margin: 30px auto 0;
    }
    
    /* --- CORRECCIONES TÍTULOS GLOBALES --- */
    .section-title {
        font-size: 2rem; /* Achicamos los títulos h2 */
    }

    .cta-banner h2 {
        font-size: 2rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}

/* Teléfonos pequeños */
@media (max-width: 576px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 1.8rem; /* Título aún más adaptado a celulares chicos */
    }

    .hero .logo-large {
        max-width: 200px; /* Medalla perfecta para celular */
    }

    .section-title {
        font-size: 1.7rem; /* Evita que "ÁREAS EDUCATIVAS" se corte mal */
    }

    .cta-banner h2 {
        font-size: 1.6rem; /* CTA adaptado */
    }
}

/* =========================================
   PÁGINA: SOBRE NOSOTROS
   ========================================= */

/* Hero Nosotros */
.hero-nosotros {
    background: url('img/hero-nosotros.webp') no-repeat center top/cover; /* <- Corrección aquí */
    padding: 150px 0 50px; 
    text-align: center;
    color: #fff;
    position: relative;
}

.hero-nosotros h1 {
    font-size: 3rem;
    margin-bottom: 40px;
}

.img-profesor-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.img-profesor-container img {
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    width: 100%;
}

/* Quote Section */
.quote-section {
    max-width: 800px;
    margin: 60px auto;
    text-align: center;
}

.quote-icon {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.quote-section blockquote {
    font-size: 1.2rem;
    font-family: var(--font-heading);
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.quote-author {
    font-size: 0.9rem;
    color: var(--text-light);
}

.quote-author strong {
    color: var(--text-dark);
    display: block;
    font-size: 1rem;
}

.quote-divider {
    width: 50px;
    height: 2px;
    background-color: #ddd;
    margin: 20px auto;
}

/* Estadísticas (Los Números Hablan) */
.stats-section {
    margin: 60px auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr repeat(3, 1fr);
    align-items: center;
    gap: 30px;
    text-align: center;
}

.stats-title h2 {
    font-size: 2rem;
    text-align: left;
    margin: 0;
}

.stat-item h3 {
    font-size: 2.5rem;
    margin: 0;
    color: var(--text-dark);
}

.stat-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Detalles (Líneas divisorias y texto) */
.details-section {
    margin: 60px auto 100px;
}

.detail-row {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    padding: 40px 0;
    border-top: 1px solid #ddd;
}

.detail-row:last-child {
    border-bottom: 1px solid #ddd;
}

.detail-row h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dark);
    margin: 0;
}

.detail-content p, .detail-content ul {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.detail-content ul.check-list {
    list-style-type: none;
    padding: 0;
}

.detail-content ul.check-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 30px;
}

.detail-content ul.check-list li i {
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--primary-color);
}

/* Responsive Sobre Nosotros */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .stats-title h2 {
        text-align: center;
        margin-bottom: 20px;
    }
    .detail-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}