/**
 * NOCHISMÁGICO V2.0 - HOJA DE ESTILOS PRINCIPAL
 * Estética: Apple Light Blue, Ultra-Glassmorphism, Luz Automática & Modo Antiguo
 */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");
@import url("https://fonts.cdnfonts.com/css/sf-pro-display");

/* =========================================================================
   1. VARIABLES Y MODO OSCURO / CLARO
   ========================================================================= */
:root {
  --bg-main: #f2f5f9;
  --text-main: #1c1c1e;
  --text-muted: #86868b;
  --primary: #0a84ff;
  --primary-hover: #0066cc;
  --primary-glow: rgba(10, 132, 255, 0.35);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.9);
  --glass-blur: blur(25px) saturate(200%);
  --glass-shine:
    inset 0 1px 2px rgba(255, 255, 255, 1), inset 0 -1px 2px rgba(0, 0, 0, 0.02);
  --card-shadow: 0 12px 35px rgba(0, 0, 0, 0.06);
  --up-light:
    0 10px 20px rgba(0, 0, 0, 0.03), 0 -15px 35px rgba(10, 132, 255, 0.15);
  --modal-glow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
  --bg-main: #0b0f19;
  --text-main: #ffffff;
  --text-muted: #a1a1a6;
  --primary: #5ac8fa;
  --primary-hover: #32ade6;
  --primary-glow: rgba(90, 200, 250, 0.45);
  --glass-bg: rgba(20, 25, 38, 0.6);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-blur: blur(30px) saturate(180%);
  --glass-shine:
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    inset 0 -1px 1px rgba(0, 0, 0, 0.4);
  --card-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  --modal-glow:
    0 20px 50px rgba(0, 0, 0, 0.7), 0 -40px 80px rgba(90, 200, 250, 0.25),
    inset 0 -3px 15px rgba(90, 200, 250, 0.3);
}

/* =========================================================================
   2. RESET Y TIPOGRAFÍA
   ========================================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "SF Pro Display", "Poppins", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  transition:
    background-color 0.5s ease,
    color 0.5s ease,
    filter 0.5s ease;
  overflow-x: hidden;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =========================================================================
   3. NAVBAR
   ========================================================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: none;
  box-shadow:
    inset 0 3px 15px rgba(255, 255, 255, 0.5),
    0 15px 40px rgba(0, 0, 0, 0.08);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s ease;
}

[data-theme="dark"] .navbar {
  box-shadow:
    inset 0 3px 15px rgba(255, 255, 255, 0.1),
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 15px 60px rgba(90, 200, 250, 0.15);
}

.navbar .logo {
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-darkmode {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow:
    var(--glass-shine),
    0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.btn-darkmode:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary);
}

/* =========================================================================
   4. MEJORA ESTÉTICA DE TODOS LOS BOTONES
   ========================================================================= */
.btn-action,
.btn-glow-base,
.filter-btn {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow:
    var(--glass-shine),
    0 4px 12px rgba(0, 0, 0, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-action:hover,
.btn-glow-base:hover,
.filter-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  color: var(--primary);
  border-color: var(--primary);
}

.filter-btn.active,
.btn-primary {
  background: var(--primary);
  color: #fff !important;
  border-color: var(--primary);
  box-shadow:
    0 8px 25px var(--primary-glow),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.filter-btn.active:hover,
.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-2px);
}

/* =========================================================================
   5. BUSCADOR Y FILTROS SCROLLABLES
   ========================================================================= */
.search-header {
  text-align: center;
  padding: 60px 20px 30px;
  position: relative;
  z-index: 2;
}
.search-header h1 {
  font-size: 3rem;
  margin-bottom: 12px;
}

.search-bar {
  max-width: 550px;
  margin: 0 auto 30px;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 18px 25px 18px 55px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-main);
  font-size: 1.1rem;
  box-shadow: var(--glass-shine), var(--card-shadow);
  backdrop-filter: var(--glass-blur);
  transition: all 0.4s;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  transform: scale(1.02);
}

.search-bar i {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
}
.search-bar input:focus + i {
  color: var(--primary);
}

.filters-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}
.filter-btn {
  padding: 10px 22px;
  font-size: 0.95rem;
}

.scroll-hint-mobile {
  display: none;
}

@media (max-width: 680px) {
  .scroll-hint-mobile {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: -5px;
    margin-top: -10px;
    opacity: 0.8;
  }

  .scroll-hint-mobile i {
    animation: deslizarMano 1.5s infinite ease-in-out;
  }

  @keyframes deslizarMano {
    0%,
    100% {
      transform: translateX(0);
    }
    50% {
      transform: translateX(8px);
    }
  }

  .filters-container {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 30px 40px 30px !important;
    margin: 0 -20px 0 -20px !important;
    scroll-behavior: smooth;
  }

  .filters-container::-webkit-scrollbar {
    display: none;
  }
  .filters-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .filter-btn {
    flex: 0 0 auto;
  }
}

/* =========================================================================
   6. TARJETAS "GLASS" (BASE Y DÍA)
   ========================================================================= */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 35px;
  padding: 20px;
  max-width: 1250px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.lugar-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.5s ease;
  box-shadow: var(--glass-shine), var(--card-shadow);
}

.lugar-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--primary);
  box-shadow: var(--glass-shine), var(--card-shadow), var(--up-light);
  z-index: 10;
}

.lugar-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition:
    transform 0.8s ease,
    filter 0.5s ease;
}
.lugar-card:hover img {
  transform: scale(1.05);
}

.lugar-info {
  padding: 24px;
  flex-grow: 1;
  background: var(--glass-bg);
  position: relative;
  z-index: 2;
  transition: all 0.5s ease;
}
.lugar-info h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text-main);
  transition: color 0.3s;
}
.lugar-card:hover .lugar-info h3 {
  color: var(--primary);
}
.lugar-info p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.badge-distancia {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(20, 25, 38, 0.6);
  backdrop-filter: blur(10px);
  color: white;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 5;
}

/* =========================================================================
   7. MODALES / CONTENEDORES (seccion.php)
   ========================================================================= */
.detalle-container,
#test-escolar-container {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  box-shadow: var(--glass-shine), var(--card-shadow);
  transition: all 0.5s ease;
  padding: 30px;
  max-width: 900px;
  margin: 40px auto;
  position: relative;
  z-index: 2;
}

/* =========================================================================
   8. EFECTOS ESPECIALES Y LUCES POR DEFECTO (MODO OSCURO)
   ========================================================================= */
[data-theme="dark"] .lugar-card {
  border: none !important;
  border-radius: 40px 40px 10px 10px;
  background: rgba(20, 25, 38, 0.8);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.8),
    0 0 25px rgba(255, 170, 0, 0.15);
  position: relative;
}

[data-theme="dark"] .lugar-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.9),
    0 0 35px rgba(255, 170, 0, 0.25);
}
[data-theme="dark"] .lugar-info {
  background: linear-gradient(
    to top,
    rgba(255, 170, 0, 0.08) 0%,
    rgba(20, 25, 38, 0.8) 60%
  );
}
[data-theme="dark"] .detalle-container,
[data-theme="dark"] #test-escolar-container {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(20, 25, 38, 0.8);
  box-shadow: 0 0 35px rgba(255, 170, 0, 0.15);
  position: relative;
}

/* =========================================================================
   9. BORDE ANIMADO POR DEFECTO: LUZ QUE PASA ALREDEDOR
   ========================================================================= */
[data-theme="dark"] .lugar-card::after,
[data-theme="dark"] .detalle-container::after,
[data-theme="dark"] #test-escolar-container::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 170, 0, 0.15) 0%,
    rgba(255, 170, 0, 0.15) 45%,
    rgba(255, 170, 0, 1) 50%,
    rgba(255, 170, 0, 0.15) 55%,
    rgba(255, 170, 0, 0.15) 100%
  );
  background-size: 400% 100%;
  animation: luzViajeraOcasional 20s infinite ease-in-out;
  opacity: 1;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 10;
}
@keyframes luzViajeraOcasional {
  0% {
    background-position: 200% 50%;
  }
  15% {
    background-position: -100% 50%;
  }
  100% {
    background-position: -100% 50%;
  }
}

/* =========================================================================
   10. EFECTO DEL BOTÓN (LUCES MANUALES: TARJETAS Y FOOTER)
   ========================================================================= */
[data-theme="dark"] .filters-container .btn-iluminacion {
  display: inline-flex !important;
  border-color: rgba(255, 170, 0, 0.5);
  color: #ffaa00;
  padding: 10px 20px;
}
[data-theme="dark"] .btn-iluminacion.luces-encendidas {
  background: rgba(255, 170, 0, 0.15);
  border-color: #ffaa00;
  box-shadow:
    0 0 15px rgba(255, 170, 0, 0.4),
    inset 0 0 10px rgba(255, 170, 0, 0.2);
  color: #fff;
  text-shadow: 0 0 5px #ffaa00;
}

body.iluminacion-manual .faro-lateral,
body.iluminacion-manual #contenedor-estelas {
  opacity: 0 !important;
  visibility: hidden !important;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

[data-theme="dark"] .lugar-card.efecto-up-lighting {
  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.8),
    0 0 35px rgba(255, 170, 0, 0.4),
    0 -60px 90px rgba(255, 170, 0, 0.35),
    inset 0 0 40px rgba(255, 170, 0, 0.2),
    inset 0 -50px 60px rgba(255, 170, 0, 0.3) !important;
  transform: translateY(-3px);
}
[data-theme="dark"] .lugar-card.efecto-up-lighting .lugar-info {
  background: linear-gradient(
    to top,
    rgba(255, 170, 0, 0.2) 0%,
    rgba(20, 25, 38, 0.8) 60%
  );
}

[data-theme="dark"] .footer-ayuntamiento {
  background: rgba(22, 12, 5, 0.85);
  border-top: 1px solid rgba(255, 170, 0, 0.2);
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .footer-ayuntamiento.efecto-up-lighting-footer {
  border: 2px solid rgba(255, 170, 0, 0.9) !important;
  animation: resplandorFooterFarola 3s infinite alternate ease-in-out;
}
[data-theme="dark"] .footer-ayuntamiento.efecto-up-lighting-footer h4,
[data-theme="dark"] .footer-ayuntamiento.efecto-up-lighting-footer p,
[data-theme="dark"] .footer-ayuntamiento.efecto-up-lighting-footer a,
[data-theme="dark"] .footer-ayuntamiento.efecto-up-lighting-footer i {
  color: #fff !important;
  text-shadow: 0 0 8px rgba(255, 200, 0, 0.8);
}
[data-theme="dark"]
  .footer-ayuntamiento.efecto-up-lighting-footer
  .vandev-credito
  a {
  text-shadow: 0 0 15px rgba(255, 149, 0, 1) !important;
}

@keyframes resplandorFooterFarola {
  0% {
    box-shadow:
      0 -40px 80px rgba(255, 170, 0, 0.25),
      0 0 40px rgba(255, 170, 0, 0.2),
      inset 0 0 50px rgba(255, 170, 0, 0.15);
  }
  100% {
    box-shadow:
      0 -90px 140px rgba(255, 170, 0, 0.5),
      0 0 90px rgba(255, 170, 0, 0.4),
      inset 0 0 100px rgba(255, 170, 0, 0.3);
  }
}

/* =========================================================================
   11. BRILLO PARA EL BOTÓN SUBIR EN MODO OSCURO
   ========================================================================= */
[data-theme="dark"] .btn-home-circular {
  box-shadow:
    0 0 20px rgba(90, 200, 250, 0.5),
    inset 0 0 10px rgba(90, 200, 250, 0.2) !important;
  border-color: rgba(90, 200, 250, 0.4) !important;
}
[data-theme="dark"] .btn-home-circular:hover {
  box-shadow:
    0 0 30px rgba(90, 200, 250, 0.8),
    inset 0 0 15px rgba(90, 200, 250, 0.4) !important;
  transform: translateY(-4px) scale(1.05);
}

/* =========================================================================
   12. MODO ANTIGUO (ESTILO COLONIAL / SEPIA)
   ========================================================================= */
body.modo-antiguo {
  background-color: #f4ecd8 !important;
  color: #4e342e !important;
}
body.modo-antiguo .navbar,
body.modo-antiguo .footer-ayuntamiento,
body.modo-antiguo .lugar-card,
body.modo-antiguo .lugar-info,
body.modo-antiguo .search-bar input,
body.modo-antiguo .sugerencias-dropdown,
body.modo-antiguo .detalle-container,
body.modo-antiguo #test-escolar-container {
  background-color: rgba(244, 236, 216, 0.85) !important;
  border-color: #d7ccc8 !important;
  color: #3e2723 !important;
  box-shadow: 0 4px 15px rgba(62, 39, 35, 0.1) !important;
}
body.modo-antiguo img,
body.modo-antiguo .hero-media,
body.modo-antiguo .foto-intercalada {
  filter: sepia(0.8) contrast(1.1) grayscale(0.3) brightness(0.9) !important;
}
body.modo-antiguo .foto-intercalada,
body.modo-antiguo .swiper-slide {
  border-color: #8d6e63 !important;
}
body.modo-antiguo .filter-btn,
body.modo-antiguo .btn-icon-circular,
body.modo-antiguo .lang-switch {
  background-color: #efebe0 !important;
  border-color: #d7ccc8 !important;
  color: #5d4037 !important;
}
body.modo-antiguo .filter-btn:hover,
body.modo-antiguo .btn-icon-circular:hover {
  background-color: #d7ccc8 !important;
  color: #3e2723 !important;
}
body.modo-antiguo .filter-btn.active,
body.modo-antiguo .btn-primary {
  background-color: #8d6e63 !important;
  border-color: #5d4037 !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(93, 64, 55, 0.4) !important;
}
body.modo-antiguo .text-muted,
body.modo-antiguo p,
body.modo-antiguo .desc-normal,
body.modo-antiguo i.fas:not(.active) {
  color: #6d4c41 !important;
}
body.modo-antiguo h1,
body.modo-antiguo h2,
body.modo-antiguo h3 {
  color: #3e2723 !important;
}

/* =========================================================================
   13. HERO FULLSCREEN, FOTOS INTERCALADAS Y SWIPER (seccion.php)
   ========================================================================= */

/* Hero Video/Imagen Fullscreen */
.hero-fullscreen {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  margin-top: -85px; /* Compensa la navbar transparente */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: #000;
}

.hero-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.85;
  animation: suaveZoom 20s infinite alternate ease-in-out;
}

@keyframes suaveZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}

.hero-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.7) 40%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 2;
}

.hero-title-container {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 20px 60px 20px;
  width: 100%;
  max-width: 900px;
}

.hero-title-container h1 {
  color: #ffffff;
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  letter-spacing: -1px;
}

.btn-back-hero {
  position: absolute;
  top: 100px;
  left: 20px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-back-hero:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Fotos Intercaladas en la Historia */
.foto-intercalada {
  width: 100%;
  max-width: 350px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: 3px solid var(--glass-border);
  margin: 20px auto;
  display: block;
  cursor: pointer;
  transition: transform 0.4s;
}

.foto-intercalada:hover {
  transform: scale(1.03);
  border-color: var(--primary);
}

@media (min-width: 768px) {
  .foto-intercalada {
    float: left;
    margin: 10px 25px 15px 0;
  }
  .foto-intercalada:nth-of-type(even) {
    float: right;
    margin: 10px 0 15px 25px;
  }
}

/* Apple-style Botones Premium */
.botones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin: 30px 0;
}

.btn-detalle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 16px 25px;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: none;
  color: white !important;
}

.btn-detalle:hover {
  transform: translateY(-4px) scale(1.02);
}

.btn-audio {
  background: linear-gradient(135deg, #ff2d55, #ff375f);
  box-shadow: 0 8px 20px rgba(255, 45, 85, 0.3);
}
.btn-audio:hover {
  box-shadow: 0 12px 25px rgba(255, 45, 85, 0.5);
}
.btn-audio.reproduciendo {
  background: #333;
  animation: pulseGlow 1.5s infinite;
}

.btn-compartir {
  background: linear-gradient(135deg, #af52de, #bf5af2);
  box-shadow: 0 8px 20px rgba(175, 82, 222, 0.3);
}
.btn-compartir:hover {
  box-shadow: 0 12px 25px rgba(175, 82, 222, 0.5);
}

.btn-maps {
  background: linear-gradient(135deg, #34c759, #30d158);
  box-shadow: 0 8px 20px rgba(52, 199, 89, 0.3);
  margin-top: 20px;
  width: 100%;
}
.btn-maps:hover {
  box-shadow: 0 12px 25px rgba(52, 199, 89, 0.5);
}

.btn-nochisgo {
  background: linear-gradient(135deg, #ff9500, #ffcc00);
  box-shadow: 0 8px 20px rgba(255, 149, 0, 0.3);
  margin-top: 15px;
  width: 100%;
}
.btn-nochisgo:hover {
  box-shadow: 0 12px 25px rgba(255, 149, 0, 0.5);
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 45, 85, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 45, 85, 0);
  }
}

/* Swiper.js Premium Carousel */
.premium-carousel-container {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--glass-border);
}

.swiper {
  width: 100%;
  padding-top: 30px;
  padding-bottom: 50px;
}

.swiper-slide {
  background-position: center;
  background-size: cover;
  width: 320px;
  height: 380px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--glass-border);
  cursor: pointer;
}

.swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--primary);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 1.2rem;
  font-weight: bold;
}

.swiper-pagination-bullet {
  background: var(--text-muted);
  opacity: 0.6;
}
.swiper-pagination-bullet-active {
  background: var(--primary);
  opacity: 1;
  transform: scale(1.3);
}

/* Ocultar el botón de la bitácora por defecto en toda la plataforma */
.btn-bitacora {
  display: none !important;
}

/* Mostrar el botón SOLO cuando el body tiene la clase 'modo-escolar' */
body.modo-escolar .btn-bitacora {
  display: inline-flex !important; /* Cambia a 'block' si no usas flexbox */
}