@import "tailwindcss";

:root {
  --font-serif: "EB Garamond", serif;
  --font-sans: "Outfit", sans-serif;
  --color-primary: hsl(135, 38%, 14%);
  --color-primary-light: hsl(135, 20%, 93%);
  --color-secondary: hsl(24, 46%, 32%);
  --color-secondary-light: hsl(24, 35%, 95%);
  --color-accent: hsl(22, 76%, 46%);
  --color-accent-hover: hsl(22, 85%, 38%);
  --color-bg-base: hsl(36, 30%, 97%);
  --color-text-main: hsl(135, 45%, 8%);
  --color-text-muted: hsl(135, 12%, 40%);
  --shadow-organic: 0 10px 30px -10px hsla(135, 40%, 10%, 0.08), 0 1px 3px hsla(135, 40%, 10%, 0.03);
  --shadow-hover: 0 20px 40px -15px hsla(24, 50%, 20%, 0.15);
  --shadow-premium: 0 28px 70px -32px hsla(135, 40%, 8%, 0.34);
  --surface-warm: hsla(36, 36%, 98%, 0.92);
  --surface-line: hsla(135, 30%, 16%, 0.1);
  --motion-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

@theme {
  /* Design Tokens for Doña Rita */
  --font-serif: "EB Garamond", serif;
  --font-sans: "Outfit", sans-serif;

  --color-primary: hsl(135, 38%, 14%);
  --color-primary-light: hsl(135, 20%, 93%);
  --color-secondary: hsl(24, 46%, 32%);
  --color-secondary-light: hsl(24, 35%, 95%);
  --color-accent: hsl(22, 76%, 46%);
  --color-accent-hover: hsl(22, 85%, 38%);
  --color-bg-base: hsl(36, 30%, 97%);
  --color-text-main: hsl(135, 45%, 8%);
  --color-text-muted: hsl(135, 12%, 40%);
  
  --shadow-organic: 0 10px 30px -10px hsla(135, 40%, 10%, 0.08), 0 1px 3px hsla(135, 40%, 10%, 0.03);
  --shadow-hover: 0 20px 40px -15px hsla(24, 50%, 20%, 0.15);
  
  --radius-bento: 24px;
  --radius-button: 12px;
  
  --animate-shimmer: shimmer 2.5s infinite linear;
  --animate-float: float 6s ease-in-out infinite;
  
  @keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  }
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }
}

@layer base {
  body {
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
  }
  
  /* Smooth scroll behavior */
  html {
    scroll-behavior: smooth;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(17, 39, 22, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 39, 22, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 86%, transparent);
}

header.glass-card {
  background: rgba(249, 246, 240, 0.86);
  border-bottom: 1px solid rgba(17, 39, 22, 0.08);
  box-shadow: 0 18px 48px -38px rgba(17, 39, 22, 0.42);
}

header nav a {
  position: relative;
  padding-block: 0.35rem;
}

header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.15rem;
  height: 2px;
  border-radius: 999px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

header nav a:hover::after {
  transform: scaleX(1);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section-kicker::before {
  content: "";
  width: 1.65rem;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.primary-action,
.secondary-action {
  min-height: 3.25rem;
  border-radius: 1rem;
  transform: translateZ(0);
}

.primary-action {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover)) !important;
  color: #ffffff !important;
  box-shadow: 0 22px 38px -22px rgba(139, 54, 18, 0.7);
}

.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 46px -24px rgba(139, 54, 18, 0.78);
}

.secondary-action {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@layer utilities {
  /* Custom glassmorphism classes */
  .glass-card {
    background: rgba(249, 246, 240, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(17, 39, 22, 0.08);
  }
  
  .glass-dark {
    background: rgba(17, 39, 22, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(249, 246, 240, 0.1);
  }
  
  /* Premium text contrast improvements */
  .text-premium-dark {
    color: var(--color-text-main);
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }
  
  .text-premium-light {
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.15);
  }
  
  /* Enhanced video card styling */
  .video-card-enhanced {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .video-card-enhanced:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.15);
  }
  
  .video-card-enhanced:hover iframe {
    filter: brightness(1.05);
  }

  /* Enhanced text contrast and shadow for white text on dark backgrounds */
  .drop-shadow-sm {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  }

  .drop-shadow-md {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  }

  .drop-shadow-lg {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
  }

  /* Enhanced text with background for maximum contrast */
  .text-highlight-dark {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
  }

  /* Enhanced footer links styling */
  .footer-link {
    position: relative;
    transition: color 0.3s ease;
  }

  .footer-link:hover {
    color: var(--color-accent);
  }

  /* Social icons enhancement */
  .social-icon-hover {
    display: inline-block;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
  }

  .social-icon-hover:hover {
    transform: scale(1.15);
    text-shadow: 0 0 10px rgba(208, 83, 30, 0.4);
  }
}

/* Custom styles for animations and sliders */
.bento-card-hover {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(208, 83, 30, 0.25);
}

.hero-copy-panel {
  max-width: 46rem;
}

.hero-badge {
  color: #fff7ef !important;
  background: rgba(208, 83, 30, 0.22) !important;
  border: 1px solid rgba(255, 214, 182, 0.34) !important;
  box-shadow: 0 18px 42px -26px rgba(0, 0, 0, 0.65);
}

.hero-feature-grid {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 1.25rem;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255, 247, 239, 0.86);
}

.hero-feature-icon,
.experience-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
}

.hero-feature-icon {
  width: 2.2rem;
  height: 2.2rem;
  color: #fff7ef;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-feature-icon svg,
.experience-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.experience-picker {
  background: rgba(255, 252, 246, 0.94) !important;
  border-color: rgba(17, 39, 22, 0.08) !important;
  box-shadow: 0 24px 70px -34px rgba(17, 39, 22, 0.42);
}

.experience-option {
  position: relative;
  min-height: 9.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: var(--color-primary) !important;
  background-position: center;
  background-size: cover;
  border: 1px solid rgba(17, 39, 22, 0.12) !important;
  text-align: left;
  box-shadow: 0 18px 42px -28px rgba(17, 39, 22, 0.5);
  transition: transform 0.28s var(--motion-smooth), box-shadow 0.28s ease, border-color 0.28s ease;
}

.experience-option::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(17, 39, 22, 0.06) 0%, rgba(17, 39, 22, 0.28) 42%, rgba(17, 39, 22, 0.82) 100%),
    radial-gradient(circle at 20% 10%, rgba(255, 252, 246, 0.18), transparent 34%);
  transition: background 0.28s ease;
}

.experience-option::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, rgba(255, 252, 246, 0.16), transparent 42%);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.experience-option-cabins {
  background-image: url("./1 cabanasa.jpg") !important;
}

.experience-option-tinas {
  background-image: url("./tinascalientes2.jpg") !important;
}

.experience-option-school {
  background-image: url("./paseo_curso_2.jpg") !important;
}

.experience-option-events {
  background-image: url("./eventos_3.jpg") !important;
}

.experience-option:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 252, 246, 0.62) !important;
  box-shadow: 0 28px 56px -30px rgba(17, 39, 22, 0.62);
}

.experience-option:hover::after {
  opacity: 1;
}

.experience-icon {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 1;
  width: 2.45rem;
  height: 2.45rem;
  color: #fff7ef;
  background: rgba(17, 39, 22, 0.42);
  border: 1px solid rgba(255, 252, 246, 0.28);
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.28s var(--motion-smooth), background 0.28s ease, color 0.28s ease;
}

.experience-option > span:not(.experience-icon) {
  position: relative;
  z-index: 1;
}

.experience-option > span.font-bold {
  color: #ffffff !important;
  font-size: 1rem;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.38);
}

.experience-option > span.text-xs {
  color: rgba(255, 247, 239, 0.86) !important;
  margin-top: 0.28rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.34);
}

.experience-option:hover .experience-icon {
  color: #ffffff;
  background: rgba(208, 83, 30, 0.82);
  transform: scale(1.06);
}

.premium-card {
  background: rgba(255, 252, 246, 0.94) !important;
  border: 1px solid rgba(17, 39, 22, 0.08) !important;
  box-shadow: var(--shadow-organic);
  transition: transform 0.34s var(--motion-smooth), box-shadow 0.34s ease, border-color 0.34s ease;
}

.premium-card:hover {
  transform: translateY(-5px);
  border-color: rgba(208, 83, 30, 0.24) !important;
  box-shadow: var(--shadow-premium);
}

.amenity-list li,
.amenity-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.amenity-list li::before,
.amenity-chip::before {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  flex: 0 0 0.48rem;
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(208, 83, 30, 0.1);
}

/* Slider custom slide transitions */
.slide-item {
  opacity: 0;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  pointer-events: none;
}

.slide-item.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* Custom background mesh */
.bg-mesh {
  background-color: var(--color-bg-base);
  background-image: 
    radial-gradient(at 0% 0%, hsla(135, 30%, 85%, 0.3) 0px, transparent 50%),
    radial-gradient(at 100% 0%, hsla(24, 30%, 85%, 0.3) 0px, transparent 50%),
    radial-gradient(at 50% 100%, hsla(135, 25%, 85%, 0.2) 0px, transparent 50%);
}

/* Reparacion de contraste: las imagenes claras de estas secciones ocultaban el texto blanco. */
#prensa,
#nosotros {
  color: var(--color-primary);
}

#prensa .text-center > span,
#prensa .text-center > h2,
#prensa .text-center > p,
#prensa > div > div:last-child > p,
#nosotros .space-y-6 > span,
#nosotros .space-y-6 > h2,
#nosotros .space-y-6 > p,
#nosotros .grid.grid-cols-3 span {
  color: var(--color-primary) !important;
  filter: none;
}

.prensa-cta-button {
  background: var(--color-accent) !important;
  color: #ffffff !important;
  border: 1px solid rgba(139, 54, 18, 0.2);
  box-shadow: 0 16px 32px -18px rgba(139, 54, 18, 0.55);
}

.prensa-cta-button:hover {
  background: var(--color-accent-hover) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

.tina-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10.5rem;
  min-height: 3rem;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover)) !important;
  color: #ffffff !important;
  border: 1px solid rgba(139, 54, 18, 0.28);
  box-shadow: 0 18px 34px -20px rgba(139, 54, 18, 0.72);
  text-shadow: 0 1px 1px rgba(17, 39, 22, 0.18);
}

.tina-cta-button:hover {
  background: var(--color-accent-hover) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 24px 42px -22px rgba(139, 54, 18, 0.82);
}

.media-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.media-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: #ffffff !important;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: 0 10px 18px -14px rgba(17, 39, 22, 0.55);
}

.media-chip-primary {
  background: var(--color-primary);
  border: 1px solid rgba(17, 39, 22, 0.2);
}

.media-chip-accent {
  background: var(--color-accent);
  border: 1px solid rgba(208, 83, 30, 0.22);
}

.media-chip-secondary {
  background: var(--color-secondary);
  border: 1px solid rgba(122, 70, 44, 0.22);
}

.eventos-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  background: var(--color-primary) !important;
  color: #ffffff !important;
  border: 1px solid rgba(17, 39, 22, 0.18);
  box-shadow: 0 16px 32px -18px rgba(17, 39, 22, 0.55);
}

.eventos-cta-button:hover {
  background: var(--color-secondary) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

.contact-icon-box {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.contact-icon-box svg {
  width: 1.35rem;
  height: 1.35rem;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#contact-form input,
#contact-form select,
#contact-form textarea {
  min-height: 3rem;
  border-color: rgba(17, 39, 22, 0.12) !important;
  background: rgba(249, 246, 240, 0.72) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

#contact-form textarea {
  min-height: 8.5rem;
  resize: vertical;
}

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
  border-color: rgba(208, 83, 30, 0.74) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(208, 83, 30, 0.12);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(208, 83, 30, 0.35);
  outline-offset: 3px;
}

button:disabled,
button.is-loading {
  cursor: wait;
  opacity: 0.78;
}

#nosotros .space-y-6 > p {
  font-size: 1rem;
  line-height: 1.75;
}

.nosotros-photo-stack {
  position: relative;
  min-height: 520px;
}

.nosotros-photo-card {
  position: absolute;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(17, 39, 22, 0.1);
  box-shadow: 0 24px 60px -24px rgba(17, 39, 22, 0.35);
  background: var(--color-bg-base);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  animation: premium-lift 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.nosotros-photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.nosotros-photo-card-main {
  inset: 0 4rem 7rem 0;
}

.nosotros-photo-card-secondary {
  right: 0;
  bottom: 0;
  width: 52%;
  aspect-ratio: 4 / 3;
  animation-delay: 160ms;
}

.nosotros-photo-stack:hover .nosotros-photo-card-main {
  transform: translateY(-6px);
  box-shadow: 0 32px 70px -28px rgba(17, 39, 22, 0.42);
}

.nosotros-photo-stack:hover .nosotros-photo-card-secondary {
  transform: translateY(-10px) translateX(-4px);
  box-shadow: 0 28px 65px -30px rgba(24, 24, 18, 0.42);
}

.nosotros-photo-stack:hover img {
  transform: scale(1.035);
}

.museum-preview-stack {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--color-primary-light);
}

.museum-preview-stack::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(249, 246, 240, 0.88), rgba(249, 246, 240, 0.62));
  z-index: 2;
}

.museum-preview-stack span {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.04);
  animation: museum-fade-cycle 12s infinite;
}

.museum-preview-stack span:nth-child(2) {
  animation-delay: 4s;
}

.museum-preview-stack span:nth-child(3) {
  animation-delay: 8s;
}

.group:hover .museum-preview-stack span {
  transform: scale(1.1);
}

.museum-modal-gallery {
  display: grid;
  gap: 0.85rem;
}

.museum-modal-image-wrap img {
  transition: opacity 0.28s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.museum-modal-image-wrap img.is-changing {
  opacity: 0;
  transform: scale(1.025);
}

.museum-thumb-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.museum-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--color-primary-light);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.museum-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.museum-thumb:hover,
.museum-thumb.active {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -16px rgba(17, 39, 22, 0.45);
}

.museum-thumb:hover img,
.museum-thumb.active img {
  transform: scale(1.06);
}

.events-experience-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(460px, 1.1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: stretch;
}

.events-mini-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 128px;
  gap: 0.85rem;
}

.events-mini-photo {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(17, 39, 22, 0.08);
  padding: 0;
  min-height: 96px;
  background: var(--color-primary-light);
  cursor: pointer;
  box-shadow: 0 14px 30px -24px rgba(17, 39, 22, 0.5);
  animation: gallery-memory-rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.events-mini-photo:nth-child(2) { animation-delay: 80ms; }
.events-mini-photo:nth-child(3) { animation-delay: 140ms; }
.events-mini-photo:nth-child(4) { animation-delay: 200ms; }
.events-mini-photo:nth-child(5) { animation-delay: 260ms; }

.events-mini-photo-featured {
  grid-row: span 2;
}

.events-mini-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.events-mini-photo:hover {
  transform: translateY(-3px);
  border-color: var(--color-accent);
  box-shadow: 0 22px 42px -26px rgba(17, 39, 22, 0.55);
}

.events-mini-photo:hover img {
  transform: scale(1.055);
  filter: saturate(1.06) contrast(1.03);
}

/* Reparacion de contraste del footer: asegura fondo oscuro al abrir el HTML localmente. */
footer {
  background-color: hsl(135, 38%, 14%) !important;
  background-image: none !important;
  color: #ffffff;
}

footer h3,
footer h4 {
  color: var(--color-accent) !important;
}

footer p,
footer li,
footer a,
footer .border-t span {
  color: var(--color-secondary-light) !important;
}

footer a:hover {
  color: var(--color-accent) !important;
}

/* --- Hero Video Background Styles --- */
.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Gradient multicapa: oscuro arriba para el texto, oscuro abajo para la transición */
  background:
    linear-gradient(
      135deg,
      rgba(10, 25, 14, 0.86) 0%,
      rgba(17, 39, 22, 0.64) 42%,
      rgba(17, 39, 22, 0.48) 68%,
      rgba(10, 18, 10, 0.82) 100%
    ),
    radial-gradient(circle at 72% 34%, rgba(255, 252, 246, 0.12), transparent 34%);
  z-index: 1;
}

.hero-video-container::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  z-index: 2;
  background: linear-gradient(to bottom, transparent, var(--color-bg-base));
  pointer-events: none;
}

/* --- Motion Design / Scroll Reveal --- */
.reveal-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Support for prefers-reduced-motion accessibility standard */
@media (prefers-reduced-motion: reduce) {
  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .bento-card-hover:hover {
    transform: none !important;
  }
  .hero-video {
    display: none !important;
  }
  .nosotros-photo-card,
  .nosotros-photo-card img {
    animation: none !important;
    transition: none !important;
  }
  .museum-preview-stack span {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .museum-preview-stack span:not(:first-child) {
    display: none;
  }
  .museum-modal-image-wrap img,
  .museum-thumb,
  .museum-thumb img {
    transition: none !important;
  }
  .events-mini-photo,
  .events-mini-photo img {
    animation: none !important;
    transition: none !important;
  }
  .gallery-memory-card {
    animation: none !important;
  }
  .primary-action:hover,
  .experience-option:hover,
  .premium-card:hover {
    transform: none !important;
  }
}

@media (max-width: 1023px) {
  .nosotros-photo-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: 0;
  }

  .nosotros-photo-card,
  .nosotros-photo-card-main,
  .nosotros-photo-card-secondary {
    position: relative;
    inset: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .events-experience-layout {
    grid-template-columns: 1fr;
  }

  .events-mini-gallery {
    grid-auto-rows: 140px;
  }
}

@media (max-width: 767px) {
  header > div:first-child {
    height: 4.5rem !important;
  }

  main section {
    scroll-margin-top: 5rem;
  }

  .hero-copy-panel {
    margin-inline: auto;
  }

  .hero-feature-grid {
    grid-template-columns: 1fr !important;
    max-width: 24rem;
  }

  .hero-feature {
    justify-content: flex-start;
    text-align: left;
  }

  .experience-picker {
    padding: 1rem !important;
    border-radius: 1.5rem !important;
  }

  .experience-option {
    min-height: 7.6rem;
    padding: 1rem !important;
  }

  .experience-icon {
    width: 2.55rem;
    height: 2.55rem;
  }

  .events-mini-gallery {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 112px;
  }

  .gallery-bento-grid {
    gap: 0.9rem;
  }

  .contact-icon-box {
    width: 2.75rem;
    height: 2.75rem;
    flex-basis: 2.75rem;
  }
}

/* Premium animation keyframes for enhanced experience */
@keyframes premium-lift {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes museum-fade-cycle {
  0% {
    opacity: 0;
    transform: scale(1.04);
  }
  8% {
    opacity: 1;
  }
  33% {
    opacity: 1;
    transform: scale(1.08);
  }
  42% {
    opacity: 0;
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes gallery-memory-rise {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes subtle-glow {
  0%, 100% {
    box-shadow: 0 10px 30px -10px hsla(135, 40%, 10%, 0.08), 0 1px 3px hsla(135, 40%, 10%, 0.03);
  }
  50% {
    box-shadow: 0 15px 40px -10px hsla(24, 50%, 20%, 0.12);
  }
}

.hover-glow {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-glow:hover {
  animation: subtle-glow 0.8s ease-in-out;
}

/* --- Bento / Masonry Gallery Custom Styles --- */
.gallery-bento-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
  grid-auto-flow: row;
  align-items: stretch;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--shadow-organic);
  min-height: 260px;
  isolation: isolate;
  transform: translateY(0) scale(1);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s ease;
  border: 1px solid rgba(17, 39, 22, 0.05);
}

.gallery-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 28px 58px -28px rgba(17, 39, 22, 0.45);
  border-color: var(--color-accent);
}

.gallery-memory-card {
  animation: gallery-memory-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.gallery-memory-card:nth-child(2) { animation-delay: 70ms; }
.gallery-memory-card:nth-child(3) { animation-delay: 140ms; }
.gallery-memory-card:nth-child(4) { animation-delay: 210ms; }
.gallery-memory-card:nth-child(5) { animation-delay: 280ms; }
.gallery-memory-card:nth-child(6) { animation-delay: 350ms; }
.gallery-memory-card:nth-child(7) { animation-delay: 420ms; }
.gallery-memory-card:nth-child(8) { animation-delay: 490ms; }
.gallery-memory-card:nth-child(9) { animation-delay: 560ms; }
.gallery-memory-card:nth-child(10) { animation-delay: 630ms; }
.gallery-memory-card:nth-child(11) { animation-delay: 700ms; }

.gallery-memory-card img {
  transform: scale(1.01);
  filter: saturate(0.98) contrast(1.02);
}

.gallery-memory-overlay {
  background:
    linear-gradient(180deg, rgba(17, 39, 22, 0) 0%, rgba(17, 39, 22, 0.78) 100%),
    radial-gradient(circle at 20% 20%, rgba(208, 83, 30, 0.18), transparent 36%);
}

@media (min-width: 640px) {
  .gallery-bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 300px;
  }

  .gallery-card {
    min-height: 0;
    height: 100%;
  }

  .gallery-item-wide,
  .gallery-item-tall {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (min-width: 1024px) {
  .gallery-bento-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 260px;
    gap: 1.25rem;
  }

  .gallery-item-wide {
    grid-column: span 2;
  }

  .gallery-item-tall {
    grid-row: span 2;
  }
}

/* --- Lightbox Custom Styles --- */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 20, 12, 0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 85%;
  display: flex;
  flex-col: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-caption {
  color: #fff;
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -3.5rem;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: var(--color-accent);
}

/* --- Accordion FAQ Cards --- */
.faq-item {
  border-radius: 16px;
  background: rgba(249, 246, 240, 0.6);
  border: 1px solid rgba(17, 39, 22, 0.05);
  transition: all 0.3s ease;
}

.faq-item:hover {
  background: rgba(249, 246, 240, 0.9);
  border-color: rgba(208, 83, 30, 0.15);
}

.faq-trigger {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
  padding: 0 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.faq-item.active .faq-content {
  padding-bottom: 1.25rem;
}

.faq-icon {
  transition: transform 0.3s ease;
  color: var(--color-accent);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* --- Mobile navigation drawer --- */
#mobile-menu.hidden {
  display: none !important;
}

@media (max-width: 767px) {
  .mobile-menu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: auto !important;
    z-index: 60;
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
    background: #fbf8f2;
    border-top: 1px solid rgba(17, 39, 22, 0.08);
    border-bottom: 1px solid rgba(17, 39, 22, 0.12);
    box-shadow: 0 18px 35px rgba(17, 39, 22, 0.18);
    overscroll-behavior: contain;
  }

  .mobile-menu-panel a {
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: 1rem;
    line-height: 1.25;
  }

  .mobile-menu-panel button {
    min-height: 52px;
  }
}
