/* ===========================
   RESET Y BASE
=========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* evita que el header tape anclas */
}

body {
  margin: 0;
  padding-top: 80px;          /* espacio real del header fijo */
  background-color: #ffffff;
  overflow-x: hidden;         /* evita scroll horizontal fantasma */
}

/* Variable global para altura del header (útil si cambias el nav) */
:root {
  --header-height: 80px;
}

/* ===========================
   CABECERA Y NAVEGACIÓN
=========================== */
nav {
  background: #ffffff;
  padding: 8px 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;               /* menor que backToTopBtn */
  margin: 0;
  border-bottom: 3px solid #ddd;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

nav li {
  display: inline;
}

/* Estilos Base */
nav ul li a {
  text-decoration: none;
  color: #15055e;
  background-color: #ffffff;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.85em;
  display: inline-block;
  transform-origin: center;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

nav a:hover {
  transform: scale(1.15);     /* más suave que 1.4 para no romper layout */
  background-color: #15055e;
  color: gold;
  cursor: pointer;
}

/* ===========================
   RESPONSIVE TABLET (481px – 900px)
=========================== */
@media (max-width: 900px) and (min-width: 481px) {
  nav {
    position: fixed !important;   /* mantener fijo SIEMPRE */
    padding: 6px 0 !important;
    margin: 0;
    width: 100%;
    top: 0;
    left: 0;
    background: #ffffff;
    border-bottom: 1px solid #ddd;
  }

  nav ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    gap: 2px;
    padding: 2px;
    margin: 0;
    width: 100%;
  }

  nav ul li a {
    font-size: 0.7em;
    padding: 8px 6px;
    text-align: center;
    line-height: 1.15;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 32px;
    width: 100%;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    margin: 0;
    font-weight: 600;
  }

  nav a:hover {
    background-color: #15055e;
    color: gold;
    transform: none;
  }

  body {
    padding-top: 130px; /* nav de 3 columnas ocupa más */
  }
}

/* ===========================
   RESPONSIVE MÓVIL (<=480px)
=========================== */
@media (max-width: 480px) {
  nav {
    position: fixed !important;
    padding: 4px 0 !important;
    margin: 0;
    width: 100%;
    top: 0;
    left: 0;
    background: #ffffff;
    border-bottom: 1px solid #ddd;
  }

  nav ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
    gap: 2px;
    padding: 2px;
    margin: 0;
    width: 100%;
  }

  nav ul li a {
    font-size: 0.65em;
    padding: 6px 4px;
    text-align: center;
    line-height: 1.15;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 30px;
    width: 100%;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    margin: 0;
    font-weight: 600;
  }

  nav a:hover {
    background-color: #15055e;
    color: gold;
    transform: none;
  }

  body {
    padding-top: 170px; /* nav de 2 columnas con varios enlaces */
  }
}

/* ===========================
   BOTÓN BACK TO TOP
=========================== */
#backToTopBtn {
  position: fixed;
  right: 25px;
  bottom: 30px;
  width: 50px;
  height: 50px;
  background-color: #002b49;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50%;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100px) scale(0.6);
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease,
    transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background-color 0.3s ease,
    box-shadow 0.3s ease;
  z-index: 1001;              /* por encima del nav */
}

#backToTopBtn:hover {
  background-color: #2704a3;
  box-shadow: 0 6px 25px rgba(39, 4, 163, 0.35);
  transform: translateY(-3px) scale(1.1);
}

#backToTopBtn svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
  transition: fill 0.3s ease;
}

#backToTopBtn.showBtn {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
}

@media (max-width: 550px) {
  #backToTopBtn {
    width: 42px;
    height: 42px;
    bottom: 20px;
    right: 20px;
    left: auto;
  }
  #backToTopBtn svg {
    width: 20px;
    height: 20px;
  }
}

/* ===========================
   CONTENEDOR PRINCIPAL
=========================== */
.contenedor-principal {
  max-width: 1920px;
  margin: 10px auto;
  background: #ffffff;
  padding: 5px;
  border-radius: 0;
}

/* FRASE DORADA con logo */
.ingreso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
  padding: 0 20px;
  flex-wrap: wrap;
}

.ingreso__logo {
  width: 60px;
  height: auto;
  flex-shrink: 0;
}

.ingreso h3 {
  color: #0d36eb;
  font-size: 1.9em;
  font-weight: bold;
  margin: 0;
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .ingreso {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 15px 0;
    width: 100%;
  }
  .ingreso__logo {
    max-width: 40px;
    height: auto;
    object-fit: contain;
  }
  .ingreso h3 {
    font-size: 1.2rem;
    text-align: center;
    margin: 4px 0;
  }
}

/* ===========================
   FOOTER
=========================== */
footer {
  background: #ffffff;
  color: #be1111;
  padding: 10px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 3px solid #323979;
  flex-wrap: wrap;
}

footer a {
  color: #251870;
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  color: #9c0e51;
}

footer .social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

footer .social-links a {
  display: block;
}

footer .social-links a img {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
  border: none;
  outline: none;
}

@media (max-width: 480px) {
  footer {
    padding: 10px;
    flex-direction: column;
    font-size: 0.75em;
    text-align: center;
  }
  footer .social-links a img {
    width: 24px;
    height: 24px;
  }
}

/* ===========================
   HERO
=========================== */
.hero {
  width: 100%;
  padding: 40px 20px;
  box-sizing: border-box;
}

.hero__container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.hero__left,
.hero__right {
  padding: 10px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  background-color: transparent;
}

.hero__left h2,
.hero__right h2 {
  font-size: clamp(1.5rem, 3.5vw, 3rem);
  font-weight: 200;
  color: #2704a3;
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.5px;
  margin: 0 0 6px 0;
}

.hero__left h3,
.hero__right h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f13e08;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.5px;
  margin: 0 0 6px 0;
}

.hero__left p,
.hero__right p {
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  font-weight: 400;
  color: #1b1a4d;
  text-align: justify;
  line-height: 1.4;
  margin: 0 0 1% 0;
}

/* Botones en columna */
.botones-fila {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px auto 0 auto;
  width: 100%;
  max-width: 470px;
}

.boton {
  position: relative;
  text-decoration: none;
  color: #020450;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-align: center;
  width: 100%;
  max-width: 750px;
  padding: 16px 30px 16px 48px;
  background-color: #ffffff;
  border-radius: 16px;
  border: 4px solid rgba(3, 80, 202, 0.13);
  transition: background-color 0.25s ease, transform 0.25s ease,
    border-color 0.25s ease, box-shadow 0.25s ease;
}

.boton__icono {
  position: absolute;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #1410e0;
}

.boton__icono svg,
.boton__icono img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.boton__texto {
  line-height: 1.2;
  font-size: 1.2rem;
}

.boton:hover {
  background-color: rgba(192, 216, 236, 0.2);
  border-color: #200697;
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(32, 6, 151, 0.2);
}

/* Botones WhatsApp / Teléfono */
.hero__acciones {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 420px;
  margin: 24px auto 0 auto;
}

.boton1,
.boton2 {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background-color: #002b49;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.boton1:hover {
  background-color: #11b34f;
  transform: translateY(-2px);
}

.boton2:hover {
  background-color: #00406c;
  transform: translateY(-2px);
}

.boton1__icono,
.boton2__icono {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}

.boton1__texto,
.boton2__texto {
  line-height: 1;
  font-size: 0.95rem;
}

.hero__imagen-destacada {
  width: 30%;
  max-width: 100px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
}

/* Banner */
.banner-container {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
}

.banner-16-9 {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  object-fit: cover;
}

/* ===========================
   RESPONSIVE HERO
=========================== */
@media (max-width: 900px) {
  .hero__container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero__acciones {
    flex-direction: column;
    max-width: 100%;
  }
  .boton1,
  .boton2 {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 20px 15px;
  }
  .hero__left h2,
  .hero__right h2 {
    font-size: 1.8rem;
  }
  .hero__acciones {
    flex-direction: column;
    gap: 10px;
  }
  .boton1,
  .boton2 {
    width: 100%;
  }
  .boton__texto {
    font-size: 1rem;
  }
}






/* ===========================
   TALLERES
=========================== */
.talleres {
  width: 100%;
  padding: 40px 20px;
  margin: 20px 0;
}

.talleres__titulo {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: #2704a3;
  font-weight: 300;
  margin: 0 0 30px 0;
  letter-spacing: 0.5px;
}

.talleres_hora {
  text-align: center;
  font-size: clamp(0.75rem, 2vw, 1rem);
  color: #2704a3;
  font-weight: 400;
  margin: 0 0 20px 0;
  letter-spacing: 1.5px;
  border: 2px solid #e547f3;
  border-radius: 16px;
  padding: 20px;
}

.talleres__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.taller-card {
  background: #ffffff;
  border: 3px solid rgba(3, 80, 202, 0.13);
  border-radius: 16px;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.taller-card:hover {
  box-shadow: 0 14px 30px rgba(32, 6, 151, 0.15);
  border-color: #200697;
}

.taller-card__icono {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 80, 202, 0.08);
  border-radius: 50%;
  flex-shrink: 0;

}

.taller-card__icono img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.taller-card__titulo {
  font-size: clamp(1.1rem, 1.6vw, 1.6rem);
  color: #0d36eb;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.taller-card__descripcion {
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  color: #095092;
  line-height: 1.5;
  margin: 0;
}

.taller-card__lista {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: clamp(0.85rem, 1vw, 1rem);
  color: #ca0606;
}

.taller-card__lista li {
  line-height: 1.4;
}

.taller-card__boton {
  margin-top: 10px;
  text-decoration: none;
  background-color: #002b49;
  color: #ffffff;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: clamp(0.9rem, 1vw, 1rem);
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.taller-card__boton:hover {
  background-color: #2704a3;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .talleres {
    padding: 30px 15px;
  }
  .talleres__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .taller-card {
    padding: 24px 18px;
  }
  .taller-card__icono {
    width: 64px;
    height: 64px;
  }
  .taller-card__icono img {
    width: 48px;
    height: 48px;
  }
}

/* ===========================
   SEPARADOR
=========================== */
.separador-doble {
  width: 100%;
  max-width: 2600px;
  height: 6px;
  margin: 40px auto;
  border-top: 2px solid #2704a3;
  border-bottom: 2px solid #e02b0b;
}
































  /* ============================================
   MURCIÉLAGOS VOLANDO - Naturales y negros
============================================ */

.murcielagos-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.murcielago {
  position: absolute;
  opacity: 0.9;
  will-change: transform;
}

.murcielago svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35));
}

/* Alas: aleteo natural con pausa y rotación ligera */
.murcielago .ala-izq,
.murcielago .ala-der {
  transform-origin: 50% 60%;
  animation: aletear 0.32s ease-in-out infinite alternate;
}

.murcielago .ala-der {
  animation-delay: 0.02s; /* micro-desfase para realismo */
}

/* Cuerpo: ligero balanceo */
.murcielago .cuerpo {
  transform-origin: 50% 50%;
  animation: balanceo 0.64s ease-in-out infinite alternate;
}

@keyframes aletear {
  0%   { transform: scaleY(1)   rotate(0deg); }
  50%  { transform: scaleY(0.85) rotate(-2deg); }
  100% { transform: scaleY(0.6)  rotate(-4deg); }
}

@keyframes balanceo {
  0%   { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(2px) rotate(1.5deg); }
}

/* ---------- Trayectorias individuales ---------- */

/* Murciélago 1: vuelo alto, lento y amplio */
.murcielago:nth-child(1) {
  top: 8%;
  width: 48px;
  animation: vuelo1 22s linear infinite;
  animation-delay: 0s;
}

/* Murciélago 2: mediano, un poco más rápido */
.murcielago:nth-child(2) {
  top: 32%;
  width: 34px;
  animation: vuelo2 18s linear infinite;
  animation-delay: 3s;
}

/* Murciélago 3: grande, cercano al espectador */
.murcielago:nth-child(3) {
  top: 55%;
  width: 62px;
  animation: vuelo3 26s linear infinite;
  animation-delay: 7s;
}

/* Murciélago 4: pequeño, lejano */
.murcielago:nth-child(4) {
  top: 78%;
  width: 28px;
  animation: vuelo2 20s linear infinite;
  animation-delay: 11s;
}

/* Murciélago 5: extra para dar sensación de bandada */
.murcielago:nth-child(5) {
  top: 20%;
  width: 40px;
  animation: vuelo1 24s linear infinite;
  animation-delay: 14s;
}

/* Trayectorias orgánicas (ondas suaves) */
@keyframes vuelo1 {
  0%   { left: -12%; transform: translateY(0)   scaleX(1); }
  20%  { transform: translateY(-40px) scaleX(1); }
  40%  { transform: translateY(25px)  scaleX(1); }
  60%  { transform: translateY(-30px) scaleX(1); }
  80%  { transform: translateY(20px)  scaleX(1); }
  100% { left: 112%; transform: translateY(0)   scaleX(1); }
}

@keyframes vuelo2 {
  0%   { left: -12%; transform: translateY(0)   scaleX(1); }
  25%  { transform: translateY(30px)  scaleX(1); }
  50%  { transform: translateY(-45px) scaleX(1); }
  75%  { transform: translateY(15px)  scaleX(1); }
  100% { left: 112%; transform: translateY(0)   scaleX(1); }
}

@keyframes vuelo3 {
  0%   { left: -12%; transform: translateY(0)   scaleX(1); }
  15%  { transform: translateY(-55px) scaleX(1); }
  35%  { transform: translateY(35px)  scaleX(1); }
  55%  { transform: translateY(-25px) scaleX(1); }
  75%  { transform: translateY(45px)  scaleX(1); }
  100% { left: 112%; transform: translateY(0)   scaleX(1); }
}

/* En móvil, más pequeños y menos opacos para no estorbar */
@media (max-width: 768px) {
  .murcielago { opacity: 0.65; }
  .murcielago:nth-child(1) { width: 26px; }
  .murcielago:nth-child(2) { width: 20px; }
  .murcielago:nth-child(3) { width: 32px; }
  .murcielago:nth-child(4) { width: 18px; }
  .murcielago:nth-child(5) { width: 22px; }
}


/* Tamaños y velocidades distintos — con delay NEGATIVO para que ya estén en pantalla */
.murcielago:nth-child(1) { top: 8%;  width: 48px; height: 28px; animation: vuelo1 22s linear infinite; animation-delay: -2s; }
.murcielago:nth-child(2) { top: 32%; width: 34px; height: 20px; animation: vuelo2 18s linear infinite; animation-delay: -7s; }
.murcielago:nth-child(3) { top: 55%; width: 62px; height: 36px; animation: vuelo3 26s linear infinite; animation-delay: -13s; }
.murcielago:nth-child(4) { top: 78%; width: 28px; height: 17px; animation: vuelo2 20s linear infinite; animation-delay: -17s; }
.murcielago:nth-child(5) { top: 20%; width: 40px; height: 24px; animation: vuelo1 24s linear infinite; animation-delay: -5s; }




.murcielago:nth-child(6)  { top: 45%; width: 36px; height: 21px; animation: vuelo2 19s linear infinite; animation-delay: -9s; }
.murcielago:nth-child(7)  { top: 88%; width: 44px; height: 26px; animation: vuelo1 23s linear infinite; animation-delay: -14s; }
.murcielago:nth-child(8)  { top: 15%; width: 30px; height: 18px; animation: vuelo3 21s linear infinite; animation-delay: -6s; }
.murcielago:nth-child(9)  { top: 62%; width: 52px; height: 30px; animation: vuelo1 25s linear infinite; animation-delay: -20s; }
.murcielago:nth-child(10) { top: 5%;  width: 26px; height: 15px; animation: vuelo3 17s linear infinite; animation-delay: -11s; }


@media (max-width: 768px) {
  .murcielago { opacity: 0.6; }
  .murcielago:nth-child(1)  { width: 26px; height: 16px; }
  .murcielago:nth-child(2)  { width: 20px; height: 12px; }
  .murcielago:nth-child(3)  { width: 32px; height: 19px; }
  .murcielago:nth-child(4)  { width: 18px; height: 11px; }
  .murcielago:nth-child(5)  { width: 22px; height: 13px; }
  .murcielago:nth-child(6)  { width: 20px; height: 12px; }
  .murcielago:nth-child(7)  { width: 24px; height: 14px; }
  .murcielago:nth-child(8)  { width: 18px; height: 11px; }
  .murcielago:nth-child(9)  { width: 28px; height: 17px; }
  .murcielago:nth-child(10) { width: 16px; height: 10px; }
}