/**
 * Rhythm Records Jaipur - Virtual Studio Tour & Spatial Experience Styles
 * Design: Premium Warm Studio Lighting, Acoustic Charcoal, Gold Accents
 */

:root {
  --tour-gold: #FFC107;
  --tour-gold-bright: #FFD54A;
  --tour-gold-glow: rgba(255, 193, 7, 0.35);
  --tour-dark: #0a0a0a;
  --tour-surface: rgba(18, 18, 18, 0.88);
  --tour-border: rgba(255, 193, 7, 0.24);
  --tour-border-subtle: rgba(255, 255, 255, 0.1);
  --tour-text: #FFFFFF;
  --tour-text-dim: #D0D0D0;
  --tour-text-muted: #8E8E93;
}

/* ==========================================================================
   Virtual Studio Tour Container
   ========================================================================== */
.studio-tour-section {
  position: relative;
  background: radial-gradient(ellipse at 50% 15%, #1a1610 0%, #0c0c0c 60%, #050505 100%);
  padding: 48px 0 60px 0;
  border-top: 1px solid var(--tour-border-subtle);
  border-bottom: 1px solid var(--tour-border-subtle);
  overflow: hidden;
}

.studio-tour-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--tour-gold) 50%, transparent 100%);
  opacity: 0.6;
}

.studio-tour-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 28px auto;
  padding: 0 16px;
}

.tour-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  color: var(--tour-gold-bright);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 14px;
  box-shadow: 0 0 18px rgba(255, 193, 7, 0.18);
}

.tour-badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 10px #ff3b30;
  animation: tourPulse 1.8s ease-in-out infinite;
}

@keyframes tourPulse {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(0.9); opacity: 1; }
}

.studio-tour-title {
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 12px;
}

.studio-tour-subtitle {
  font-size: 1.02rem;
  color: var(--tour-text-dim);
  line-height: 1.6;
  margin: 0 auto 20px auto;
}

/* ==========================================================================
   Tour Top Control Bar (Skip, Sound, Services, Quick Actions)
   ========================================================================== */
.tour-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 18px;
  background: rgba(14, 14, 14, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--tour-border-subtle);
  border-radius: 14px 14px 0 0;
  border-bottom: 1px solid rgba(255, 193, 7, 0.2);
}

.tour-room-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tour-step-pill {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--tour-gold);
  color: #000;
  padding: 3px 9px;
  border-radius: 6px;
}

.tour-current-room-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.tour-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Sound Button & Audio Controls */
.tour-sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.tour-sound-btn:hover,
.tour-sound-btn:focus-visible {
  background: rgba(255, 193, 7, 0.18);
  border-color: var(--tour-gold);
  color: var(--tour-gold-bright);
}

.tour-sound-btn.playing {
  background: rgba(255, 193, 7, 0.22);
  border-color: var(--tour-gold);
  color: var(--tour-gold-bright);
  box-shadow: 0 0 14px var(--tour-gold-glow);
}

.sound-waves {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.sound-wave-bar {
  width: 2px;
  background: currentColor;
  border-radius: 1px;
  height: 4px;
}

.tour-sound-btn.playing .sound-wave-bar:nth-child(1) { height: 10px; animation: soundBar 0.9s ease infinite alternate; }
.tour-sound-btn.playing .sound-wave-bar:nth-child(2) { height: 6px; animation: soundBar 0.7s ease 0.2s infinite alternate; }
.tour-sound-btn.playing .sound-wave-bar:nth-child(3) { height: 12px; animation: soundBar 1.1s ease 0.4s infinite alternate; }

@keyframes soundBar {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

.tour-quick-link {
  font-size: 0.82rem;
  color: var(--tour-text-dim);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.tour-quick-link:hover,
.tour-quick-link:focus-visible {
  color: var(--tour-gold-bright);
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Main Studio Viewport (Spatial Canvas / Scene Area)
   ========================================================================== */
.studio-tour-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 440px;
  max-height: 640px;
  background: #050505;
  overflow: hidden;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.9), inset 0 0 60px rgba(0, 0, 0, 0.8);
  user-select: none;
}

.tour-scene-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tour-scene-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.04);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease;
}

.studio-tour-viewport:hover .tour-scene-img {
  transform: scale(1.06);
}

/* Atmospheric Lighting Overlay */
.tour-lighting-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(255, 193, 7, 0.08) 0%, rgba(10, 10, 10, 0.5) 70%, rgba(5, 5, 5, 0.88) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Canvas for ambient light & subtle studio particles */
.tour-ambient-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

/* ==========================================================================
   Interactive Hotspots
   ========================================================================== */
.tour-hotspots-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.tour-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  outline: none;
  z-index: 6;
}

.hotspot-node {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(14, 14, 14, 0.94);
  border: 2px solid var(--tour-gold);
  color: var(--tour-gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8), 0 0 16px var(--tour-gold-glow);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hotspot-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid var(--tour-gold);
  opacity: 0.6;
  animation: hotspotRipple 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes hotspotRipple {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.7); opacity: 0; }
}

.hotspot-label-pill {
  position: absolute;
  top: 50%;
  left: 48px;
  transform: translateY(-50%);
  background: rgba(14, 14, 14, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 193, 7, 0.35);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  opacity: 0.9;
  transition: all 0.25s ease;
}

.tour-hotspot:hover .hotspot-node,
.tour-hotspot:focus-visible .hotspot-node {
  transform: scale(1.15);
  background: var(--tour-gold);
  color: #000;
  box-shadow: 0 0 28px rgba(255, 193, 7, 0.7);
}

.tour-hotspot:hover .hotspot-label-pill,
.tour-hotspot:focus-visible .hotspot-label-pill {
  opacity: 1;
  background: #000;
  border-color: var(--tour-gold);
  color: var(--tour-gold-bright);
  transform: translateY(-50%) translateX(4px);
}

/* ==========================================================================
   Hotspot Detail Card (Interactive Modal / Drawer)
   ========================================================================== */
.tour-card-drawer {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: min(390px, calc(100% - 40px));
  background: rgba(14, 14, 14, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.92), 0 0 35px rgba(255, 193, 7, 0.18);
  z-index: 10;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tour-card-drawer.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.drawer-category {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tour-gold-bright);
}

.drawer-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 2px 0 0 0;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.drawer-close-btn:hover {
  background: var(--tour-gold);
  color: #000;
}

.drawer-description {
  font-size: 0.88rem;
  color: var(--tour-text-dim);
  line-height: 1.55;
  margin-bottom: 14px;
}

.drawer-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 14px;
}

.drawer-price-tag {
  display: flex;
  flex-direction: column;
}

.drawer-price-label {
  font-size: 0.7rem;
  color: var(--tour-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.drawer-price-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--tour-gold-bright);
}

.drawer-actions {
  display: flex;
  gap: 10px;
}

.drawer-cta-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--tour-gold);
  color: #000;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.drawer-cta-btn:hover {
  background: #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Tour Bottom Room Navigation Bar (Breadcrumbs & Arrows)
   ========================================================================== */
.tour-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: rgba(14, 14, 14, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--tour-border-subtle);
  border-top: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 0 0 14px 14px;
}

.tour-nav-arrows {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tour-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tour-nav-btn:hover:not(:disabled),
.tour-nav-btn:focus-visible:not(:disabled) {
  background: var(--tour-gold);
  border-color: var(--tour-gold);
  color: #000;
}

.tour-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Room Breadcrumb Selector Strip */
.tour-room-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tour-room-selector::-webkit-scrollbar {
  display: none;
}

.tour-room-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--tour-text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tour-room-tab:hover,
.tour-room-tab:focus-visible {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.4);
  color: #fff;
}

.tour-room-tab.active {
  background: var(--tour-gold);
  border-color: var(--tour-gold);
  color: #000;
  font-weight: 800;
  box-shadow: 0 0 14px var(--tour-gold-glow);
}

.tour-room-tab-num {
  font-size: 0.68rem;
  opacity: 0.75;
}

/* ==========================================================================
   Room Info Banner (Below Viewport)
   ========================================================================== */
.tour-room-info-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  background: rgba(18, 18, 18, 0.6);
  border: 1px solid var(--tour-border-subtle);
  border-radius: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.room-info-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px 0;
}

.room-info-text p {
  font-size: 0.92rem;
  color: var(--tour-text-dim);
  line-height: 1.5;
  margin: 0;
  max-width: 680px;
}

.room-info-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ==========================================================================
   Intent-Specific Embedded Scene (Subpages)
   ========================================================================== */
.intent-studio-scene {
  position: relative;
  background: #0c0c0c;
  border: 1px solid var(--tour-border);
  border-radius: 16px;
  overflow: hidden;
  margin: 28px 0 40px 0;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.intent-scene-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(18, 18, 18, 0.95);
  border-bottom: 1px solid rgba(255, 193, 7, 0.2);
}

.intent-scene-header h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.intent-scene-badge {
  font-size: 0.72rem;
  color: var(--tour-gold-bright);
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.28);
  padding: 3px 8px;
  border-radius: 9999px;
  font-weight: 700;
}

.intent-scene-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  min-height: 320px;
  overflow: hidden;
}

.intent-scene-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.intent-scene-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(14, 14, 14, 0.95);
  border-top: 1px solid var(--tour-border-subtle);
  flex-wrap: wrap;
  gap: 10px;
}

.intent-scene-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--tour-text-dim);
}

/* ==========================================================================
   Responsive & Accessibility Adaptations
   ========================================================================== */
@media (max-width: 991px) {
  .studio-tour-viewport {
    aspect-ratio: 16 / 10;
    min-height: 360px;
  }
  .tour-card-drawer {
    width: calc(100% - 32px);
    bottom: 16px;
    right: 16px;
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .studio-tour-section {
    padding: 32px 0 45px 0;
  }
  .studio-tour-viewport {
    aspect-ratio: 4 / 3;
    min-height: 300px;
  }
  .tour-top-bar, .tour-bottom-bar {
    padding: 10px 14px;
  }
  .hotspot-node {
    width: 32px;
    height: 32px;
  }
  .hotspot-label-pill {
    display: none; /* Keep clean on mobile, tap opens drawer */
  }
  .tour-card-drawer {
    position: fixed;
    bottom: 60px; /* Above mobile action bar */
    left: 12px;
    right: 12px;
    width: auto;
    z-index: 9999;
  }
  .room-info-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Reduced Motion Preference Support */
@media (prefers-reduced-motion: reduce) {
  .tour-scene-wrap,
  .tour-scene-img,
  .hotspot-node,
  .hotspot-ring,
  .tour-badge-pulse,
  .sound-wave-bar {
    animation: none !important;
    transition: none !important;
  }
}
