/* ================= Variables & Paleta Escolar ================= */
:root {
    /* Basado en el logo: Verde fuerte y Azul de la cinta */
    --primary-dark: #0A1F10; 
    --accent-green: #0C852D; /* Verde Logo */
    --accent-blue: #1A8CBF;  /* Azul Cinta */
    --accent-yellow: #F4B41A; /* Lápiz amarillo */
    
    --bg-color: #F8FAF9;
    --bg-alt: #FFFFFF;
    --text-main: #1F2924;
    --text-muted: #64748B;
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    --transition: all 0.3s ease;
}

/* Modo Oscuro Automático */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121814; /* Fondo verde muy oscuro para el sitio */
        --bg-alt: #1A211C;
        --text-main: #F1F5F9;
        --text-muted: #94A3B8;
        --card-bg: #1A211C;
        --border-color: #2D3A32;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; border-radius: 12px; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.text-accent-green { color: var(--accent-green); }
.text-accent-blue { color: var(--accent-blue); }

/* ================= Header ================= */
.navbar {
    position: fixed; top: 0; width: 100%;
    background: rgba(18, 24, 20, 0.95);
    backdrop-filter: blur(10px); color: white;
    z-index: 1000; padding: 1rem 0;
    border-bottom: 3px solid var(--accent-green);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-weight: 600; font-size: 0.95rem; text-transform: uppercase; }
.nav-links a:hover { color: var(--accent-green); }
.menu-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* ================= Weather Widget ================= */
.weather-widget {
    margin-top: 72px;
    background: var(--accent-blue);
    color: white; padding: 0.6rem 0; font-size: 0.9rem; font-weight: 700; text-transform: uppercase;
}
.weather-container { display: flex; justify-content: center; align-items: center; gap: 1rem; }

/* ================= Hero & Video ================= */
.hero {
    position: relative; min-height: 85vh;
    display: flex; align-items: center; overflow: hidden;
}
.hero-video {
    position: absolute; top: 50%; left: 50%;
    min-width: 100%; min-height: 100%;
    z-index: 0; transform: translate(-50%, -50%);
    object-fit: cover; opacity: 0.8;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(12, 133, 45, 0.9), rgba(10, 31, 16, 0.6)); /* Tonos verdes */
    z-index: 1;
}
.hero-content { position: relative; z-index: 2; color: white; max-width: 700px; }
.badge { background: var(--accent-yellow); color: #000; padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 800; text-transform: uppercase; }
.hero h1 { font-size: 4rem; line-height: 1.1; margin: 1.5rem 0; font-weight: 800; }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; color: #E2E8F0; }

.play-btn {
    background: var(--accent-blue); color: white; border: none;
    padding: 1rem 2rem; border-radius: 50px; font-size: 1.1rem; font-weight: 800;
    cursor: pointer; display: flex; align-items: center; gap: 0.5rem; transition: var(--transition);
    box-shadow: 0 4px 15px rgba(26, 140, 191, 0.3);
}
.play-btn:hover { background: #136a91; transform: translateY(-3px); }
.hero-player { display: flex; align-items: center; gap: 1.5rem; }

/* Ondas */
.audio-waves { display: flex; gap: 4px; align-items: center; height: 30px; opacity: 0.5; }
.wave { width: 5px; height: 10px; background: white; border-radius: 2px; animation: wave 1s ease-in-out infinite alternate; }
.wave:nth-child(2) { animation-delay: 0.2s; }
.wave:nth-child(3) { animation-delay: 0.4s; }
.wave:nth-child(4) { animation-delay: 0.6s; }
@keyframes wave { 0% { height: 10px; } 100% { height: 30px; } }

/* Corrección del corte (media rota) */
.hero-waves { position: absolute; bottom: -2px; left: 0; width: 100%; z-index: 2; }
/* La onda dibuja el color de la sección que le sigue (--bg-color) */

/* ================= Sections ================= */
.section { padding: 5rem 0; background-color: var(--bg-color); }
.bg-alt { background-color: var(--bg-alt); }
.section-title { text-align: center; font-size: 2.5rem; font-weight: 800; margin-bottom: 2.5rem; color: var(--text-main); }

/* ================= Sobre Nosotros (Nuevo Diseño) ================= */
.about-modern-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-top: 5px solid var(--accent-green);
}
.about-content h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.lead-text { font-size: 1.2rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-main); }
.about-features { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.feature-item { display: flex; align-items: flex-start; gap: 1rem; }
.feature-icon { font-size: 1.5rem; color: var(--accent-blue); background: rgba(26, 140, 191, 0.1); padding: 1rem; border-radius: 12px; }
.feature-item h4 { font-size: 1.1rem; margin-bottom: 0.2rem; }

/* Contenedor del Logo de la Radio */
.about-image-wrapper {
    display: flex; justify-content: center; align-items: center;
    padding: 2rem;
    background: radial-gradient(circle, rgba(12,133,45,0.1) 0%, rgba(0,0,0,0) 70%);
}
.school-logo-img {
    max-width: 100%;
    width: 350px; /* Tamaño ajustable según el logo */
    border-radius: 50%; /* Como el logo es circular */
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}
.school-logo-img:hover { transform: scale(1.05); }

/* ================= Carrusel de Galería ================= */
.carousel-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}
.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 1.5rem;
    padding: 1rem;
    scrollbar-width: none; /* Oculta scroll en Firefox */
}
.carousel-track::-webkit-scrollbar { display: none; } /* Oculta scroll en Chrome/Safari */

.carousel-slide {
    flex: 0 0 calc(33.333% - 1rem); /* Muestra 3 imágenes a la vez en PC */
    scroll-snap-align: start;
}
.carousel-slide img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: var(--border-color); /* Fondo mientras carga la ruta */
}

.carousel-btn {
    background: var(--card-bg);
    color: var(--accent-green);
    border: 1px solid var(--border-color);
    width: 45px; height: 45px;
    border-radius: 50%;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}
.carousel-btn:hover { background: var(--accent-green); color: white; }
.prev-btn { left: -20px; }
.next-btn { right: -20px; }

/* ================= Responsive ================= */
@media (max-width: 900px) {
    .about-modern-card { grid-template-columns: 1fr; gap: 2rem; padding: 2rem; }
    .carousel-slide { flex: 0 0 calc(50% - 1rem); } /* 2 imágenes en tablet */
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-toggle { display: block; }
    .hero h1 { font-size: 2.8rem; }
    .carousel-slide { flex: 0 0 85%; } /* 1 imagen en móvil */
    .prev-btn { left: 0; } .next-btn { right: 0; }
}

/* ================= Footer ================= */
.footer { background: #0A1F10; color: #A0AAB2; padding: 4rem 0 2rem; border-top: 4px solid var(--accent-blue); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer h4 { color: white; margin-bottom: 1.5rem; font-size: 1.1rem; }
.footer ul li a:hover { color: var(--accent-green); }
.social-links a { background: #1A211C; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: white; transition: var(--transition); }
.social-links a:hover { background: var(--accent-blue); }
.footer-bottom { text-align: center; border-top: 1px solid #1A211C; padding-top: 2rem; }
.developer a { color: var(--accent-green); font-weight: 600; }

/* 1. Dale un z-index mucho más alto al contenido para traer el botón al frente */
.hero-content { 
    position: relative; 
    z-index: 10; /* Subimos el nivel de 2 a 10 */
    color: white; 
    max-width: 700px; 
}

/* 2. Desactiva los eventos de puntero en las ondas para que sean "invisibles" al mouse */
.hero-waves { 
    position: absolute; 
    bottom: -1px; /* Lo bajamos 1px a la fuerza */
    left: 0; 
    width: 100%; 
    z-index: 2; 
    pointer-events: none; 
    line-height: 0; /* Elimina espacios fantasmas de texto */
    font-size: 0;
}

.hero-waves svg {
    display: block; /* Evita que el navegador lo trate como texto */
    width: 100%;
    height: auto;
}

/* ================= Variables (Estilo Premium Oscuro) ================= */
:root {
    /* Fondos oscuros elegantes inspirados en tu referencia */
    --bg-color: #0F1115; /* Casi negro, muy elegante */
    --bg-alt: #16191E;
    
    /* Colores de tu Logo para acentos */
    --accent-green: #0C852D; /* El verde del círculo */
    --accent-blue: #1A8CBF;  /* El azul de la cinta */
    --accent-yellow: #F4B41A;
    
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --card-bg: #16191E;
    --border-color: #2A2E37;
    --transition: all 0.3s ease;
}

/* ================= Header & Widget Clima ================= */
.navbar {
    background: rgba(15, 17, 21, 0.95); /* Negro transparente */
    border-bottom: 2px solid var(--accent-blue); /* Línea azul sutil, no verde gruesa */
}

.weather-widget {
    background: #16191E; /* Fondo oscuro en vez de cyan brillante */
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted); 
}
.weather-widget i { color: var(--accent-blue); } /* Iconos azules para dar el toque de color */

/* ================= Hero & Overlay ================= */
.hero-overlay {
    /* Cambiamos el verde gigante por un degradado negro muy profesional */
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(15, 17, 21, 0.95) 0%, rgba(15, 17, 21, 0.6) 100%);
    z-index: 1;
}

.badge { 
    background: var(--accent-green); /* Badge verde en vez de amarillo */
    color: white; 
}

.play-btn {
    background: var(--accent-blue); /* Botón azul de la cinta */
    color: white;
    box-shadow: 0 4px 20px rgba(26, 140, 191, 0.4); /* Resplandor azul */
}
.play-btn:hover { background: #136a91; }

/* ================= Mejoras del Footer, Logos y Animaciones ================= */
.footer-logo-img { 
    max-width: 160px; 
    margin-bottom: 1rem; 
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.brand-col { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
}

/* Animación para el texto dinámico del Header */
.fade-text {
    font-family: 'Montserrat', sans-serif; /* Tipografía limpia y profesional */
    font-size: 1.25rem;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}
.fade-out {
    opacity: 0;
    transform: translateY(-10px); /* Pequeño salto elegante al desaparecer */
}

/* Responsividad del Footer (Solución para móviles) */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }
    .brand-col {
        align-items: center; /* Centra el logo y texto en la columna principal */
    }
    .footer-col h4 {
        margin-bottom: 1rem;
    }
    .social-links {
        justify-content: center;
    }
}
/* ================= Solución Redes Sociales Horizontales ================= */
.social-links {
    display: flex;
    flex-direction: row; /* Fuerza a que los iconos vayan hacia el lado */
    gap: 1rem; /* Agrega un espacio uniforme entre cada icono */
    flex-wrap: wrap; /* Por si el espacio es muy pequeño en móviles, no se rompa el diseño */
}