/* ============================================================
   DVVPCOE Virtual Campus Tour — style.css
   Theme : Fresh Teal & Green  (white / teal / deep-teal accents)
   Hotspot fix: NO transition on wrapper, will-change:transform
   ============================================================ */

/* ── Google Font (loaded in HTML) ─────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');


.progress {
  height: 100%;
  width: 0%;
  background: #0a3d38;
  animation: loadProgress 10s linear forwards;
}

#countdown {
  font-size: 32px;
  font-weight: bold;
  margin-top: 10px;
  color: #1a9e94;
}

#introOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  /* Base background */
  background-color: #ffffff;
  background: linear-gradient(145deg, #f0f9f7 0%, #e4f5f2 50%, #f2faf8 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.introContent {
  text-align: center;
  font-size: 38px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.02em;
  margin-bottom: 12px;
}

.logo {
  width: 150px;
  margin-bottom: 50px;
  border-radius: 50%;
}

.small {
  opacity: 0.7;
  font-size: 18px;
  margin-top: 10px;
}

/* Progress bar */
.progress-bar {
  width: 250px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  margin: 20px auto;
  border-radius: 5px;
  overflow: hidden;
}

.progress {
  height: 100%;
  width: 0%;
  background: #0a3d38;
  animation: loadProgress 15s linear forwards;
}

@keyframes loadProgress {
  from {
    width: 0%;
  }

  to {
    width: 100%;
  }
}

/* ════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES — TEAL PALETTE
═════════════════════════════════════════════════════════ */
:root {
  /* Surfaces */
  --bg: #f0f7f5;
  --surface-0: #ffffff;
  --surface-1: #f4faf9;
  --surface-2: #eaf5f3;
  --surface-3: #cce8e4;

  /* Borders */
  --border: rgba(10, 60, 55, 0.10);
  --border-mid: rgba(10, 60, 55, 0.18);
  --border-strong: rgba(10, 60, 55, 0.30);

  /* Brand / accent — TEAL */
  --navy: #0a3d38;
  /* deep teal  (was #1a3a7c) */
  --navy-mid: #0d6b63;
  /* mid teal   (was #2152a8) */
  --navy-light: #1a9e94;
  /* light teal (was #3a6fd4) */
  --sky: #e0f7f5;
  /* pale teal  (was #e8f0fd) */
  --sky-mid: #a8e6e1;
  /* mid teal   (was #c5d8fc) */

  /* Text */
  --text: #0a1f1e;
  --text-mid: #2a5550;
  --text-muted: #5a8080;
  --text-on-navy: #ffffff;

  /* Feedback */
  --green: #16a34a;
  --green-bg: #dcfce7;

  /* Dimensions */
  --sidebar-w: 280px;
  --topbar-h: 60px;
  --statusbar-h: 36px;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  --shadow-sm: 0 1px 3px rgba(5, 30, 25, .08), 0 1px 2px rgba(5, 30, 25, .06);
  --shadow-md: 0 4px 14px rgba(5, 30, 25, .10), 0 2px 6px rgba(5, 30, 25, .07);
  --shadow-lg: 0 12px 32px rgba(5, 30, 25, .13), 0 4px 10px rgba(5, 30, 25, .08);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 130ms;
  --normal: 260ms;

  --teal: #14b8a6;
  --teal-light: #5eead4;
  --teal-dark: #0f766e;
  --teal-text: #042f2e;
}

/* ── Reset ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════════════════════════
   APP SHELL
═════════════════════════════════════════════════════════ */
#app {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* Mobile overlay */
#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 61, 56, 0.55);
  backdrop-filter: blur(4px);
  z-index: 900;
}

#sidebarOverlay.open {
  display: block;
}

/* ════════════════════════════════════════════════════════
   SIDEBAR
═════════════════════════════════════════════════════════ */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100%;
  background: var(--surface-0);
  border-right: 1px solid var(--border-mid);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: width var(--normal) var(--ease),
    transform var(--normal) var(--ease);
  z-index: 800;
}

#sidebar.collapsed {
  width: 0;
  border-right: none;
  box-shadow: none;
}

/* ── Logo / Brand ──────────────────────────────────────── */
/* LANGUAGE BUTTONS */

.language-selector {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}

.lang-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: #d1fae5;
  color: #042f2e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: #14b8a6;
  color: white;
}

.lang-btn.active {
  background: #0f766e;
  color: white;
}

.logoBox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--navy);
  flex-shrink: 0;
}

.logo-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--navy);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .20);
  letter-spacing: .3px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  letter-spacing: .01em;
}

.brand-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, .65);
  white-space: nowrap;
}

/* ── Menu ──────────────────────────────────────────────── */
.menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.nav-section-label {
  padding: 12px 16px 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Top-level nav buttons */
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 10px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background var(--fast), color var(--fast);
  white-space: nowrap;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: transparent;
  border-radius: 0 3px 3px 0;
  transition: background var(--fast);
}



.nav-item:hover {
  background: var(--teal);
  color: var(--teal-text);
}

.nav-item.active-item {
  background: var(--teal-light);
  color: var(--teal-text);
}

.nav-item.active-item::before {
  background: var(--teal-dark);
}

.nav-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.nav-icon svg {
  width: 13px;
  height: 13px;
}

.nav-item:hover .nav-icon,
.nav-item.active-item .nav-icon {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-arrow {
  font-size: 16px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--fast);
}

.nav-item:hover .nav-arrow {
  opacity: 1;
}

.nav-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--normal);
}

.nav-chevron svg {
  width: 13px;
  height: 13px;
  display: block;
}

.nav-chevron.sm svg {
  width: 11px;
  height: 11px;
}

.menu-section.open>.nav-item .nav-chevron,
.dept.open>.dept-toggle .nav-chevron {
  transform: rotate(180deg);
}

/* Sub-menus */
.submenu {
  display: none;
  background: var(--surface-1);
  border-top: 1px solid var(--border);
}

.menu-section.open .submenu {
  display: block;
}

.dept-sub {
  display: none;
}

.dept.open .dept-sub {
  display: block;
}

.dept-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--fast), color var(--fast);
}

.dept-toggle:hover {
  background: var(--surface-2);
  color: var(--navy);
}

.dept-toggle.active-item {
  color: var(--navy-mid);
  background: var(--sky);
}

.dept-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--surface-3);
  flex-shrink: 0;
  transition: background var(--fast);
}

.dept-toggle:hover .dept-dot,
.dept-toggle.active-item .dept-dot {
  background: var(--navy-mid);
}

/* Room / lab buttons */
.dept-sub button,
.submenu button.flat {
  width: 100%;
  display: block;
  padding: 7px 12px 7px 32px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background var(--fast), color var(--fast), padding-left var(--fast);
}

.dept-sub button:hover,
.submenu button.flat:hover {
  background: var(--surface-2);
  color: var(--navy);
  padding-left: 36px;
}

.dept-sub button.active-item,
.submenu button.flat.active-item {
  color: var(--navy);
  background: var(--sky);
  font-weight: 600;
}

/* Sidebar footer */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-mid);
  font-size: 10px;
  color: var(--text-muted);
  font-family: monospace;
  flex-shrink: 0;
  white-space: nowrap;
  background: var(--surface-1);
}

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .3;
  }
}

/* ════════════════════════════════════════════════════════
   MAIN COLUMN
═════════════════════════════════════════════════════════ */
#main {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ── Topbar ────────────────────────────────────────────── */
#topbar {
  flex-shrink: 0;
  height: var(--topbar-h);
  background: var(--surface-0);
  border-bottom: 1px solid var(--border-mid);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 0 12px;
  z-index: 50;
}

#sidebarToggle {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-1);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xs);
  color: var(--text-mid);
  cursor: pointer;
  transition: background var(--fast), color var(--fast);
}

#sidebarToggle svg {
  width: 15px;
  height: 15px;
}

#sidebarToggle:hover {
  background: var(--sky);
  color: var(--navy);
  border-color: var(--sky-mid);
}

#mobileToggle {
  display: none;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  border: none;
  border-radius: var(--radius-xs);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

#mobileToggle svg {
  width: 15px;
  height: 15px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.topbar-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.topbar-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.topbar-sub {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Start Tour — teal button */
.start-tour-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  height: 34px;
  background: var(--navy);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background var(--fast), transform var(--fast), box-shadow var(--fast);
}

.start-tour-btn svg {
  width: 11px;
  height: 11px;
}

.start-tour-btn:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Control buttons */
.topbar-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.ctrl-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-1);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xs);
  color: var(--text-mid);
  cursor: pointer;
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.ctrl-btn svg {
  width: 14px;
  height: 14px;
}

.ctrl-btn:hover {
  background: var(--sky);
  color: var(--navy);
  border-color: var(--sky-mid);
}

.ctrl-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ════════════════════════════════════════════════════════
   VIEWER AREA
═════════════════════════════════════════════════════════ */
#viewerArea {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}

/* Marzipano — must be absolute with real pixel size */
#pano {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ── Welcome Screen ──────────────────────────────────── */
#welcomeScreen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f0f9f7 0%, #e4f5f2 50%, #f2faf8 100%);
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity .45s ease, visibility .45s ease;
}

#welcomeScreen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Subtle dot grid */
.welcome-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(10, 60, 55, .12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 20%, transparent 75%);
}

/* Soft teal radial glow */
.welcome-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 107, 99, .07) 0%, transparent 65%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.welcome-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 32px;
}

.welcome-icon {
  width: 90px;
  height: 90px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
  animation: float 4s ease-in-out infinite;
}

.welcome-icon svg {
  width: 38px;
  height: 38px;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }
}

.welcome-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.02em;
  margin-bottom: 12px;
}

.welcome-sub {
  font-size: 14px;
  color: var(--text-mid);
  max-width: 340px;
  line-height: 1.75;
  margin-bottom: 30px;
}

.welcome-cta {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 26px;
  height: 46px;
  background: var(--navy);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background var(--fast), transform var(--fast), box-shadow var(--fast);
}

.welcome-cta svg {
  width: 14px;
  height: 14px;
}

.welcome-cta:hover {
  background: var(--navy-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}


/* ════════════════════════════════════════════════════════
   HOTSPOTS — DRIFT-FREE

   Rule: .link-hotspot wrapper → NO CSS transition whatsoever.
   Marzipano sets its transform every rAF. Any transition
   on this element causes the browser to interpolate between
   old & new translate values → visible drift while panning.

   Hover effects live ONLY on child elements
   (filter/opacity — compositor-only, don't touch parent).
═════════════════════════════════════════════════════════ */
.hotspot {
  will-change: transform;
}

.link-hotspot {
  width: 64px;
  height: 64px;
  margin-top: -32px;
  margin-left: -32px;
  position: relative;
  cursor: pointer;
}

.link-hotspot-icon {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 8px rgba(5, 30, 25, .45));
  transition: filter 110ms linear;
}

.link-hotspot:hover .link-hotspot-icon {
  filter: drop-shadow(0 0 10px rgba(10, 60, 55, .70)) drop-shadow(0 3px 8px rgba(5, 30, 25, .45));
}

.link-hotspot-tooltip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);

  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;

  border-radius: var(--radius-sm);
  background: var(--surface-0);
  border: 1px solid var(--border-mid);
  color: var(--navy);
  box-shadow: var(--shadow-md);

  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.link-hotspot:hover .link-hotspot-tooltip {
  opacity: 1;
  pointer-events: auto;
}

/* Info Hotspot */
.info-hotspot {
  background: var(--surface-0);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  transition: background 110ms linear, box-shadow 110ms linear;
}

.info-hotspot:hover {
  background: var(--sky);
  box-shadow: var(--shadow-md);
}

/* ════════════════════════════════════════════════════════
   SCROLLBARS
═════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--navy-light);
}

/* ════════════════════════════════════════════════════════
   SCENE LIST PANEL
═════════════════════════════════════════════════════════ */
#sceneList {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: rgba(10, 61, 56, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--normal) var(--ease);
}

#sceneList.open {
  max-height: 160px;
  overflow-y: auto;
}

#sceneList .scenes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 12px;
  list-style: none;
}

#sceneList .scene {
  text-decoration: none;
}

#sceneList .scene .text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 30px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xs);
  color: rgba(255, 255, 255, 0.80);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}

#sceneList .scene:hover .text,
#sceneList .scene.current .text {
  background: var(--navy-light);
  border-color: var(--navy-light);
  color: #fff;
}

/* Title Bar */
#titleBar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
  background: linear-gradient(to top, rgba(10, 61, 56, 0.75) 0%, transparent 100%);
  padding: 20px 16px 10px;
  pointer-events: none;
}

#titleBar .sceneName {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
  letter-spacing: .01em;
}

/* ════════════════════════════════════════════════════════
   DIRECTIONAL VIEW CONTROLS
═════════════════════════════════════════════════════════ */
.viewControlButton {
  position: absolute;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(10, 61, 56, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xs);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: background var(--fast), transform var(--fast);
  text-decoration: none;
}

.viewControlButton img.icon {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  display: block;
}

.viewControlButton:hover {
  background: var(--navy-mid);
  transform: scale(1.06);
}

.viewControlButton:active {
  transform: scale(0.94);
}

/* Positioning: diamond layout, bottom-right */
.viewControlButton-1 {
  right: 56px;
  bottom: 140px;
}

/* Up     */
.viewControlButton-2 {
  right: 56px;
  bottom: 92px;
}

/* Down   */
.viewControlButton-3 {
  right: 100px;
  bottom: 116px;
}

/* Left  */
.viewControlButton-4 {
  right: 12px;
  bottom: 116px;
}

/* Right */
.viewControlButton-5 {
  right: 100px;
  bottom: 68px;
}

/* In    */
.viewControlButton-6 {
  right: 12px;
  bottom: 68px;
}

/* Out   */

@media (max-width: 768px) {
  .viewControlButton-1 {
    right: 46px;
    bottom: 130px;
  }

  .viewControlButton-2 {
    right: 46px;
    bottom: 84px;
  }

  .viewControlButton-3 {
    right: 88px;
    bottom: 107px;
  }

  .viewControlButton-4 {
    right: 4px;
    bottom: 107px;
  }

  .viewControlButton-5 {
    right: 88px;
    bottom: 60px;
  }

  .viewControlButton-6 {
    right: 4px;
    bottom: 60px;
  }

  .viewControlButton {
    width: 36px;
    height: 36px;
  }
}

/* ════════════════════════════════════════════════════════
   TABLET ≤900px
═════════════════════════════════════════════════════════ */
@media (max-width: 900px) and (min-width: 769px) {
  :root {
    --sidebar-w: 230px;
  }

  .brand-name {
    font-size: 13px;
  }

  .nav-item {
    font-size: 12px;
  }
}

/* ════════════════════════════════════════════════════════
   MOBILE ≤768px  — sidebar becomes a slide-over drawer
═════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  #app {
    display: block;
  }

  #main {
    width: 100%;
    height: 100%;
  }

  #sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 82% !important;
    max-width: 300px;
    height: 100% !important;
    transform: translateX(-108%) !important;
    transition: transform var(--normal) var(--ease) !important;
    z-index: 1000;
    box-shadow: none;
  }

  #sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: var(--shadow-lg) !important;
  }

  #sidebar.collapsed {
    transform: translateX(-108%) !important;
    width: 82% !important;
  }

  #sidebarToggle {
    display: none !important;
  }

  #mobileToggle {
    display: flex !important;
  }

  #topbar {
    padding: 0 10px;
    gap: 8px;
  }

  .topbar-name {
    display: none;
  }

  .topbar-sub {
    display: none;
  }

  /* Start Tour: icon only on mobile */
  .start-tour-btn {
    padding: 0 10px;
    font-size: 0;
    gap: 0;
    min-width: 34px;
  }

  .start-tour-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Hide zoom buttons — keep autorotate + fullscreen */
  .ctrl-btn:nth-child(2),
  .ctrl-btn:nth-child(3) {
    display: none;
  }

  .welcome-title {
    font-size: 22px;
  }

  .welcome-sub {
    font-size: 13px;
    max-width: 280px;
  }

  .welcome-icon {
    width: 74px;
    height: 74px;
  }

  .welcome-icon svg {
    width: 32px;
    height: 32px;
  }

  /* Tooltip below hotspot on mobile */
  .link-hotspot-tooltip {
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%);
    white-space: normal;
    max-width: 140px;
    text-align: center;
  }
}

/* ════════════════════════════════════════════════════════
   SMALL MOBILE ≤480px
═════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .topbar-logo {
    display: none;
  }

  #sidebar {
    width: 90% !important;
    max-width: 310px;
  }

  .ctrl-btn:nth-child(1),
  .ctrl-btn:nth-child(2),
  .ctrl-btn:nth-child(3) {
    display: none;
  }

  .welcome-title {
    font-size: 19px;
  }

  .welcome-sub {
    font-size: 12px;
  }

  .welcome-cta {
    font-size: 13px;
    height: 40px;
  }

}

/* ════════════════════════════════════════════════════════
   TOUCH DEVICES — no hover-only effects
═════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {

  .dept-sub button:hover,
  .submenu button.flat:hover {
    padding-left: 32px;
  }

  .ctrl-btn {
    width: 40px;
    height: 40px;
  }

  #mobileToggle {
    width: 40px;
    height: 40px;
  }

  .welcome-cta:hover {
    transform: none;
  }

  .start-tour-btn:hover {
    transform: none;
  }
}

/* ════════════════════════════════════════════════════════
   CUSTOM LOGO IMAGES
   Sidebar : <img src="img/logo.png" class="sidebar-logo-img">
   Topbar  : <img src="img/logo.png" class="topbar-logo-img">
═════════════════════════════════════════════════════════ */

.sidebar-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--radius-xs);
  background: #fff;
  padding: 3px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
  display: block;
}

.topbar-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: var(--radius-xs);
  background: #fff;
  padding: 2px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  display: block;
}

/* ── Logo responsive tweaks ───────────────────────────── */

@media (max-width: 900px) and (min-width: 769px) {
  .sidebar-logo-img {
    width: 36px;
    height: 36px;
  }

  .topbar-logo-img {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 768px) {
  .sidebar-logo-img {
    width: 36px;
    height: 36px;
  }

  .topbar-logo-img {
    width: 30px;
    height: 30px;
    display: block !important;
  }
}

@media (max-width: 480px) {
  .topbar-logo-img {
    display: none;
  }

  .sidebar-logo-img {
    width: 32px;
    height: 32px;
    padding: 2px;
  }
}

@media (max-width: 360px) {
  .sidebar-logo-img {
    width: 28px;
    height: 28px;
  }

  .logoBox {
    gap: 8px;
    padding: 12px;
  }

  .brand-name {
    font-size: 13px;
  }

  .brand-sub {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════════
   AUDIO PLAYER WIDGET
══════════════════════════════════════════════════════════════ */

.audio-player {
  position: fixed;
  bottom: calc(var(--statusbar-h) + 12px);
  right: 16px;
  z-index: 600;
  background: var(--surface-0);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(10, 60, 55, .04);
  padding: 10px 12px 10px 14px;
  min-width: 270px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: audioSlideIn .3s ease;
}

@keyframes audioSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.audio-player.hidden {
  display: none !important;
}

.audio-dept-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--navy-mid);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.audio-dept-label svg {
  flex-shrink: 0;
  color: var(--navy-light);
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-play-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy-mid);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .1s;
}

.audio-play-btn:hover {
  background: var(--navy);
  transform: scale(1.08);
}

.audio-play-btn:active {
  transform: scale(.94);
}

.audio-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audio-progress-bar {
  width: 100%;
  height: 5px;
  background: var(--surface-3);
  border-radius: 99px;
  cursor: pointer;
  overflow: hidden;
}

.audio-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--navy-light), var(--navy-mid));
  border-radius: 99px;
  transition: width .4s linear;
  pointer-events: none;
}

.audio-time {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.audio-close-btn {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background .15s, color .15s;
}

.audio-close-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}

@media (max-width: 768px) {
  .audio-player {
    bottom: calc(var(--statusbar-h) + 8px);
    right: 8px;
    left: 8px;
    max-width: none;
    min-width: unset;
  }
}
/* ════════════════════════════════════════════════════════
   HELP BUTTON & POPUP
════════════════════════════════════════════════════════ */

#helpBtn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0f766e;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.4);
  transition: background 0.18s, transform 0.15s;
}

#helpBtn:hover {
  background: #0d6460;
  transform: scale(1.08);
}

#helpOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

#helpOverlay.active {
  display: flex;
}

.help-popup {
  background: #fff;
  border-radius: 16px;
  padding: 28px 28px 22px;
  max-width: 500px;
  width: 92%;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.help-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #edf1f7;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.help-popup-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f766e;
  margin: 0;
}

.help-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  font-size: 18px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}

.help-close-btn:hover {
  background: #f2f2f2;
  color: #555;
}

.help-intro,
.help-footer {
  font-size: 14px;
  color: #333;
  margin: 0 0 14px;
  line-height: 1.5;
}

.help-footer {
  margin: 14px 0 0;
}

.help-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.help-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: #333;
  line-height: 1.55;
}

.help-arrow {
  color: #0f766e;
  font-size: 12px;
  margin-top: 3px;
  flex-shrink: 0;
}

.help-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #4A90D9;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
  margin: 0 2px;
}

@media (max-width: 600px) {
  #helpBtn {
    bottom: 18px;
    right: 16px;
    width: 42px;
    height: 42px;
    font-size: 19px;
  }

  .help-popup {
    padding: 20px 18px 16px;
  }
}