/* ============================================= */
/* VARIABLES GLOBALES */
/* ============================================= */
:root {
    /* Colores principales */
    --primary: #e30613; /* Azul oscuro principal */
    --secondary: #1D428A; /* Rojo para acentos */
    --accent: #3B82F6; /* Azul más claro para detalles */
    --light: #F3F4F6; /* Gris claro de fondo */
    --dark: #111827; /* Texto oscuro */
    --gray: #6B7280; /* Texto gris */
    --white: #FFFFFF; /* Blanco puro */
    --gris: #2D2926;
    --transition: all 0.3s ease;
}

/* ============================================= */
/* RESET Y ESTILOS BASE */
/* ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: #f5f5f5;
}

html {
    scroll-behavior: smooth;
}

/* ============================================= */
/* ESTRUCTURA PRINCIPAL */
/* ============================================= */
.main-text {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HEADER - BARRA DE NAVEGACIÓN ===== */
/* ===== HEADER - BARRA DE NAVEGACIÓN ===== */
header {
    background-color: white;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    font-family: 'Montserrat', sans-serif;
}

.logo-text span {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray);
    letter-spacing: 0.5px;
}

/* Navigation - Estilo Desktop */
.nav-menu > ul {
    display: flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu > ul > li > a {
    padding: 12px 18px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.nav-menu > ul > li > a:hover {
    color: var(--primary);
    background-color: rgba(200, 16, 46, 0.05);
}

/* Botón de hamburguesa para móvil */
.nav-toggle {
    display: none;
    background: var(--primary);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1100;
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: white;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: white;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.nav-toggle.open .hamburger {
    background: transparent;
}

.nav-toggle.open .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.open .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Estilos para móvil */
@media (max-width: 996px) {
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #dbdbdb;
        padding: 10px 0;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        clip-path: circle(0px at 90% -10%);
        -webkit-clip-path: circle(0px at 90% -10%);
        transition: clip-path 0.5s ease;
        pointer-events: none;
    }
    
    .nav-menu.open {
        clip-path: circle(1500px at 90% -10%);
        -webkit-clip-path: circle(1500px at 90% -10%);
        pointer-events: all;
    }
    
    .nav-menu > ul {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-menu > ul > li {
        width: 100%;
    }
    
    .nav-menu > ul > li > a {
        padding: 15px 20px;
        color: #2d2926;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        text-align: left;
        box-sizing: border-box;
    }
    
    .nav-menu > ul > li > a:hover {
        color: #fff;
        background-color: #920000;
    }
}

/* Efecto sticky al hacer scroll */
.header.scrolled {
    padding: 0.3rem 0;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* NAVEGACIÓN MÓVIL */
/* Boton Hamburguer */
.nav-toggle {
    display: none;
    background: #1D428A;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1100;
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: white;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: white;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.nav-toggle.open .hamburger {
    background: transparent;
}

.nav-toggle.open .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.open .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

@media (max-width: 996px) {
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #dbdbdb;
        margin: 0;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        clip-path: circle(0px at 90% -10%);
        -webkit-clip-path: circle(0px at 90% -10%);
        transition: clip-path 0.5s ease;
        pointer-events: none;
    }
    
    .nav-menu.open {
        clip-path: circle(1500px at 90% -10%);
        -webkit-clip-path: circle(1500px at 90% -10%);
        pointer-events: all;
    }
    
    .nav-menu > ul {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-menu > ul > li {
        width: 100%;
    }
    
    .nav-menu > ul > li > a {
        padding: 15px 20px;
        color: #2d2926;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        text-align: left;
        box-sizing: border-box;
    }
    
    .nav-link::after {
        display: none;
    }
}

/* ============================================= */
/* SLIDER KEN BURNS (HERO SECTION) */
/* ============================================= */
.kenburns-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.kb-slides {
    position: relative;
    width: 100%;
    height: 100vh;
}

.kb-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.kb-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-image {
    filter: brightness(0.5);
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    animation: kenburns 16s infinite;
}

/* Efecto Ken Burns (zoom y movimiento) */
@keyframes kenburns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    50% {
        transform: scale(1.1) translate(-3%, 3%);
    }
    100% {
        transform: scale(1) translate(0, 0);
    }
}

/* Variaciones para cada imagen para que no sea repetitivo */
.kb-slide:nth-child(1) .hero-image {
    animation-name: kenburns-1;
}
.kb-slide:nth-child(2) .hero-image {
    animation-name: kenburns-2;
}
.kb-slide:nth-child(3) .hero-image {
    animation-name: kenburns-3;
}
.kb-slide:nth-child(4) .hero-image {
    animation-name: kenburns-4;
}

@keyframes kenburns-1 {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.08) translate(-2%, 2%); }
    100% { transform: scale(1) translate(0, 0); }
}
@keyframes kenburns-2 {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.1) translate(3%, -1%); }
    100% { transform: scale(1) translate(0, 0); }
}
@keyframes kenburns-3 {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.05) translate(-1%, -2%); }
    100% { transform: scale(1) translate(0, 0); }
}
@keyframes kenburns-4 {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.12) translate(2%, 1%); }
    100% { transform: scale(1) translate(0, 0); }
}

/* Overlay y controles (manteniendo tu estilo original) */
.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 2rem;
    color: white;
    z-index: 2;
    transform: translateY(0); /* Para posible animación */
    transition: transform 0.5s ease;
}

.hero-title {
    font-size: 2.7rem;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.7;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1.2s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Indicadores de slides */
.kb-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 3;
}

.kb-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.kb-dot.active {
    background-color: var(--secondary);
    transform: scale(1.2);
    border-color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .kenburns-slider {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .kenburns-slider {
        height: 50vh;
        min-height: 300px;
    }
    
    .hero-overlay {
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
}

/* ============================================= */
/* SECCIÓN DE CONTENIDO PRINCIPAL */
/* ============================================= */
.content-section {
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 3rem 0;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 8px;
}

.slider-container {
    margin: auto 0;
}

.perfil-gallery-container {
    flex: 0 0 40%;
    min-width: 45%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.perfil-gallery-slider {
    width: 100%;
    height: 350px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    z-index: 20;
}

.gallery-nav:hover {
    background-color: var(--secondary);
    color: var(--white);
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

.gallery-controls {
    position: absolute;
    bottom: 1rem;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.gallery-dots {
    display: flex;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 20px;
}

.gallery-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid white;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-dots span.active {
    background-color: var(--white);
    transform: scale(1.1);
}

@media (max-width: 992px) {
    .perfil-gallery-slider {
        height: 250px;
    }
    
    .perfil-gallery-container {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .gallery-nav:hover {
        background-color: var(--white);
        color: var(--primary-color);
    }
}

/* Contenido de texto */
.text-content {
    padding: 1rem;
    border-radius: 8px;
}

.text-content h2 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.text-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
}

.text-content p {
    margin-bottom: 1.5rem;
    color: var(--gray);
}

/* Tarjetas de características */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card { 
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    text-align: center;
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.feature-title {
    text-align: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.feature-text {
    padding: 0 1.5rem;
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

/* ============================================= */
/* FOOTER */
/* ============================================= */
/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
                url('../imgnuevas/escuela/escuela3.jpg');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #f8f8f8;
    padding: 4.5rem 0;
    position: relative;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    padding: 0 1.5rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    height: 100%;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-logo {
    width: 60px;
    filter: drop-shadow(2px 4px 6px black);
}

.footer-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-slogan {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 300;
}

.footer-social {
    text-align: center;
}

.social-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Hover: fondo igual, icono con color real */
.social-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.social-link:hover i.fa-facebook-f {
    color: #1877f2;
}

.social-link:hover i.fa-instagram {
    color: #E1306C;
}

.social-link:hover i.fa-youtube {
    color: #FF0000;
}

/* Responsive ajustes */
@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        align-items: center; /* ← centrado vertical */
        justify-content: space-between;
        text-align: initial;
    }

    .footer-brand {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 1rem;
    }

    .footer-brand-info {
        text-align: left;
    }

    .footer-social {
        text-align: right;
    }

    .social-links {
        justify-content: flex-end;
    }

    .footer-logo {
        width: 65px;
    }

    .footer-title {
        font-size: 2rem;
    }

    .footer-slogan {
        font-size: 1.1rem;
    }
}

/* ============================================= */
/* MEDIA QUERIES - RESPONSIVE DESIGN */
/* ============================================= */
@media (max-width: 992px) {
    /* Navegación móvil */
    .features-grid{
        margin: 2rem 0;
    }
    .text-content{
        padding: 0;
    }
    .text-content h2{
        text-align: center;
    }
    .text-content h2::after{
        left: 40%;
    }
    .main-text{
        padding: 0 2rem;
    }

    .slider-container{
        padding: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 1.8rem;
        width: 100%;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-legal {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    /* Ajustes generales */
    .logo-text{
        text-align: justify; 
        padding: 0 3px;
    }
    .logo-text span{
        letter-spacing: 1px;
    }
    .header-container {
        display: flex;
        justify-content: space-between;
        text-align: center;
        gap: 1rem;
    }
    
    .content-section {
        grid-template-columns: 1fr;
        background-color: transparent;
        box-shadow: none;
        padding: 2rem 0;
    }
    
    /* Slider Ken Burns */
    .kenburns-slider {
        height: 70vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Slider secundario */
    .slider {
        height: 250px;
    }
}

@media (max-width: 480px) {
    /* Ajustes para móviles pequeños */
    .header-container {
        padding: 0 1.2rem;
    }
    .kenburns-slider {
        height: 70vh;
        min-height: 400px;
    }
    
    .titulo-principal {
        font-size: 1.5rem;
    }
    
    .escudo {
        height: 50px;
    }
    
    /* Slider Ken Burns */
    .hero-overlay {
        padding: 1.5rem;
    }
    
    .hero-title {
        text-align: start;
        font-size: 1.8rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-map {
        height: 250px;
    }
}

/* ===== BOTÓN IR ARRIBA ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
}