/* ==========================================================================
   Exhibit Guide - Premium Museum Aesthetic Design System
   Holy Shrine of Imam Ali - Information Technology Center
   ========================================================================== */

:root {
  --bg: #11110e;
  --surface: #1b1a16;
  --surface-2: #24231e;
  --surface-translucent: rgba(27, 26, 22, 0.88);
  --ink: #f6f3ec;
  --ink-2: #aca69a;
  --ink-3: #7e776c;
  --line: #2d2c26;
  --line-strong: #3f3d35;
  --accent: #2eb673;
  --accent-hover: #3cd086;
  --accent-soft: rgba(46, 182, 115, 0.16);
  --gold: #d4b26f;
  --gold-hover: #e3c382;
  --gold-soft: rgba(212, 178, 111, 0.18);
  --gold-glow: rgba(212, 178, 111, 0.45);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px -6px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 48px -12px rgba(0, 0, 0, 0.8);
  --shadow-gold: 0 6px 22px -4px rgba(212, 178, 111, 0.3);

  --font-body:
    "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system,
    sans-serif;
  --font-title-ar:
    "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
  --font-title-en:
    "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-title: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;

  --scale: 1;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --transition: 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: calc(16px * var(--scale));
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition:
    background-color var(--transition),
    color var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--gold);
  color: #ffffff;
}

/* ==========================================================================
   Hero Top Bar (Language Dropdown, Slide Counter, Details Button)
   ========================================================================== */
.hero-top-bar {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  inset-inline: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.hero-top-bar > * {
  pointer-events: auto;
}

.hero-top-end-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Language Dropdown */
.lang-dropdown-wrap {
  position: relative;
}

.lang-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  background: rgba(18, 17, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition:
    background-color var(--transition),
    transform 0.15s,
    border-color var(--transition);
}

.lang-dropdown-btn:hover {
  background: rgba(46, 182, 115, 0.85);
  border-color: rgba(255, 255, 255, 0.45);
}

.lang-dropdown-btn:active {
  transform: scale(0.96);
}

.lang-dropdown-btn .lang-chevron-icon {
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.lang-dropdown-wrap.is-open .lang-dropdown-btn .lang-chevron-icon {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 7px);
  inset-inline-start: 0;
  min-width: 145px;
  padding: 6px;
  margin: 0;
  list-style: none;
  border-radius: var(--radius-md);
  background: rgba(20, 19, 15, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.96);
  transition:
    opacity 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
    visibility 0.2s;
}

.lang-dropdown-wrap.is-open .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition:
    background-color 0.15s,
    color 0.15s;
}

.lang-dropdown-item:hover,
.lang-dropdown-item:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.lang-dropdown-item.is-selected {
  color: var(--gold);
  font-weight: 600;
  background: rgba(185, 150, 83, 0.14);
}

.lang-dropdown-item .lang-check-icon {
  opacity: 0;
  color: var(--gold);
  transition: opacity 0.15s;
}

.lang-dropdown-item.is-selected .lang-check-icon {
  opacity: 1;
}

/* Details Badge / Button Over Image */
.hero-details-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  background: rgba(18, 17, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    transform 0.15s,
    color var(--transition);
}

.hero-details-badge:hover {
  background: rgba(46, 182, 115, 0.85);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.hero-details-badge:active {
  transform: scale(0.96);
}

.hero-details-badge svg {
  animation: pulseChevron 2.2s infinite ease-in-out;
}

@keyframes pulseChevron {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(2.5px);
  }
}

/* ==========================================================================
   Hero & Media Carousel Section
   ========================================================================== */
.hero-section {
  position: relative;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  animation: fadeIn 0.8s ease-out both;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 9/ 9;
  max-height: 540px;
  min-height: 240px;
  overflow: hidden;
  background: #0a0a08;
}

.carousel-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  touch-action: pan-y;
  will-change: transform;
}

.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a08;
  overflow: hidden;
}

.slide-media-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  overflow: hidden;
  background: #0a0a08;
}

.slide-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.4s ease-out;
}

.slide-media-wrap:hover img {
  transform: scale(1.025);
}

.zoom-hint-badge {
  position: absolute;
  bottom: 14px;
  inset-inline-start: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(10, 10, 8, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  opacity: 0.9;
  pointer-events: none;
  transition: opacity 0.25s;
}

/* Video Slide */
.video-slide-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0d0c0a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.video-slide-container:fullscreen,
.video-slide-container:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  background: #000000;
}

.video-slide-container:fullscreen .video-poster-canvas,
.video-slide-container:-webkit-full-screen .video-poster-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-slide-container:fullscreen .video-overlay-bar,
.video-slide-container:-webkit-full-screen .video-overlay-bar {
  padding-bottom: 24px;
}

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

.video-poster-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
}

.video-play-center-btn {
  position: absolute;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(14, 14, 12, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.2s,
    background-color 0.2s;
}

.video-play-center-btn:hover {
  transform: scale(1.08);
  background: rgba(28, 130, 81, 0.85);
  border-color: rgba(255, 255, 255, 0.6);
}

.video-play-center-btn.is-hidden {
  display: none;
}

.video-overlay-bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 12;
  padding: 30px 18px 20px;
  background: linear-gradient(
    to top,
    rgba(10, 10, 8, 0.92) 0%,
    rgba(10, 10, 8, 0.45) 55%,
    transparent 100%
  );
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.video-overlay-spacer {
  width: 42px;
  height: 42px;
  visibility: hidden;
  pointer-events: none;
  flex-shrink: 0;
}

.video-controls-center {
  display: flex;
  direction: rtl;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex: 1;
}

.video-bar-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background-color 0.2s,
    transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.2s,
    box-shadow 0.2s;
}

.video-bar-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.video-bar-btn:active {
  transform: scale(0.92);
}

.video-bar-play-btn {
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-hover) 100%
  );
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 20px rgba(28, 130, 81, 0.45);
}

.video-bar-play-btn:hover {
  background: linear-gradient(
    135deg,
    var(--accent-hover) 0%,
    var(--accent) 100%
  );
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(28, 130, 81, 0.6);
}

.video-skip-btn {
  font-family: var(--font-body);
}

.video-skip-num {
  position: absolute;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1;
  margin-top: 1px;
  letter-spacing: -0.02em;
}

/* Carousel UI Controls */
.carousel-counter-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: rgba(18, 17, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-translucent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  opacity: 0.92;
  transition:
    opacity 0.2s,
    transform 0.2s,
    background-color 0.2s;
}

.carousel-nav-btn:hover {
  opacity: 1;
  background: var(--surface);
  transform: translateY(-50%) scale(1.05);
}

.carousel-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-nav-prev {
  inset-inline-start: 12px;
}

.carousel-nav-next {
  inset-inline-end: 12px;
}

/* Hero Bottom Bar & Controls */
.hero-bottom-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* Dots & Caption Indicator */
.carousel-indicators-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px 16px 4px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  transition:
    width 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
    background-color 0.3s;
}

.carousel-dot.is-active {
  width: 24px;
  background: var(--gold);
  box-shadow: var(--shadow-gold);
}

/* ==========================================================================
   Exhibit Content Container
   ========================================================================== */
.main-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 170px;
}

/* Exhibit Title Only */
.exhibit-intro-section {
  padding: 34px 0 22px;
  text-align: center;
  animation: fadeUp 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.exhibit-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(34px, 8.8vw, 50px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}

/* Description / Paragraphs Section */
.about-section {
  padding-top: 24px;
  animation: fadeUp 0.7s 0.15s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.desc-header-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.about-scale-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    background-color var(--transition),
    border-color var(--transition),
    transform 0.15s;
}

.about-scale-btn:hover {
  background: var(--surface);
  border-color: var(--gold);
}

.about-scale-btn:active {
  transform: scale(0.95);
}

.about-scale-btn .scale-btn-text {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.about-scale-btn .scale-btn-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.desc-content-wrapper {
  position: relative;
}

.desc-paragraph {
  margin: 0 0 1.35em;
  font-size: calc(16.5px * var(--scale));
  line-height: 1.95;
  color: var(--ink-2);
  text-align: justify;
  text-justify: inter-word;
  text-wrap: pretty;
}

/* ==========================================================================
   Footer
   ========================================================================== */
#img-footer,
.site-footer {
  margin-top: 48px;
  padding: 38px 0 28px;
  border-top: 1px solid var(--line);
  text-align: center;
  animation: fadeIn 0.8s 0.25s both;
}

#img-footer img,
.footer-logo {
  display: block;
  margin: 0 auto;
  width: min(280px, 75%);
  height: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
  transition: opacity 0.3s;
}

.footer-dept-text {
  margin: 18px 0 0;
  font-size: 13.5px;
  letter-spacing: 0.03em;
  color: var(--ink-2);
  font-weight: 500;
}

/* ==========================================================================
   Audio Guide Player (Sticky Bottom Floating Bar)
   ========================================================================== */
.audio-player-fixed-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface-translucent);
  backdrop-filter: saturate(1.5) blur(18px);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08);
  transition:
    background-color var(--transition),
    border-color var(--transition);
}

.audio-player-inner {
  max-width: 760px;
  margin: 0 auto;
}

.audio-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
}

.audio-time-label {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  min-width: 38px;
  user-select: none;
}

.audio-time-label.time-end {
  text-align: end;
}

.audio-slider-wrap {
  position: relative;
  flex: 1 1 auto;
  height: 26px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.audio-slider-bg {
  width: 100%;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--line);
}

.audio-slider-fill {
  position: absolute;
  inset-inline-start: 0;
  height: 4px;
  width: 0%;
  border-radius: var(--radius-pill);
  background: var(--accent);
  pointer-events: none;
}

.audio-slider-thumb {
  position: absolute;
  inset-inline-start: 0%;
  width: 13px;
  height: 13px;
  margin-inline-start: -6.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  transition: transform 0.15s;
}

.audio-slider-wrap:hover .audio-slider-thumb {
  transform: scale(1.25);
}

.audio-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

.audio-rate-btn {
  min-width: 52px;
  height: 42px;
  padding: 0 8px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  transition:
    background-color var(--transition),
    color var(--transition);
}

.audio-rate-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.audio-center-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.audio-skip-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--ink-2);
  transition:
    background-color var(--transition),
    color var(--transition),
    transform 0.15s;
}

.audio-skip-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.audio-skip-btn:active {
  transform: scale(0.92);
}

.audio-skip-num {
  position: absolute;
  font-size: 8.5px;
  font-weight: 700;
  margin-top: 1px;
}

.audio-play-main-btn {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-hover) 100%
  );
  color: #ffffff;
  box-shadow: 0 6px 20px -4px rgba(28, 130, 81, 0.48);
  transition:
    transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 0.2s;
}

.audio-play-main-btn:hover {
  filter: brightness(1.08);
  transform: scale(1.05);
}

.audio-play-main-btn:active {
  transform: scale(0.94);
}

.audio-volume-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 52px;
  justify-content: flex-end;
}

.audio-mute-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  color: var(--ink-2);
  transition:
    background-color var(--transition),
    color var(--transition);
}

.audio-mute-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 10, 8, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  animation: fadeIn 0.25s ease-out both;
}

.lightbox-modal.is-hidden {
  display: none;
}

.lightbox-topbar {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  inset-inline: 16px;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ffffff;
}

.lightbox-badge {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}

.lightbox-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-tool-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  transition:
    background-color 0.2s,
    transform 0.15s;
}

.lightbox-tool-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(1.06);
}

.lightbox-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
}

.lightbox-viewport.is-dragging {
  cursor: grabbing;
}

.lightbox-img-stage {
  width: min(92vw, 840px);
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  transform-origin: center center;
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.lightbox-img-stage img {
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.lightbox-bottom-hint {
  position: absolute;
  bottom: calc(18px + env(safe-area-inset-bottom));
  inset-inline: 24px;
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-notice {
  position: fixed;
  z-index: 99;
  bottom: 155px;
  inset-inline: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  animation: fadeUp 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.toast-pill {
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--bg);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Keyframes & Utilities
   ========================================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   State Screen, Spinner & Dynamic Page States
   ========================================================================== */
[hidden] {
  display: none !important;
}

/* No hero: the section shrinks to the top bar, so it must not clip the language menu that drops below it. */
.hero-section.is-compact {
  height: auto;
  min-height: 0;
  background: transparent;
  border-bottom: 0;
  overflow: visible;
  position: relative;
  z-index: 40;
}

.hero-section.is-compact .hero-top-bar {
  position: static;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 0;
}

/* A slide's own title and description replace the page's in place; a short fade marks the swap. */
.exhibit-intro-section,
.about-section {
  transition: opacity 0.16s ease;
}

.exhibit-intro-section.is-swapping,
.about-section.is-swapping {
  opacity: 0 !important;
}

.slide-media-wrap.no-zoom {
  cursor: default;
}

.slide-media-wrap.no-zoom:hover img {
  transform: none;
}

.video-slide-container .video-element {
  background: #000;
}

.video-slide-container:fullscreen .video-element,
.video-slide-container:-webkit-full-screen .video-element {
  object-fit: contain;
}

.state-screen {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px 20px;
}

.state-screen .exhibit-title {
  font-size: clamp(22px, 6vw, 30px);
}

.state-screen p {
  margin: 14px 0 0;
  color: var(--ink-3);
  font-size: 14px;
}

.state-spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Mobile Responsive - Primarily Tailored for Smartphones
   ========================================================================== */
@media (max-width: 768px) {
  /* Horizontal Landscape Media Presentation on Mobile */
  .hero-section {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    background: #0a0a08;
    display: block;
    overflow: hidden;
  }

  .carousel-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 9;
    height: auto;
    max-height: 55vh;
    min-height: 200px;
    overflow: hidden;
  }

  .carousel-slide {
    height: 100%;
    background: #0a0a08;
  }

  .slide-media-wrap {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a08;
  }

  .slide-media-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  /* Safe Area Header Overlay */
  .hero-top-bar {
    padding: calc(10px + env(safe-area-inset-top, 0px))
      max(12px, env(safe-area-inset-right, 0px)) 8px
      max(12px, env(safe-area-inset-left, 0px));
  }

  /* Bottom dots over horizontal media */
  .hero-bottom-bar {
    position: absolute;
    inset-inline: 0;
    bottom: 8px;
    z-index: 22;
    background: transparent;
    padding: 0 12px;
    pointer-events: none;
    display: flex;
    justify-content: center;
  }

  .hero-bottom-bar > * {
    pointer-events: auto;
  }

  /* Prevent video controls from colliding with carousel dots on mobile */
  .video-overlay-bar {
    padding-bottom: 38px;
  }

  .carousel-indicators-bar {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: rgba(14, 14, 12, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
  }

  .carousel-dot {
    background: rgba(255, 255, 255, 0.35);
  }

  .carousel-dot.is-active {
    background: var(--gold);
    box-shadow: 0 0 10px rgba(185, 150, 83, 0.5);
  }

  .carousel-nav-btn {
    width: 44px;
    height: 44px;
    background: rgba(20, 20, 16, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
  }

  /* Main Exhibit Content on Mobile */
  .main-content {
    padding-top: 24px;
    padding-bottom: calc(150px + env(safe-area-inset-bottom, 20px));
    padding-inline: 16px;
    width: 100%;
    max-width: 100%;
  }

  .exhibit-intro-section {
    padding: 24px 0 16px;
  }

  .exhibit-title {
    font-size: clamp(24px, 7.5vw, 36px);
    line-height: 1.28;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .about-section {
    padding-top: 16px;
  }

  .desc-header-row {
    margin-bottom: 12px;
  }

  .desc-paragraph {
    font-size: calc(15.5px * var(--scale));
    line-height: 1.85;
    text-align: start;
    margin-bottom: 1.2em;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Floating Audio Guide Bar for Mobile */
  .audio-player-fixed-bar {
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .audio-slider-wrap {
    height: 38px;
  }

  .audio-controls-row {
    gap: 4px;
  }

  .audio-play-main-btn {
    width: 52px;
    height: 52px;
  }

  .audio-skip-btn {
    width: 44px;
    height: 44px;
  }

  .audio-rate-btn {
    min-width: 48px;
    height: 42px;
    padding: 0 6px;
  }

  .audio-mute-btn {
    width: 42px;
    height: 42px;
  }

  /* Lightbox Modal on Mobile */
  .lightbox-topbar {
    top: calc(14px + env(safe-area-inset-top, 0px));
    inset-inline: 12px;
  }

  .lightbox-img-stage {
    width: 96vw;
    max-height: 80vh;
  }

  .lightbox-bottom-hint {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    font-size: 11.5px;
    padding: 0 8px;
  }
}

/* Small Smartphone Screen Refinements (<380px) */
@media (max-width: 380px) {
  .audio-time-label {
    font-size: 11px;
    min-width: 32px;
  }

  .audio-skip-btn {
    width: 38px;
    height: 38px;
  }

  .audio-skip-btn svg {
    width: 20px;
    height: 20px;
  }

  .audio-play-main-btn {
    width: 48px;
    height: 48px;
  }

  .audio-rate-btn {
    min-width: 42px;
    font-size: 12px;
  }

  .audio-mute-btn {
    width: 38px;
    height: 38px;
  }

  .hero-top-bar {
    padding-inline: 10px;
  }

  .hero-details-badge {
    padding: 6px 11px;
    font-size: 12px;
  }
}
