
/* Reservar espacio para el hero slider */
.hero-slider { 
  height: 100vh; 
  min-height: 600px; 
  background: #000;
}

/* Prevenir salto de fuentes */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Reservar espacio para iconos antes de cargar icofont */
.icofont-ticket::before,
.icofont-calendar::before,
.icofont-google-map::before,
.icofont-heart::before,
.icofont-gift::before,
.icofont-file-document::before,
.icofont-institution::before,
.icofont-education::before,
.icofont-info-circle::before {
  display: inline-block;
  width: 1em;
  height: 1em;
  content: '';
}

/* Skeleton para cards de eventos */
.card-img-top {
  background: #e0e0e0;
  min-height: 220px;
}

/* Prevenir CLS en botones */
.btn {
  min-height: 38px;
}

.btn-lg {
  min-height: 48px;
}
/* Estabilizar el logo para evitar saltos de diseño */
#logo-teatro {
    width: 250px !important;
    height: auto !important;
    aspect-ratio: 1 / 1; /* Mantiene la proporción 250x250 */
    display: block;
    min-height: 250px; /* Reserva el espacio vertical */
}

/* Si en móviles el logo es más pequeño, usa un Media Query */
@media (max-width: 768px) {
    #logo-teatro {
        width: 150px !important;
        min-height: 150px;
    }
}

/* ---- HEADER SUPERIOR MOBILE ---- */
#mobile-top-header {
  display: none;
}
@media (max-width:991px) {
  #mobile-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    padding: 0 17px 0 13px;
    position: fixed;
    top: 0;
    left: 0; right: 0;
    width: 100vw;
    z-index: 1300;
    background: rgba(255,255,255,0.77);
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 22px 0 rgba(30,30,40,0.10);
    border-bottom: 1px solid rgba(170,170,170,0.06);
    transition: background 0.22s;
  }
  #mobile-logo {
    height: 54px;
    width: auto;
    max-width: 132px;
    margin: 2px 0;
    object-fit: contain;
    transition: filter 0.20s, height 0.12s, max-width 0.12s;
  }
  #mobile-menu-btn {
    font-size: 2.38rem;
    background: none;
    border: none;
    box-shadow: none;
    color: #222a31;
    padding: 2px 10px 2px 2px;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    z-index: 1301;
    transition: background 0.13s;
  }
  #mobile-menu-btn:active, #mobile-menu-btn:focus {
    background: #ebe8e8;
  }
  body { padding-top: 70px; }
}
/* ANIMACIÓN CRECER LOGO EN MENÚ DESPLEGADO */
#mobile-sidebar-menu .big-menu-logo {
  width: 120px !important;
  height: 120px !important;
  margin: 35px auto 26px auto !important;
  display: block;
  object-fit: contain;
  transition: width 0.18s, height 0.18s;
}

/* -------- OFFCANVAS SIDEBAR - MEJORADO -------- */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: -90vw;
  width: 90vw;
  max-width: 375px;
  min-width: 240px;
  height: 100vh;
  background: rgba(255,255,255,0.98);
  color: #222a31;
  box-shadow: 2px 0 22px rgba(0,0,0,0.22);
  padding: 0;
  z-index: 1402;
  transition: left 0.32s cubic-bezier(.56,.01,.33,1.12);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mobile-sidebar.open { left: 0; }
.mobile-sidebar button#close-sidebar {
  position: absolute;
  top: 9px;
  right: 18px;
  font-size: 2.3rem;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  z-index: 10;
}
.mobile-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
.mobile-sidebar ul li {
  margin: 0;
  width:100%;
}
.mobile-sidebar ul li a {
  color: #222a31;
  text-decoration: none;
  font-size: 1.13rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 16px 25px 16px 27px;
  gap: 18px;
  border-radius: 10px 0 0 10px;
  transition: background 0.18s, color 0.16s;
  width: 100%;
}
.mobile-sidebar ul li a:hover {
  background: #f7f5f5;
  color: #008ac4;
}
.mobile-sidebar .menu-flotante-icon {
  width: 42px; height: 42px;
  display: flex; align-items:center; justify-content: center;
  flex-shrink: 0;
}
.mobile-sidebar .menu-flotante-icon img {
  width: 2.15rem;
  height: 2.15rem;
}
/* Fondo oscuro al desplegar sidebar */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(50,55,70,0.17);
  z-index: 1400;
  transition: opacity 0.16s;
}
.sidebar-backdrop.open { display:block; }
@media (min-width:992px) {
  #mobile-top-header, #mobile-sidebar-menu, #sidebar-backdrop { display: none !important; }
  body { padding-top: initial; }
}
/* ------ OCULTAR MENÚ FLOTANTE (DESKTOP) EN MÓVIL ------ */
@media (max-width: 991px) {
  .menu-flotante-area {
    display: none !important;
  }
}
/* Estilos originales menú lateral desktop... */
.menu-flotante-area {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.menu-flotante-panel {
  border-radius: 16px 0 0 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  width: 56px;
  transition: width 0.3s cubic-bezier(.4,0,.2,1), background 0.3s;
  overflow: hidden;
  padding: 0;
  border: 1px solid #222a31;
}
.menu-flotante-panel.menu-flotante-dark {
  background: #222a31;
  border-color: #222a31;
}
.menu-flotante-panel.menu-flotante-light {
  background: #fff;
  border-color: #eee;
}
.menu-flotante-area:hover .menu-flotante-panel,
.menu-flotante-area:focus-within .menu-flotante-panel {
  width: 350px;
}
.menu-flotante-list {
  list-style: none;
  margin: 0;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.menu-flotante-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 18px 10px 12px;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
}
.menu-flotante-item:hover {
  background: rgba(0,0,0,0.12);
}
.menu-flotante-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-flotante-text {
  opacity: 0;
  width: 0;
  pointer-events: none;
  transition: opacity 0.25s, width 0.3s;
  white-space: nowrap;
  color: inherit;
}
.menu-flotante-area:hover .menu-flotante-text,
.menu-flotante-area:focus-within .menu-flotante-text {
  opacity: 1;
  width: auto;
  pointer-events: auto;
  margin-left: 0;
}
.menu-flotante-text .only-desktop { display: inline; }
.menu-flotante-text .only-mobile { display: none; }
#logo-header {
  background-color: transparent !important;
}
/* --------- DARK MODE --------- */
body.dark #mobile-top-header {
  background: rgba(28,33,43,0.92) !important;
  color: #f3f3f3 !important;
  border-bottom: 1px solid rgba(0,0,0,0.10) !important;
}
body.dark .mobile-sidebar {
  background: rgba(28,33,43,0.98) !important;
  color: #f3f3f3 !important;
}
body.dark .mobile-sidebar ul li a,
body.dark .mobile-sidebar button#close-sidebar {
  color: #e9e9e9 !important;
}
body.dark .mobile-sidebar ul li a:hover {
  background: #1f2230 !important;
  color: #27a6ff !important;
}
@media (max-width: 767.98px) {
  .container, .container-fluid, .footer-inner, .social-bar {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}


@media (max-width: 768px) {
  .social-bar {
    padding-bottom: 1rem;
  }
  .social-icons-inline {
    display: block !important;
  }
  .social-text {
    display: block;
    margin-bottom: 0.5rem;
  }
}
/* 3) Quitar transparencia del header sticky móvil */
@media (max-width: 991px) {
  #mobile-top-header{
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  body.dark #mobile-top-header{
    background: #1c212b !important;
  }
}

/* 1) Items del sidebar más pequeños */
@media (max-width: 991px) {
  .mobile-sidebar ul li a{
    font-size: 0.98rem !important;
    padding: 12px 18px 12px 18px !important;
    gap: 12px !important;
  }
  .mobile-sidebar .menu-flotante-icon{
    width: 34px !important;
    height: 34px !important;
  }
  .mobile-sidebar .menu-flotante-icon img{
    width: 1.6rem !important;
    height: 1.6rem !important;
  }
  .mobile-sidebar .menu-flotante-icon i{
    font-size: 1.5rem !important;
  }
}

/* 2) Scroll interno en el sidebar */
@media (max-width: 991px) {
  .mobile-sidebar{
    overflow: hidden;
  }
  .mobile-sidebar ul{
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 200px) !important;
    padding-bottom: 16px !important;
  }
  .mobile-sidebar ul::-webkit-scrollbar{ width: 8px; }
  .mobile-sidebar ul::-webkit-scrollbar-thumb{
    background: rgba(0,0,0,0.18);
    border-radius: 10px;
  }
  body.dark .mobile-sidebar ul::-webkit-scrollbar-thumb{
    background: rgba(255,255,255,0.22);
  }
}

/* Ajustes personalizados para mejorar la legibilidad y el fondo */
.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem !important;
    }
    .hero-content p {
        font-size: 1rem !important;
    }
    .carousel-caption {
        padding-bottom: 80px !important;
    }
}

/* Hero simple coherente con términos y condiciones */
.hero-simple {
    background: #0e3755;
    color: #ffffff;
    padding: 15px 0 5px 0;
}
.hero-simple h1 {
    font-weight: 700;
    margin-bottom: 10px;
}
.hero-simple p {
    margin-bottom: 0;
    opacity: 0.9;
}

/* HERO SECTIONS Y OVERLAYS */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-text-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 3rem 2rem;
}

/* CARDS Y EVENTOS */
.card {
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.card-body i {
  transition: transform 0.3s ease;
}

.card:hover .card-body i {
  transform: scale(1.1);
}

.event-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.event-card-abadia {
  transition: all 0.3s ease;
  cursor: pointer;
}

.event-card-abadia:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
}

.event-card-abadia .btn {
  transition: all 0.3s ease;
}

.event-card-abadia:hover .btn {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* BOTONES Y INTERACCIONES */
.btn {
  transition: all 0.3s ease;
}

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

.btn:focus,
.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* ACCORDION */
.accordion-button:not(.collapsed) {
  background-color: var(--bs-primary);
  color: white;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: var(--bs-primary);
}

/* UTILIDADES */
.bg-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.rounded-3 {
  border-radius: 1rem !important;
}

/* ANIMACIONES */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.6s ease-out;
}

/* MENÚ FLOTANTE */
.menu-float-item {
  transition: all 0.3s ease;
}

.menu-float-item:hover {
  background-color: rgba(108, 117, 125, 0.15) !important;
  transform: translateX(-5px);
}

/* Menú flotante - hover solo en modo oscuro */
@media (prefers-color-scheme: dark) {
  .menu-float-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
  }
}

/* BOTÓN FLOTANTE DE TEMA */
#theme-float-btn {
  position: fixed;
  right: 24px;
  bottom: 32px;
  z-index: 9999;
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
  border: 1px solid #dee2e6;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#theme-float-btn:hover {
  background: var(--bs-primary, #0d6efd);
  color: #fff;
}

#theme-float-btn i {
  font-size: 1.2rem;
  margin-right: 8px;
}

/* ICONOS SOCIALES */
.social-icon {
  padding: 12px !important;
  transition: all 0.3s ease;
  cursor: pointer;
}

.social-icon-link {
  text-decoration: none;
}

.social-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.social-icon.instagram-icon:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
  color: white !important;
}

.social-icon.facebook-icon:hover {
  background-color: #1877f2 !important;
  color: white !important;
}

.social-icon.youtube-icon:hover {
  background-color: #ff0000 !important;
  color: white !important;
}

.social-icon.twitter-icon:hover {
  background-color: #0c0c0cff !important;
  color: white !important;
}

.social-icon.whatsapp-icon:hover {
  background-color: #25d366 !important;
  color: white !important;
}

.social-icon.linkedin-icon:hover {
  background-color: #0077b5 !important;
  color: white !important;
}

.social-icon.telegram-icon:hover {
  background-color: #0088cc !important;
  color: white !important;
}

.social-icon.tiktok-icon:hover {
  background-color: #000000 !important;
  color: white !important;
}

/* RESPONSIVE ADICIONAL */
@media (max-width: 768px) {
  .display-5 {
    font-size: 2rem;
  }
  
  .display-6 {
    font-size: 1.75rem;
  }
  
  .hero-section {
    height: 70vh;
  }

  .event-card-abadia {
    min-height: 200px !important;
  }

  #theme-float-btn {
    right: 12px;
    bottom: 16px;
    padding: 10px 14px;
  }
  
  #theme-float-btn span {
    display: none;
  }
}

@media (max-width: 576px) {
  .hero-content {
    padding: 2rem 1rem;
  }
}

/* ESTILOS PARA SECCIONES DE EVENTOS CON SCROLL REVEAL */
.event-section {
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

.event-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
  z-index: 1;
}

.event-content {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 600px;
  padding: 0 2rem;
  margin-top: 150px;
  transform: translateY(50px);
  opacity: 0;
  transition: all 0.8s ease;
}

.event-section.visible .event-content {
  transform: translateY(0);
  opacity: 1;
}

.event-tag {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-title {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.event-description {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  font-style: italic;
}

.event-date {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
  letter-spacing: 1px;
}

.event-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-comprar {
  background: #dc3545;
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 20px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  font-size: 0.9rem;
}

.btn-comprar:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(220, 53, 69, 0.3);
  color: white;
}

.btn-info {
  background: transparent;
  color: white;
  padding: 0.8rem 1.5rem;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  font-size: 0.9rem;
}

.btn-info:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
  color: white;
}

.event-card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
}

.bg-gradient-dark {
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
}

.event-card-hover .card-img-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.event-card-hover:hover .card-img-overlay {
  opacity: 1;
}

/* ENLACES MODERNOS Y NAVEGACIÓN */
.modern-link {
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(5px);
}

.modern-link:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.modern-link:hover .icofont-rounded-right {
  transform: translateX(5px);
}

.modern-link .icofont-rounded-right {
  transition: transform 0.3s ease;
}

/* EFECTOS Y ANIMACIONES PARA EL DIRECTORIO */
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.badge {
  transition: all 0.3s ease;
}

.badge:hover {
  transform: scale(1.05);
}

/* EVENTOS Z-INDEX */
.event-section {
    position: relative;
    z-index: 1;
}

.event-section .event-overlay {
    z-index: 2;
}

.event-section .event-content {
    position: relative;
    z-index: 3;
}

#btn-menu-flotante {
    z-index: 9998 !important;
}

#menu-flotante {
    z-index: 9999 !important;
}

.menu-float-item:hover {
    background-color: var(--bs-secondary-bg) !important;
}

/* ADAPTACIONES TEMA */
.intro-overlay { background-color: rgba(0,0,0,0.25); border-radius: .5rem; }
.muted-adapt { color: rgba(0,0,0,0.65); }
.img-theme-filter { transition: filter .25s ease; border-radius: .5rem; display:block; }

html[data-bs-theme="dark"] .intro-overlay { background-color: rgba(255,255,255,0.04); }
html[data-bs-theme="dark"] .muted-adapt { color: rgba(255,255,255,0.6); }
html[data-bs-theme="dark"] .img-theme-filter { filter: brightness(.9) saturate(.9); }

/* ACTION BUTTONS Y HOVER LIFT */
.action-buttons .btn-group .btn {
    margin-right: 5px;
    margin-bottom: 10px;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-underline {
    height: 4px;
    width: 80px;
    margin: 0 auto;
    border-radius: 2px;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
}

/* MODO DARK - MEJORAS */
[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-dark) !important;
    color: var(--bs-light) !important;
}

[data-bs-theme="dark"] .navbar-light {
    background-color: var(--bs-dark) !important;
}

/* JUSTIFICACIÓN Y CATEGORÍAS */
p { text-align: justify; }

.text-pink { color: #e91e63 !important; }
.text-purple { color: #9c27b0 !important; }
.text-teal { color: #009688 !important; }
.text-orange { color: #ff9800 !important; }

.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* Hover lift sin JavaScript - reemplaza onmouseover/onmouseout */
.card-hover-lift {
    transition: transform 0.3s ease !important;
}
.card-hover-lift:hover {
    transform: translateY(-5px) !important;
}
