/* ===================================================================
   КОМПОНЕНТЫ — Glassmorphism Museum UI
   =================================================================== */

.nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  width: 520px;
  max-width: calc(100vw - 32px);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.nav.nav-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.nav-glass {
  background: rgba(14, 17, 30, 0.45);
  -webkit-backdrop-filter: blur(80px) saturate(1.4);
  backdrop-filter: blur(80px) saturate(1.4);
  border: 1px solid rgba(201, 168, 76, 0.20);
  border-radius: 40px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 4px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.5),
    0 2px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.10);
  transition: var(--transition-smooth);
}

.nav-glass:hover {
  border-color: rgba(201,168,76,0.4);
  box-shadow:
    0 12px 48px rgba(0,0,0,0.5),
    0 4px 16px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Кнопка навигации */
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 20px;
  border-radius: 28px;
  cursor: pointer;
  transition: var(--transition-spring);
  position: relative;
  flex: 1;
  text-align: center;
  border: none;
  background: none;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
  min-height: 56px;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 28px;
  background: rgba(201,168,76,0.0);
  transition: var(--transition-smooth);
}

.nav-item:hover::before,
.nav-item.active::before {
  background: rgba(201,168,76,0.1);
}

.nav-item.active {
  color: var(--color-primary);
}

.nav-item-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-spring);
  position: relative;
}

.nav-item.active .nav-item-icon {
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.6));
}

/* Активная точка-индикатор */
.nav-item-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-primary);
  position: absolute;
  bottom: 2px;
  left: 50%;
  margin-left: -2px;
  transform: scale(0);
  transition: var(--transition-spring);
  box-shadow: 0 0 8px rgba(201,168,76,0.8);
}

.nav-item.active .nav-item-dot {
  transform: scale(1);
}

.nav-item-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
}

/* Ripple эффект при касании */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: rgba(201,168,76,0.3);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

/* Touch press effect */
.nav-item:active {
  transform: scale(0.92);
}

/* ===== КАРТОЧКИ ===== */
.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 2rem;
}

.card {
  background: rgba(20, 24, 40, 0.55);
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 18px;
  overflow: hidden;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(201,168,76,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition-smooth);
  pointer-events: none;
  z-index: 1;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  border-color: rgba(201,168,76,0.45);
  box-shadow:
    0 20px 50px rgba(0,0,0,0.4),
    0 0 15px rgba(201,168,76,0.20);
  transform: translateY(-8px) scale(1.01);
}

.card:active {
  transform: translateY(-4px) scale(0.99);
  transition: var(--transition-fast);
}

.card-image-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}

.card-image-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(10,12,20,0.6) 100%);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1),
              filter 0.6s ease;
}

.card:hover .card-image-wrap img {
  transform: scale(1.1);
  filter: brightness(1.15) saturate(1.1);
}

.card-content {
  padding: 1.4rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.card-title {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--color-text-primary);
}

/* ===== КНОПКИ ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: hsl(220, 30%, 8%);
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.04em;
  transition: var(--transition-spring);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(201,168,76,0.3), 0 2px 8px rgba(0,0,0,0.3);
  text-transform: uppercase;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
  border-radius: inherit;
  opacity: 0;
  transition: var(--transition-smooth);
}

.btn-primary:hover::before { opacity: 1; }

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 30px rgba(201,168,76,0.45), 0 4px 12px rgba(0,0,0,0.3);
}

.btn-primary:active {
  transform: translateY(0px) scale(0.97);
  transition: var(--transition-fast);
}

/* ===== СЕКЦИИ ===== */
.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
  background: linear-gradient(120deg, var(--color-text-primary) 30%, var(--color-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  height: 3px;
  width: 60px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
  border-radius: 2px;
}

/* ===== GLASSMORPHISM КАРТОЧКА ===== */
.glass-card {
  background: rgba(20, 24, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  padding: 2rem;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.06);
}

.glass-card:hover {
  border-color: rgba(201, 168, 76, 0.25);
  box-shadow: 0 8px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 15px rgba(201, 168, 76, 0.20);
}

/* Счётчик-карточки */
.stat-card {
  background: rgba(20, 24, 40, 0.55);
  padding: 2.5rem 2rem;
  border-radius: 18px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.10);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(201,168,76,0.08) 0%, transparent 50%);
  opacity: 0;
  transition: var(--transition-slow);
}

.stat-card:hover::before { opacity: 1; }

.stat-card:hover {
  border-color: rgba(201, 168, 76, 0.25);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 15px rgba(201, 168, 76, 0.20);
}

.stat-card:active {
  transform: translateY(-3px);
}

.stat-number {
  font-size: 3.5rem;
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1;
  display: block;
}

.stat-label {
  color: var(--color-text-secondary);
  font-size: 1rem;
  font-weight: 400;
}

/* ===== МОДАЛЬНОЕ ОКНО (почти на весь экран) ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 6, 14, 0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: rgba(20, 24, 40, 0.90);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 24px;
  width: calc(100vw - 40px);
  max-width: 1400px;
  height: calc(100vh - 120px);
  max-height: 900px;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34,1.3,0.64,1), opacity 0.35s ease;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 20px rgba(201, 168, 76, 0.15);
  opacity: 0;
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-image {
  width: 60%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-info {
  width: 40%;
  padding: 2.5rem;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Крестик по центру снизу — дочерний элемент overlay */
.modal-close {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--color-text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  min-width: 56px;
  min-height: 56px;
  margin-top: 16px;
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(201,168,76,0.2);
  border-color: rgba(201,168,76,0.6);
  color: var(--color-primary);
  transform: rotate(90deg) scale(1.1);
}

.modal-title {
  font-size: 2rem;
  margin-bottom: 1.2rem;
  background: linear-gradient(120deg, var(--color-text-primary) 40%, var(--color-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-desc {
  color: var(--color-text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
}

/* Мобильный вид модалки */
@media (max-width: 768px) {
  .modal-content {
    flex-direction: column;
    height: calc(100vh - 80px);
  }
  .modal-image {
    width: 100%;
    height: 45%;
  }
  .modal-info {
    width: 100%;
    padding: 1.5rem;
  }
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--color-text-secondary);
  padding: 0.6rem 1.5rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: var(--font-body);
  font-size: 0.9rem;
  min-height: 42px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.tab-btn:hover {
  background: rgba(201,168,76,0.08);
  border-color: rgba(201,168,76,0.25);
  color: var(--color-text-primary);
}

.tab-btn.active {
  background: rgba(201,168,76,0.15);
  border-color: rgba(201,168,76,0.55);
  color: var(--color-primary);
  box-shadow: 0 0 16px rgba(201,168,76,0.15);
}

/* ===== PANORAMA ===== */
.pnlm-container {
  border-radius: 18px;
  overflow: hidden;
}

.panorama-wrapper-custom {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(201, 168, 76, 0.25);
  box-shadow: 0 12px 50px rgba(0,0,0,0.4), 0 0 15px rgba(201, 168, 76, 0.20);
}

/* ===== TOUR PAGE LAYOUT — панорама слева, экспонаты справа ===== */
.tour-page-layout {
  display: flex;
  height: calc(100vh - 120px);
  gap: 0;
}

.tour-pano-side {
  width: 55%;
  height: 100%;
  padding: 16px;
  padding-right: 8px;
  flex-shrink: 0;
}

.tour-exhibits-side {
  width: 45%;
  height: 100%;
  overflow-y: auto;
  padding: 16px;
  padding-left: 8px;
}

.tour-exhibits-side .grid-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Custom scrollbar for exhibits */
.tour-exhibits-side::-webkit-scrollbar { width: 4px; }
.tour-exhibits-side::-webkit-scrollbar-track { background: transparent; }
.tour-exhibits-side::-webkit-scrollbar-thumb {
  background: rgba(201,168,76,0.3);
  border-radius: 2px;
}
.tour-exhibits-side::-webkit-scrollbar-thumb:hover {
  background: rgba(201,168,76,0.5);
}

/* ===== PANO NAV BUTTONS ===== */
.pano-nav {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 10;
}

.pano-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(20, 24, 40, 0.55);
  border: 1px solid rgba(201, 168, 76, 0.25);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  transition: var(--transition-spring);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.pano-btn:hover {
  background: var(--color-primary);
  color: var(--color-bg-dark);
  transform: scale(1.15);
  box-shadow: 0 0 24px rgba(201,168,76,0.5);
}

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

/* ===== PODCASTS ===== */
.podcast-card {
  display: flex;
  flex-direction: column;
  background: rgba(20, 24, 40, 0.55);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  position: relative;
}

.podcast-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0;
  transition: var(--transition-smooth);
}

.podcast-card:hover::before { opacity: 1; }

.podcast-card:hover {
  border-color: rgba(201, 168, 76, 0.25);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 15px rgba(201, 168, 76, 0.20);
}

.podcast-info {
  padding: 1.8rem;
  flex: 1;
}

.podcast-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.podcast-audio {
  width: 100%;
  margin-top: 1.2rem;
}

/* Кастомный аудио плеер */
audio {
  filter: invert(1) hue-rotate(180deg) brightness(1.3) contrast(1.1);
  border-radius: 8px;
}

/* Footer removed */

/* ===== AMBIENT GLOW ===== */
.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}

.ambient-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(201,168,76,0.25) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation-duration: 10s;
}

.ambient-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212,118,78,0.2) 0%, transparent 70%);
  bottom: 100px;
  left: -150px;
  animation-duration: 14s;
  animation-delay: -4s;
}

/* ===== PAGE HEADER ===== */
.page-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 9999px;
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

/* Scroll indicator removed */

/* ===== PANORAMA BADGE ===== */
.pano-hall-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(20, 24, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 9999px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  color: var(--color-primary);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 10;
  font-weight: 500;
  letter-spacing: 0.04em;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
