/* ==================== VARIABLES Y ESTILOS GLOBALES ==================== */
:root {
    --header-height: 3.5rem;
    --primary-color: #347deb;   /* Azul Principal del Logo */
    --secondary-color: #5cb85c; /* Verde Principal del Logo */
    --accent-color: #5cb85c;    /* Dorado/Amarillo para acentos (marcapáginas) */
    --text-color: #212121;      /* Negro/Gris Oscuro para texto general */
    --bg-light: #f9f9f9;        /* Un fondo claro, puedes mantenerlo o cambiarlo a blanco si prefieres */
    --white-color: #fff;
    --body-font: 'Roboto', sans-serif;
    --title-font: 'Montserrat', sans-serif;
    --flame-purple: #8a2be2;    /* Púrpura de la flama para detalles */
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: 16px;
    color: var(--text-color);
}

h1, h2, h3 {
    font-family: var(--title-font);
    color: var(--primary-color);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

.container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding: 4rem 0 2rem;
}

.section-title {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white-color);
    padding: 1rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: bold;
    transition: 0.3s;
}

.btn:hover {
    background-color: #d4952b;
    transform: translateY(-2px);
}

/* ==================== NAVEGACIÓN ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
}

.nav-logo img {
    height: 45px; /* Define la altura del logo */
    width: auto;  /* El ancho se ajusta automáticamente */
    vertical-align: middle; /* Ayuda a alinear con los otros elementos del menú */
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--primary-color);
    font-weight: bold;
    position: relative;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

.nav-link:hover, .nav-link.active-link {
    color: var(--secondary-color);
}

.nav-link:hover::after, .nav-link.active-link::after {
    width: 100%;
}

.nav-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
}

/* ==================== INICIO (CARRUSEL) ==================== */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.carousel .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.carousel .slide.active {
    opacity: 1;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.slide-content {
    position: relative;
    z-index: 2;
    color: var(--white-color);
    max-width: 800px;
    padding: 1rem;
}

.slide-content h1 {
    font-size: 3.5rem;
    color: var(--white-color);
    margin-bottom: 0.5rem;
}

.slide-content h2 {
    font-size: 3rem;
    color: var(--white-color);
    margin-bottom: 0.5rem;
}

.slide-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* ==================== MISIÓN Y VISIÓN ==================== */
#mision-vision .grid {
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
}

.content-box {
    text-align: center;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: var(--white-color);
}

.icon-header {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}


/* ==================== SECCIÓN DE NIVELES ==================== */
#niveles {
    background-color: var(--white-color); /* Fondo blanco para esta sección */
}

.niveles-container {
    grid-template-columns: repeat(4, 1fr); /* 4 columnas en escritorio */
    gap: 2rem;
}

.nivel-card {
    position: relative;
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-end; /* Alinea el título abajo */
    padding: 1.5rem;
    transition: all 0.4s ease-in-out;
}

.nivel-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease-in-out;
}

.nivel-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 50%); /* Degradado oscuro abajo */
    z-index: 1;
}

.nivel-card-title {
    position: relative;
    color: var(--white-color);
    font-size: 1.75rem;
    z-index: 2;
    transition: transform 0.4s ease-in-out;
}

/* --- Efecto Hover --- */
.nivel-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.nivel-card:hover .nivel-card-image {
    transform: scale(1.1); /* Efecto de zoom en la imagen */
}

.nivel-card:hover .nivel-card-title {
    transform: translateY(-10px); /* Eleva el título */
}

/* --- Ajustes Responsivos para Niveles --- */
@media screen and (max-width: 992px) {
    .niveles-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    }
}

@media screen and (max-width: 576px) {
    .niveles-container {
        grid-template-columns: 1fr; /* 1 columna en móviles */
    }

    .nivel-card {
        height: 350px;
    }
}

/* ==================== PALABRA RHEMA ==================== */
.rhema-section {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 4rem 0;
    text-align: center;
}

.rhema-section blockquote {
    max-width: 800px;
    margin: 0 auto;
    border: none;
}

.rhema-section blockquote p {
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.6;
}

.rhema-section blockquote footer {
    font-size: 1.1rem;
    margin-top: 1rem;
    color: #ccc;
}


/* ==================== SECCIÓN A.C.E. ==================== */
#mision-vision,
#ace {
    /* background-color: var(--bg-light); /* Puedes dejar esta línea como fallback, o quitarla */
    background-image: linear-gradient(to bottom, #ebe8e8, #ffffff); /* Degradado de gris claro a blanco */
    background-color: #f7f7f7; /* Color base si el gradiente no se carga o para mejor sutilidad */
}

.ace-grid {
    grid-template-columns: repeat(3, 1fr);
}

.ace-card {
    background-color: var(--white-color);
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.ace-card:hover {
    transform: translateY(-10px);
}

.ace-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.ace-card h3 {
    margin-bottom: 0.5rem;
}

/* ==================== CONTACTO ==================== */
.contact-container {
    grid-template-columns: repeat(2, 1fr);
    background-color: var(--white-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.contact-info {
    padding: 2rem;
    background: var(--primary-color);
    color: var(--white-color);
}

.contact-info h3 {
    color: var(--white-color);
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 1rem;
}

.contact-info p i {
    margin-right: 0.5rem;
}

.contact-form {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.contact-form h3 {
    margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
    font-family: var(--body-font);
    resize: none; /* ¡LÍNEA AÑADIDA PARA QUITAR EL CONTROLADOR! */
}

.contact-form button {
    align-self: flex-start;
    border: none;
    cursor: pointer;
}


/* ==================== FOOTER ==================== */
.footer {
    background-color: #222;
    color: var(--white-color);
    text-align: center;
    padding: 1.5rem 0;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 60%;
        height: 100%;
        background-color: #fff;
        padding: 2rem;
        transition: right 0.4s;
        box-shadow: -2px 0 4px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
    }
    
    .nav-menu.show-menu {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 2.5rem;
    }

    .nav-toggle {
        display: block;
    }

    .nav-toggle i {
    transition: transform 0.4s ease;

    
}

.nav-toggle i.fa-times {
    transform: rotate(360deg);
}

    .slide-content h1 { font-size: 2.5rem; }
    .slide-content h2 { font-size: 2.2rem; }
    .slide-content p { font-size: 1.1rem; }

    #mision-vision .grid,
    .ace-grid,
    .contact-container {
        grid-template-columns: 1fr;
    }

    /* Estilos para el logo en el menú móvil */
.nav-menu-logo-container {
    margin-top: auto; /* ¡Este es el truco para empujarlo al fondo! */
    padding-top: 2rem;
    text-align: center;
    margin-bottom: 5vh; /*Ajustar altura logo movil */
}

.nav-menu-logo {
    max-width: 120px; /* Puedes ajustar este tamaño */
    opacity: 0.8; /* Le da un toque sutil */
}
}

@media screen and (max-width: 480px) {
    :root {
        --header-height: 3rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }

    .slide-content h1 { font-size: 2rem; }
    .slide-content h2 { font-size: 1.8rem; }
    .slide-content p { font-size: 1rem; }
    .btn { padding: 0.8rem 1.5rem; }
}


/* ==================== SECCIÓN UNIFORMES (VERSIÓN ANIMACIÓN DE TEXTO) ==================== */
#uniformes {
    background-color: var(--bg-light);
    padding-bottom: 4rem;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: -1.5rem auto 2.5rem;
    font-size: 1.1rem;
    color: #666;
}

.uniform-container {
    display: flex;
    width: 90%;
    margin: auto;
    border-radius: 20px;
    overflow: hidden;
    height: 70vh;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.uniform-panel {
    flex: 0.5;
    position: relative;
    cursor: pointer;
    transition: flex 0.7s cubic-bezier(0.05, 0.6, 0.4, 0.9);
    overflow: hidden;
}

.uniform-panel.active {
    flex: 5;
}

/* --- ESTILOS DE LA MARCA DE AGUA ANIMADA Y EL ESTUDIANTE --- */

/* 1. La marca de agua "Breath of Life" con animación */
.uniform-panel::before {
    content: attr(data-watermark);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-family: var(--title-font);
    font-size: 8vw;
    font-weight: 900;
    pointer-events: none;
    white-space: nowrap;
    text-transform: uppercase;
    z-index: 1;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15);
    
    color: transparent;
    -webkit-mask-image: linear-gradient(to right, #fff 0%, #fff 0%);
    mask-image: linear-gradient(to right, #fff 0%, #fff 0%);
    -webkit-mask-size: 0% 100%;
    mask-size: 0% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transition: mask-size 1.5s ease-in-out;
}

.uniform-panel.active::before {
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    color: rgba(255, 255, 255, 0.8);
    -webkit-text-stroke: 1px transparent;
    
}

/* 2. La imagen del estudiante */
.uniform-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 95%;
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: contain;
    z-index: 2;
}

.panel-diario::after { background-image: url('../recursos/Imagenes/Uniforme-diario.png'); }
.panel-gala::after { background-image: url('../recursos/Imagenes/Uniforme-gala.png'); }
.panel-ef::after { background-image: url('../recursos/Imagenes/Uniforme-fisica.png'); }

/* 3. Colores de fondo de cada panel */
.panel-diario { background-color: var(--secondary-color); }
.panel-gala { background-color: var(--primary-color); }
.panel-ef { background-color: #f0ad4e; }

/* 4. Estilos del texto del título (Uniforme Diario, etc.) */
.uniform-panel .uniform-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
}

.uniform-panel h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    transition: all 0.5s ease-in-out;
    white-space: nowrap;
}

.uniform-panel.active h3 {
    writing-mode: horizontal-tb;
    transform: rotate(0deg) translateY(-30vh);
    font-size: 2.5rem;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
}

/* === AJUSTES RESPONSIVOS PARA UNIFORMES === */
@media screen and (max-width: 768px) {
    .uniform-container {
        flex-direction: column;
        width: 100%;
        height: 80vh;
    }


    .uniform-panel::before {
        font-size: 10vw;
        transform: translate(-50%, -50%) rotate(-10deg);
    }

    /* LÍNEA AÑADIDA PARA IGUALAR EL TAMAÑO DE LA OTRA CAPA */
    .uniform-panel::after {
        font-size: 10vw;
    }

    .uniform-panel h3 {
        writing-mode: horizontal-tb;
        transform: rotate(0deg);
        font-size: 1.5rem;
    }

    .uniform-panel.active h3 {
        transform: translateY(-25vh);
        font-size: 2rem;
    }
}


/* --- Estilos del Logo en el Menú Móvil --- */

/* 1. Ocultamos el logo por defecto (en la vista de escritorio) */
.nav-menu-logo-container {
    display: none;
}

/* 2. Mostramos el logo y le damos estilo SOLO en pantallas de 768px o menos */
@media screen and (max-width: 768px) {

    .nav-menu-logo-container {
        display: block; /* Hacemos visible el logo */
        margin-top: auto; /* Lo empujamos al fondo */
        padding-top: 2rem;
        text-align: center;
    }

    .nav-menu-logo {
        max-width: 120px; /* Tamaño con el que se mostrará */
        opacity: 0.8;
    }

}

/* ==================== AJUSTE FINO PARA PANTALLAS ANGOSTAS (iPHONE) ==================== */
@media screen and (max-width: 390px) {

    .nav-logo {
        font-size: 0.85rem; /* Reduce el tamaño de la letra del logo */
    }

    .nav-logo img {
        height: 32px; /* Hace el logo un poco más pequeño para que coincida */
    }

}

/* --- Estilos para el Video de Fondo en el Carrusel --- */

.slide-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1; /* Posiciona el video detrás del contenido */
    object-fit: cover; /* Asegura que el video cubra todo el espacio */
}

/* ==================== ESTILOS DEL MODAL ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show-modal {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--white-color);
    padding: 2.5rem;
    border-radius: 1rem;
    text-align: center;
    position: relative;
    max-width: 400px;
    margin: 1rem;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show-modal .modal-content {
    transform: scale(1);
}

.modal-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
}

.modal-icon {
    font-size: 4rem;
    color: var(--secondary-color); /* Verde */
    margin-bottom: 1rem;
}

.modal-content h2 {
    margin-bottom: 0.5rem;
}