:root {
    --h: 56px;
    --r: 10px;
    --band: calc(var(--h) / 8);
}

body {
    position: relative;
    z-index: 0;
    margin: 0;
    background-image: url("../images/fondo.svg");
    text-align: center;
    background-size: cover;
    transform-origin: center;
}

/* Capa translúcida sobre el fondo */
body::before {
    content: "";
    position: fixed;
    /* ocupa toda la pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(233, 233, 233, 0.504);
    /* blanco translúcido, cambia color/alpha si quieres más efecto */
    pointer-events: none;
    /* permite interactuar con el contenido normal */
    z-index: 1;
}

/* Todo el contenido encima del fondo */
body>* {
    position: relative;
    z-index: 1;
}

h2 {
    margin: 8px 0;
    color: #d35400;
    font-weight: 600;
}

/* ===== Franja arcoiris ===== */
.rainbow-bar {
    position: relative;
    height: var(--h);
    width: 100%;
    overflow: hidden;
    background:
        repeating-linear-gradient(to bottom,
            #ff4698 0 calc(1*var(--band)),
            #ff2b2b calc(1*var(--band)) calc(2*var(--band)),
            #ff8c1a calc(2*var(--band)) calc(3*var(--band)),
            #ffd400 calc(3*var(--band)) calc(4*var(--band)),
            #2fbf2f calc(4*var(--band)) calc(5*var(--band)),
            #1091ff calc(5*var(--band)) calc(6*var(--band)),
            #3a2fbf calc(6*var(--band)) calc(7*var(--band)),
            #8b1fa9 calc(7*var(--band)) calc(8*var(--band)));
    box-shadow: 0 2px 0 rgba(0, 0, 0, .12) inset, 0 -2px 0 rgba(255, 255, 255, .2) inset, 0 12px 24px rgba(0, 0, 0, .18);
}

.rainbow-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .55) 38%, rgba(255, 255, 255, .35) 42%, transparent 46%);
    background-size: 300% 100%;
    animation: sweep 4.5s linear infinite;
    mix-blend-mode: screen;
    pointer-events: none;
}

@keyframes sweep {
    from {
        background-position: -200% 0
    }

    to {
        background-position: 100% 0
    }
}

/* ===== Botones ===== */
.btn-row {
    margin: 30px auto;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    flex: 1 1 120px;
    max-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
    transition: transform .2s ease;
}

.btn:hover {
    transform: translateY(-4px);
}

.btn::after {
    content: "➔";
    font-size: 22px;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .4;
}

.green {
    background: #28a745;
}

.yellow {
    background: #f1c40f;
    color: #222;
}

.purple {
    background: #8e44ad;
}

.blue {
    background: #3498db;
}

.red {
    background: #e74c3c;
}

.orange {
    background: #e67e22;
}

.btn img {
    width: 26px;
    height: 26px;
    margin-top: 6px;
}

/* ==== Imagenes === */

.logo {
    width: 350px;
    margin: 20px auto 0;
    display: block;
}

.logo-moodle {
    position: absolute;
    width: 32px;
    margin-top: 6px;
    left: 30px;
    bottom: 24%;
}

/* === CONTENIDO NOTICIAS === */

.carousel-noticias-container {
    background: url("../images/pizarra2.svg") no-repeat center;
    background-size: cover;
    position: relative;
    bottom: 100px;
    min-height: 650px;
    display: flex;
    align-items: center;
}

.contenedor-texto {
    display: flex;
    position: relative;
    top: 60px;
    left: 220px;
    flex-direction: row;
    justify-content: space-between;
    gap: 25px;
    width: 80%;
}

.noticia {
    flex: 1;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.noticia h2 {
    margin: 0 0 10px;
    color: #00263E;
    font-size: 1.2rem;
}

.noticia p {
    margin: 0;
    color: #333;
    font-size: 1rem;
    line-height: 1.4;
}

.noticia-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.carousel-noticias-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    width: 45px;
    height: 45px;
    color: #00263E;
    background-color: #ffffffa4;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.carousel-noticias-button.left {
    left: 10px;
}

.carousel-noticias-button.right {
    right: 10px;
}

.carousel-noticias-button:hover {
    background-color: #00263E;
    color: #fff;
}

/* ===== SECCIÓN DIRECTORA ===== */

.titulo-seccion {
    text-align: center;
    font-size: 2.2em;
    color: #282f61;
}

.seccion-directora {
    padding: 50px 8%;
    background-color: #f9f9f9ab;
}

.contenedor-directora {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.columna-imagen {
    flex: 1 1 280px;
    justify-content: center;
}

.imagen-directora {
    width: 400px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.columna-texto {
    flex: 2 1 600px;
    text-align: justify;
    column-count: 2;
    /* ← crea las dos columnas */
    column-gap: 40px;
    /* ← espacio entre columnas */
}

.columna-texto h3 {
    column-span: all;
    /* el título ocupa el ancho completo */
    color: #282f61;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.texto-imagen {
    color: #282f61;
    margin-bottom: 20px;
    text-align: left;
}

.columna-texto p {
    margin-bottom: 16px;
    line-height: 1.2;
    color: #333;
}

/* === SECCION GALERIA === */

.titulo-seccion {
    font-size: 2em;
    margin-bottom: 40px;
    font-weight: bold;
}

.contenedor-galeria {
    background-color: #f9f9f9ab;
    display: flex;
    padding: 40px;
}

/* ----------- REELS ----------- */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* relación 16:9 */
    border-radius: 12px;
    overflow: hidden;

}

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


.reels {
    display: inline;
    flex: 1;
    align-items: center;
    justify-content: center;
}

.reel-link {
    position: relative;
    display: inline-block;
    text-decoration: none;
}

.reel-link img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* ----------- BLOQUES DE GALERÍA ----------- */

/* Aqui se ajusta el div para que se coloque de manera horizontal usando flex */
.galeria-sede {
    display: flex;
    justify-content: center;
    align-items: flex-start;

}

.bloques-galeria {
    gap: 40px;
}

.bloque h2 {
    flex: 2 1 600px;
    font-size: 1.4em;
    margin-bottom: 15px;
}

.grid-fotos {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    align-items: center;
    width: 300px;
    /* tamaño total del collage, ajusta según cuántas miniaturas tengas */
    margin: 0 auto;
    padding: 15px;
}

.grid-fotos img {
    width: auto;
    height: 40px;
    image-rendering: -webkit-optimize-contrast;
    will-change: transform;
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.grid-fotos img:hover {
    transform: scale(1.3);
    z-index: 2;
}

.grid-fotos img {
    will-change: transform;
}


/* ----------- MODAL (ZOOM) ----------- */

/* Cuando el modal está activo, bloquea scroll */
body.modal-abierto {
    overflow: hidden;
    height: 100vh;
    /* evita scroll incluso en móviles */
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-contenido {
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}


.cerrar {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 2em;
    cursor: pointer;
}

/* -------- Flechas de navegación -------- */
.flecha {
    position: absolute;
    top: 50%;
    font-size: 2.5em;
    color: white;
    cursor: pointer;
    user-select: none;
    transform: translateY(-50%);
    transition: opacity 0.2s;
}

.flecha:hover {
    opacity: 0.8;
}

.flecha.izquierda {
    left: 5%;
}

.flecha.derecha {
    right: 5%;
}

/* === NIVELES === */

/* Semicírculo con 4 colores */
.semicirculo {
    position: relative;
    width: 640px;
    height: 320px;
    margin: 0 auto;
    border-top-left-radius: 320px;
    border-top-right-radius: 320px;
    overflow: hidden;
    background: conic-gradient(from 0deg,
            blue 0deg 90deg,
            orange 0deg 180deg,
            green 0deg 270deg,
            red 0deg 200deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Texto de niveles */
#niveles .nivel {
    position: absolute;
    width: 60%;
    text-align: center;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    font-size: 2.1rem;
}

/* Posición de cada texto */
#niveles .n1 {
    width: 110px;
    top: 210px;
    right: 66%;
    transform: rotate(-60deg);
}

#niveles .n2 {
    width: 110px;
    top: 70px;
    right: 55%;
    transform: rotate(-38deg);
}

#niveles .n3 {
    width: 110px;
    top: 70px;
    left: 55%;
    transform: rotate(38deg);
}

#niveles .n4 {
    width: 110px;
    top: 210px;
    left: 66%;
    transform: rotate(60deg);
}

/* Pequeña animación al pasar el mouse */
#niveles .nivel:hover {
    transform: scale(1.1);
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

/* === TALLERES === */
.carousel-talleres-wrapper {
    position: relative;
    margin: 40px auto;
}

.carousel-talleres-container {
    background: #f9f9f9ab;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
}

.carousel-talleres-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-talleres-image {
    max-height: 250px;
    border-radius: 10px;
    margin-bottom: 20px;
    object-fit: cover;
}

.carousel-talleres-content h2 {
    margin: 0 0 10px;
    color: #00263E;
}

.carousel-talleres-content p {
    margin: 0;
    color: #333;
}

.carousel-talleres-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    width: 45px;
    height: 45px;
    color: #00263E;
    background-color: #ffffffa4;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.carousel-talleres-button.left {
    left: 40px;
}

.carousel-talleres-button.right {
    right: 40px;
}

.carousel-talleres-button:hover {
    background-color: #00263E;
    color: #fff;
}


/* === CONTACTANOS === */

#contactos {
    padding: 50px 20px;
    text-align: center;
}

#contactos h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #282f61;
}

#contactos p {
    font-size: 1rem;
    margin-bottom: 30px;
    color: #555;
}

#form-contacto {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #282f61;
}

.form-group input,
.form-group textarea {
    width: 95%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #282f61;
}

#form-contacto button {
    background: #282f61;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
}

#form-contacto button:hover {
    background: #3f4ca3;
}

#form-respuesta {
    margin-top: 20px;
    font-weight: bold;
    color: green;
}

/* === FOOTER === */
footer {
    background: #f9f9f9ab;
    color: #282f61;
    padding: 20px 20px;
    text-align: left;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
}

.footer-column p {
    margin: 6px 0;
    font-size: 0.95rem;
}

.footer-column a {
    display: inline-block;
    margin: 5px 5px 5px 0;
    transition: transform 0.3s;
}

.footer-column a:hover {
    transform: scale(1.1);
}

.footer-icon {
    width: 35px;
    height: 35px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 15px;
    font-size: 0.9rem;
}

/* === BOTÓN WHATSAPP FLOTANTE === */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    background-color: #25D366;
    /* color oficial de WhatsApp */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}