/* FUENTE ELEGANTE */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Montserrat:wght@300;400;500&display=swap');

/* VARIABLES DE COLOR */
:root {
    --sapphire: #3C507D;
    --royal-blue: #112250;
    --quicksand: #E0C58F;
    --swan-wing: #F5F0E9;
    --shellstone: #D9CBC2;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY */
body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--royal-blue), var(--sapphire));
    color: var(--swan-wing);
    scroll-behavior: smooth;
}

/* ENCABEZADO */
header {
    position: sticky;
    top: 0;
    background: rgba(17, 34, 80, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    text-align: center;
    z-index: 1000;
}

/* ========================= */
/* 🛡️ LOGOS ENCIMA DEL MENÚ */
/* ========================= */

.logo {
    position: absolute;
    top: 10px;
    width: 85px;
    height: auto;

    animation: flotar 3s ease-in-out infinite;

    border: 3px solid var(--quicksand);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(224, 197, 143, 0.7);

    transition: 0.3s;
}

.logo-izq {
    left: 20px;
}

.logo-der {
    right: 20px;
}

.logo:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(224, 197, 143, 1);
}

/* ANIMACIÓN LOGOS */
@keyframes flotar {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

/* TITULO */
header h1 {
    font-family: 'Playfair Display', serif;
    color: var(--quicksand);
    text-align: center;
    margin-bottom: 10px;
}

/* NAV */
nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: var(--swan-wing);
    font-weight: 500;
    position: relative;
    transition: 0.3s;
}

/* EFECTO HOVER NAV */
nav a::after {
    content: "";
    width: 0%;
    height: 2px;
    background: var(--quicksand);
    position: absolute;
    left: 0;
    bottom: -5px;
    transition: 0.3s;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--quicksand);
}

/* MAIN */
main {
    padding: 40px 20px;
}

/* SECCIONES */
section {
    background: rgba(245, 240, 233, 0.05);
    margin: 30px auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 1000px;
    backdrop-filter: blur(10px);

    opacity: 0;
    transform: translateY(40px);
    animation: aparecer 1s ease forwards;
}

/* RETARDOS */
section:nth-child(1) { animation-delay: 0.2s; }
section:nth-child(2) { animation-delay: 0.4s; }
section:nth-child(3) { animation-delay: 0.6s; }
section:nth-child(4) { animation-delay: 0.8s; }
section:nth-child(5) { animation-delay: 1s; }

/* TITULOS */
h2 {
    font-family: 'Playfair Display', serif;
    color: var(--quicksand);
    margin-bottom: 15px;
}

h3 {
    color: var(--shellstone);
}

/* TEXTOS */
p, li {
    line-height: 1.6;
}

/* LISTAS */
ul, ol {
    padding-left: 20px;
}

/* BOTONES */
button {
    background: linear-gradient(135deg, var(--quicksand), var(--shellstone));
    color: var(--royal-blue);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: bold;
}

button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--quicksand);
}

/* INPUTS */
input, textarea {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: none;
    margin-top: 5px;
    margin-bottom: 15px;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    background: var(--royal-blue);
    color: var(--shellstone);
}

/* ANIMACIÓN */
@keyframes aparecer {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* EFECTO HOVER EN SECCIONES */
section:hover {
    transform: scale(1.02);
    transition: 0.3s;
}

/* SCROLL SUAVE */
html {
    scroll-behavior: smooth;
}

/* ========================= */
/* 🔥 ACORDEÓN DINÁMICO 🔥 */
/* ========================= */

.acordeon h2 {
    cursor: pointer;
    position: relative;
    padding-right: 25px;
}

.acordeon h2::after {
    content: "▼";
    position: absolute;
    right: 0;
    transition: 0.3s;
}

.acordeon.activo h2::after {
    transform: rotate(180deg);
}

.contenido {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s ease;
}

.acordeon.activo .contenido {
    max-height: 500px;
    opacity: 1;
    margin-top: 15px;
}

/* ========================= */
/* 🎥 LINKS TV GANTE */
/* ========================= */

#red1 a, #red2 a {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;

    background: linear-gradient(135deg, var(--quicksand), var(--shellstone));
    color: var(--royal-blue);

    transition: all 0.3s ease;
}

#red1 a:hover, #red2 a:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--quicksand);
}

/* ========================= */
/* 📱 RESPONSIVE */
/* ========================= */

@media (max-width: 768px) {

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    section {
        padding: 20px;
    }

    /* logos más pequeños */
    .logo {
        width: 55px;
        top: 5px;
    }
}
/* MAPA */
.mapa {
    margin-top: 15px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(224, 197, 143, 0.3);
}

/* BANNER PRINCIPAL AJUSTADO */
.banner {
    width: 100%;
    max-height: 350px; /* altura más delgada tipo franja */
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

/* IMAGEN DENTRO DE TARJETAS */
.img-card {
    margin-top: 15px;
    overflow: hidden;
    border-radius: 15px;
}

.img-card img {
    width: 100%;
    height: 500px; /* más proporcional */
    object-fit: cover;
    border-radius: 15px;
}

/* CONTENEDOR DE BOTONES */
.redes-botones {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* BOTONES DE REDES */
.redes-botones a {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;

    background: linear-gradient(135deg, var(--quicksand), var(--shellstone));
    color: var(--royal-blue);

    transition: all 0.3s ease;
}

/* HOVER */
.redes-botones a:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--quicksand);
}

/* CONTENEDOR DE ABEJAS */
#abejas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* no bloquea clics */
    z-index: 999;
}

/* ABEJA */
.abeja {
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url("img/abeja.png"); /* tu imagen */
    background-size: contain;
    background-repeat: no-repeat;

    pointer-events: auto; /* sí permite clic */
    cursor: pointer;
}

/* CENTRAR CONTENIDO */
.section-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* CONTENEDOR DEL VIDEO */
.video-container {
    width: 35%;
    margin-top: 15px;
}

/* VIDEO */
.video-container video {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(224, 197, 143, 0.3);
}

/* GRID DE EVENTOS (2 columnas) */
.eventos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 40px auto;
}

/* TARJETA */
.flip-card {
    background: transparent;
    perspective: 1000px;
}

/* CONTENIDO INTERNO */
.flip-inner {
    position: relative;
    width: 100%;
    height: 220px;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

/* EFECTO AL PASAR EL MOUSE */
.flip-card:hover .flip-inner {
    transform: rotateY(180deg);
}

/* CARAS */
.flip-front, .flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
}

/* FRENTE (IMAGEN) */
.flip-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* PARTE TRASERA */
.flip-back {
    background: linear-gradient(135deg, var(--quicksand), var(--shellstone));
    color: var(--royal-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    transform: rotateY(180deg);
    font-weight: bold;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .eventos-grid {
        grid-template-columns: 1fr;
    }
}

/* CONTENEDOR */
.perfiles-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* TARJETAS */
.perfil-card {
    background: rgba(245, 240, 233, 0.08);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: 0.3s;
}

/* HOVER */
.perfil-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(224, 197, 143, 0.3);
}

/* TITULOS */
.perfil-card h3 {
    margin-bottom: 10px;
    color: var(--quicksand);
}

/* LISTAS */
.perfil-card ul {
    margin-top: 10px;
    padding-left: 20px;
}

/* JUSTIFICAR SOLO TEXTO */
p, li {
    text-align: justify;
}

/* TARJETA DESPLEGABLE */
.desplegable {
    overflow: hidden;
}

/* CABECERA */
.desplegable-header {
    cursor: pointer;
}

/* CONTENIDO */
.desplegable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease;
    margin-top: 0;
}

/* CUANDO ESTÁ ACTIVA */
.desplegable.active .desplegable-content {
    max-height: 3000px;
    margin-top: 20px;
}

/* CONTENEDOR DEL TITULO */
.titulo-desplegable {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* FLECHA */
.flecha {
    font-size: 28px;
    color: var(--quicksand);
    transition: transform 0.4s ease;
}

/* ROTAR AL ABRIR */
.desplegable.active .flecha {
    transform: rotate(180deg);
}

/* ========================= */
/* 📱 RESPONSIVE MOVIL/TABLET */
/* ========================= */

@media (max-width: 768px) {

    /* HEADER */
    header {
        padding: 15px;
    }

    header h1 {
        font-size: 22px;
        text-align: center;
    }

    /* NAV */
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    nav a {
        font-size: 15px;
    }

    /* LOGOS */
    .logo {
        width: 60px;
        height: auto;
    }

    /* SECCIONES */
    section {
        width: 95%;
        padding: 20px;
    }

    /* TITULOS */
    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 18px;
    }

    /* VIDEOS */
    .video-container {
        width: 100%;
    }

    /* IMAGENES */
    .img-card img,
    .flip-front img {
        width: 100%;
        height: auto;
    }

    /* EVENTOS */
    .eventos-grid {
        grid-template-columns: 1fr;
    }

    /* TARJETAS */
    .perfil-card {
        padding: 15px;
    }

    /* MAPA */
    .mapa iframe {
        height: 250px;
    }

    /* BOTONES */
    button,
    .redes-botones a {
        width: 100%;
        text-align: center;
    }

    /* FORMULARIOS */
    input,
    textarea {
        font-size: 16px;
    }

    /* TEXTO */
    p, li {
        font-size: 15px;
    }

    /* FLECHA */
    .flecha {
        font-size: 22px;
    }

    /* ABEJAS */
    .abeja {
        width: 30px;
        height: 30px;
    }
}

/* BOTON HAMBURGUESA */
.menu-toggle {
    display: none;
    font-size: 35px;
    color: var(--quicksand);
    cursor: pointer;
    text-align: center;
    margin-top: 10px;
}

/* RESPONSIVE */
@media (max-width: 768px) {

    /* MOSTRAR BOTON */
    .menu-toggle {
        display: block;
    }

    /* OCULTAR MENU */
    nav {
        display: none;
        width: 100%;
    }

    /* MENU ACTIVO */
    nav.active {
        display: block;
        animation: aparecerMenu 0.4s ease;
    }

    /* LINKS */
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-top: 20px;
    }

    nav a {
        font-size: 18px;
    }
}

/* ANIMACION */
@keyframes aparecerMenu {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}