/* ==========================================================================
   MUSEU CATAVENTO - DESIGN SYSTEM & STYLESHEET (VERSÃO 2.0)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS DE DESIGN (VARIÁVEIS)
   -------------------------------------------------------------------------- */
:root {
  /* Cores de Base */
  --base-bg: #121620;
  --elevated-bg: rgba(26, 32, 46, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #a3b3cc;
  --glass-bg: rgba(18, 22, 32, 0.82);
  
  /* Cores de Destaque por Seção (Default: Institucional / Home) */
  --theme-color: #1ad1d9;
  --theme-glow: rgba(26, 209, 217, 0.4);

  /* Fontes */
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Espaçamentos */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;

  /* Arredondamento */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Transições */
  --transition-fast: 160ms cubic-bezier(0.25, 1, 0.5, 1);
  --transition-normal: 320ms cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 480ms cubic-bezier(0.25, 1, 0.5, 1);
  --transition-elastic: 380ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Sombras */
  --shadow-lg: 0 10px 36px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 18px var(--theme-glow);
}

/* Temática Dinâmica Oficial por Seção (Identidade Visual Museu Catavento) */
#app.theme-institucional {
  --theme-color: #1ad1d9;
  --theme-glow: rgba(26, 209, 217, 0.45);
}
#app.theme-universo {
  --theme-color: #4b5563; /* Cinza chumbo / Grafite oficial Catavento (#333333) */
  --theme-glow: rgba(156, 163, 175, 0.4);
}
#app.theme-vida {
  --theme-color: #06c369; /* Verde oficial Catavento */
  --theme-glow: rgba(6, 195, 105, 0.5);
}
#app.theme-engenho {
  --theme-color: #cd5f3e; /* Laranja terracota oficial Catavento */
  --theme-glow: rgba(205, 95, 62, 0.5);
}
#app.theme-sociedade {
  --theme-color: #165b96; /* Azul oficial Catavento */
  --theme-glow: rgba(22, 91, 150, 0.55);
}
#app.theme-exposicoes-passadas {
  --theme-color: #64748b; /* Cinza memória */
  --theme-glow: rgba(100, 116, 139, 0.4);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE LAYOUT
   -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--base-bg);
  font-family: var(--font-body);
  color: var(--text-primary);
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Utilitários */
.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   3. CAMADA DE FUNDO (MÍDIAS & TRANSIÇÕES)
   -------------------------------------------------------------------------- */
.bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: #0b0d13;
}

.bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: opacity var(--transition-slow);
  z-index: 2;
  opacity: 1;
}

.bg-image.hidden-media {
  opacity: 0;
}

.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--transition-slow);
  z-index: 1;
  opacity: 0;
}

.bg-video.active {
  z-index: 2;
  opacity: 1;
}

.bg-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 1;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.bg-iframe.active {
  z-index: 3;
  opacity: 1;
}

/* Overlay para transições cromáticas entre seções */
.transition-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--theme-color);
  opacity: 0;
  z-index: 4;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.transition-overlay.animating {
  opacity: 0.8;
}

/* Loader do iframe do Matterport */
.iframe-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  background: rgba(11, 13, 19, 0.9);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--theme-color);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  box-shadow: var(--shadow-glow);
}

.iframe-loader.show {
  opacity: 1;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  border-top-color: var(--theme-color);
  animation: spin 0.9s linear infinite;
  box-shadow: 0 0 12px var(--theme-glow);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   4. CAMADA DE INTERFACE DO USUÁRIO (UI)
   -------------------------------------------------------------------------- */
.ui-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none; /* Permite interagir com 3D ao fundo */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-lg);
}

.ui-container * {
  pointer-events: auto; /* Elementos da UI recebem cliques normalmente */
}

/* --- Cabeçalho Superior --- */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  z-index: 20;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Slogan da Marca (Home) */
.brand-slogan {
  background: var(--glass-bg);
  padding: 8px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.slogan-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--theme-color);
}

.slogan-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Indicador de Seção e Botão Voltar (Seção / Tour) */
.section-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(14px);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-fast);
}

.btn-back-home:hover {
  background: var(--theme-color);
  border-color: var(--theme-color);
  color: #fff;
  transform: translateX(-2px);
}

.section-badge {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--theme-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-glow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Botão de Ajuda de Navegação */
.btn-help-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(14px);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-fast);
}

.btn-help-trigger:hover {
  border-color: var(--theme-color);
  color: var(--theme-color);
  box-shadow: var(--shadow-glow);
}

/* Requisito R2: Logo sempre no canto superior direito leva para Home */
.logo-link-btn {
  background: var(--glass-bg);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.logo-link-btn:hover {
  border-color: var(--theme-color);
  transform: scale(1.03);
}

.logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* --------------------------------------------------------------------------
   5. BARRA LATERAL ESQUERDA (EXPERIÊNCIAS / ITENS DA SEÇÃO)
   -------------------------------------------------------------------------- */
.sidebar-panel {
  position: absolute;
  top: 96px;
  left: var(--space-lg);
  max-height: calc(100vh - 96px - var(--space-lg));
  height: fit-content;
  width: 380px;
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 15;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  opacity: 0;
  transform: translateX(-40px);
  pointer-events: none;
}

.sidebar-panel.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.sidebar-panel.collapsed {
  transform: translateX(calc(-100% - var(--space-lg) - 20px));
  opacity: 0;
  pointer-events: none;
}

.sidebar-header {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-tag {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--theme-color);
  text-transform: uppercase;
}

.sidebar-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.toggle-sidebar-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.toggle-sidebar-btn:hover {
  background: var(--theme-color);
  border-color: var(--theme-color);
  color: #fff;
}

/* Lista Rolável de Itens/Experiências */
.sidebar-list-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Scrollbar estilizada */
.sidebar-list-container::-webkit-scrollbar {
  width: 5px;
}
.sidebar-list-container::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-list-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
.sidebar-list-container::-webkit-scrollbar-thumb:hover {
  background: var(--theme-color);
}

.sidebar-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.sidebar-item-btn:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--theme-color);
  transform: translateX(3px);
}

.sidebar-item-btn.active {
  background: var(--theme-color);
  border-color: var(--theme-color);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.sidebar-item-btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-style: dashed;
}

.sidebar-item-content {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.sidebar-item-num {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--theme-color);
  flex-shrink: 0;
}

.sidebar-item-btn.active .sidebar-item-num {
  color: #fff;
}

.sidebar-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-play-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.sidebar-item-btn:hover:not(.disabled) .item-play-icon {
  background: var(--theme-color);
  transform: scale(1.1);
}

.sidebar-item-btn.active .item-play-icon {
  background: rgba(0, 0, 0, 0.25);
}

.item-soon-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Botão Flutuante para Reabrir Barra Lateral */
.reopen-sidebar-btn {
  position: absolute;
  top: 96px;
  left: var(--space-lg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--theme-color);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: var(--shadow-glow), var(--shadow-lg);
  backdrop-filter: blur(14px);
  z-index: 14;
  transition: transform var(--transition-elastic);
}

.reopen-sidebar-btn:hover {
  transform: scale(1.05);
}

/* --------------------------------------------------------------------------
   6. NAVEGAÇÃO INFERIOR HORIZONTAL (MENU DA HOME)
   -------------------------------------------------------------------------- */
.main-navigation {
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 20;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.nav-scroll-wrapper {
  max-width: 100%;
  overflow-x: auto;
  padding: var(--space-sm);
  scrollbar-width: none;
}
.nav-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.nav-items-container {
  display: flex;
  gap: 12px;
  background: rgba(18, 22, 32, 0.8);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(15px);
  box-shadow: var(--shadow-lg);
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-elastic);
  white-space: nowrap;
  min-height: 42px;
}

/* Cores Oficiais das Seções no Menu Desktop (Identidade Visual Catavento) */
.nav-item[data-section-id="passeio-livre"] {
  background: rgba(26, 209, 217, 0.12);
  border: 1.5px solid rgba(26, 209, 217, 0.45);
  color: #e0faff;
}
.nav-item[data-section-id="passeio-livre"] .nav-icon-svg {
  color: #1ad1d9;
}
.nav-item[data-section-id="passeio-livre"]:hover,
.nav-item[data-section-id="passeio-livre"].active {
  background: #1ad1d9;
  border-color: #1ad1d9;
  color: #08222b;
  box-shadow: 0 0 20px rgba(26, 209, 217, 0.6);
  transform: translateY(-2px);
}
.nav-item[data-section-id="passeio-livre"]:hover .nav-icon-svg,
.nav-item[data-section-id="passeio-livre"].active .nav-icon-svg {
  color: #08222b;
}

.nav-item[data-section-id="universo"] {
  background: rgba(51, 51, 51, 0.75);
  border: 1.5px solid rgba(161, 161, 170, 0.45);
  color: #f4f4f5;
}
.nav-item[data-section-id="universo"] .nav-icon-svg {
  color: #d4d4d8;
}
.nav-item[data-section-id="universo"]:hover,
.nav-item[data-section-id="universo"].active {
  background: #333333;
  border-color: #e4e4e7;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}
.nav-item[data-section-id="universo"]:hover .nav-icon-svg,
.nav-item[data-section-id="universo"].active .nav-icon-svg {
  color: #ffffff;
}

.nav-item[data-section-id="vida"] {
  background: rgba(6, 195, 105, 0.15);
  border: 1.5px solid rgba(6, 195, 105, 0.5);
  color: #f0fdf4;
}
.nav-item[data-section-id="vida"] .nav-icon-svg {
  color: #06c369;
}
.nav-item[data-section-id="vida"]:hover,
.nav-item[data-section-id="vida"].active {
  background: #06c369;
  border-color: #06c369;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(6, 195, 105, 0.65);
  transform: translateY(-2px);
}
.nav-item[data-section-id="vida"]:hover .nav-icon-svg,
.nav-item[data-section-id="vida"].active .nav-icon-svg {
  color: #ffffff;
}

.nav-item[data-section-id="engenho"] {
  background: rgba(205, 95, 62, 0.16);
  border: 1.5px solid rgba(205, 95, 62, 0.5);
  color: #fff7ed;
}
.nav-item[data-section-id="engenho"] .nav-icon-svg {
  color: #cd5f3e;
}
.nav-item[data-section-id="engenho"]:hover,
.nav-item[data-section-id="engenho"].active {
  background: #cd5f3e;
  border-color: #cd5f3e;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(205, 95, 62, 0.65);
  transform: translateY(-2px);
}
.nav-item[data-section-id="engenho"]:hover .nav-icon-svg,
.nav-item[data-section-id="engenho"].active .nav-icon-svg {
  color: #ffffff;
}

.nav-item[data-section-id="sociedade"] {
  background: rgba(22, 91, 150, 0.2);
  border: 1.5px solid rgba(22, 91, 150, 0.55);
  color: #f0f9ff;
}
.nav-item[data-section-id="sociedade"] .nav-icon-svg {
  color: #38bdf8;
}
.nav-item[data-section-id="sociedade"]:hover,
.nav-item[data-section-id="sociedade"].active {
  background: #165b96;
  border-color: #165b96;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(22, 91, 150, 0.65);
  transform: translateY(-2px);
}
.nav-item[data-section-id="sociedade"]:hover .nav-icon-svg,
.nav-item[data-section-id="sociedade"].active .nav-icon-svg {
  color: #ffffff;
}

.nav-item[data-section-id="exposicoes-passadas"] {
  background: rgba(148, 163, 184, 0.12);
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  color: #f1f5f9;
}
.nav-item[data-section-id="exposicoes-passadas"] .nav-icon-svg {
  color: #94a3b8;
}
.nav-item[data-section-id="exposicoes-passadas"]:hover,
.nav-item[data-section-id="exposicoes-passadas"].active {
  background: #64748b;
  border-color: #64748b;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(100, 116, 139, 0.5);
  transform: translateY(-2px);
}
.nav-item[data-section-id="exposicoes-passadas"]:hover .nav-icon-svg,
.nav-item[data-section-id="exposicoes-passadas"].active .nav-icon-svg {
  color: #ffffff;
}

.nav-icon-svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  stroke-width: 2.2;
}

/* --------------------------------------------------------------------------
   7. MODAL DE AJUDA DE NAVEGAÇÃO 3D
   -------------------------------------------------------------------------- */
.help-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 12, 18, 0.86);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.help-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.help-modal-content {
  position: relative;
  width: 90%;
  max-width: 620px;
  background: var(--base-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--theme-color);
  box-shadow: 0 0 35px var(--theme-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform var(--transition-elastic);
}

.help-modal.show .help-modal-content {
  transform: scale(1);
}

.help-modal-header {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background: var(--elevated-bg);
}

.help-modal-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.close-help-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.close-help-btn:hover {
  color: #fff;
}

.help-modal-body {
  padding: var(--space-md);
  display: flex;
  justify-content: center;
  background: #11141b;
}

.help-instruction-img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.help-modal-footer {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-color);
  background: var(--elevated-bg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-elastic);
}

.btn-primary {
  background: var(--theme-color);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px var(--theme-color);
}

/* --------------------------------------------------------------------------
   8. RESPONSIVIDADE (MOBILE & TABLET)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .sidebar-panel {
    width: 320px;
    top: 86px;
    left: var(--space-md);
    max-height: calc(100vh - 86px - var(--space-md));
    height: fit-content;
  }
}

@media (max-width: 768px) {
  .ui-container {
    padding: 12px 10px;
  }

  /* Cabeçalho Compacto e Alinhado no Celular */
  .main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 6px;
  }

  .header-left {
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
  }

  .brand-slogan {
    padding: 6px 10px;
    border-radius: 6px;
  }

  .slogan-title {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .slogan-sub {
    display: none;
  }

  .section-indicator {
    gap: 4px;
    min-width: 0;
  }

  .btn-back-home {
    padding: 6px 8px;
    font-size: 0.75rem;
    gap: 3px;
    border-radius: 6px;
  }

  .btn-back-home svg {
    width: 15px;
    height: 15px;
  }

  .section-badge {
    font-size: 0.72rem;
    padding: 6px 8px;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
  }

  .header-right {
    gap: 6px;
    flex-shrink: 0;
  }

  .help-btn-text {
    display: none;
  }

  .btn-help-trigger {
    padding: 6px 8px;
    border-radius: 6px;
    min-width: 34px;
    justify-content: center;
  }

  .btn-help-trigger svg {
    width: 18px;
    height: 18px;
  }

  .logo-link-btn {
    padding: 4px 8px;
    border-radius: 6px;
  }

  .logo {
    height: 30px;
  }

  /* Barra Lateral em Gaveta Superior / Flutuante no Celular */
  .sidebar-panel {
    top: 64px;
    left: 8px;
    right: 8px;
    max-height: calc(100vh - 80px);
    height: fit-content;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75);
    background: rgba(16, 20, 30, 0.94);
  }

  .sidebar-panel.collapsed {
    transform: translateY(calc(-100% - 80px));
    opacity: 0;
    pointer-events: none;
  }

  .sidebar-header {
    padding: 12px 14px;
  }

  .sidebar-title {
    font-size: 1.15rem;
  }

  .toggle-sidebar-btn {
    width: 32px;
    height: 32px;
  }

  .sidebar-list-container {
    padding: 10px;
    gap: 6px;
  }

  .sidebar-item-btn {
    padding: 10px 12px;
    min-height: 44px;
  }

  .sidebar-item-name {
    font-size: 0.85rem;
  }

  .reopen-sidebar-btn {
    top: 64px;
    left: 8px;
    padding: 7px 12px;
    font-size: 0.78rem;
    border-radius: 6px;
  }

  /* Barra de Navegação Inferior Fixa no Celular - Grade Nativa 3x2 com Cores Oficiais */
  .main-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(14, 18, 28, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)) 4px;
    backdrop-filter: blur(20px);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.65);
    z-index: 100;
  }

  .nav-scroll-wrapper {
    width: 100%;
    padding: 0;
    overflow-x: hidden;
  }

  .nav-items-container {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 4px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
  }

  .nav-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
    font-size: 0.76rem;
    font-weight: 700;
    min-height: 42px;
    border-radius: 8px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  }

  /* Cores temáticas oficiais dos botões no mobile */
  .nav-item[data-section-id="passeio-livre"] {
    background: rgba(26, 209, 217, 0.16);
    border: 1px solid rgba(26, 209, 217, 0.5);
    border-left: 3.5px solid #1ad1d9;
    color: #e0faff;
  }
  .nav-item[data-section-id="passeio-livre"]:active,
  .nav-item[data-section-id="passeio-livre"].active {
    background: #1ad1d9;
    color: #08222b;
    box-shadow: 0 0 16px rgba(26, 209, 217, 0.6);
  }

  .nav-item[data-section-id="universo"] {
    background: rgba(51, 51, 51, 0.75);
    border: 1px solid rgba(161, 161, 170, 0.45);
    border-left: 3.5px solid #a1a1aa;
    color: #f4f4f5;
  }
  .nav-item[data-section-id="universo"]:active,
  .nav-item[data-section-id="universo"].active {
    background: #333333;
    border-color: #fff;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.35);
  }

  .nav-item[data-section-id="vida"] {
    background: rgba(6, 195, 105, 0.18);
    border: 1px solid rgba(6, 195, 105, 0.55);
    border-left: 3.5px solid #06c369;
    color: #f0fdf4;
  }
  .nav-item[data-section-id="vida"]:active,
  .nav-item[data-section-id="vida"].active {
    background: #06c369;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(6, 195, 105, 0.6);
  }

  .nav-item[data-section-id="engenho"] {
    background: rgba(205, 95, 62, 0.2);
    border: 1px solid rgba(205, 95, 62, 0.55);
    border-left: 3.5px solid #cd5f3e;
    color: #fff7ed;
  }
  .nav-item[data-section-id="engenho"]:active,
  .nav-item[data-section-id="engenho"].active {
    background: #cd5f3e;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(205, 95, 62, 0.6);
  }

  .nav-item[data-section-id="sociedade"] {
    background: rgba(22, 91, 150, 0.24);
    border: 1px solid rgba(22, 91, 150, 0.6);
    border-left: 3.5px solid #165b96;
    color: #f0f9ff;
  }
  .nav-item[data-section-id="sociedade"]:active,
  .nav-item[data-section-id="sociedade"].active {
    background: #165b96;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(22, 91, 150, 0.65);
  }

  .nav-item[data-section-id="exposicoes-passadas"] {
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-left: 3.5px solid #94a3b8;
    color: #f1f5f9;
  }
  .nav-item[data-section-id="exposicoes-passadas"]:active,
  .nav-item[data-section-id="exposicoes-passadas"].active {
    background: #64748b;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(100, 116, 139, 0.5);
  }

  .nav-item .nav-icon-svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }

  .nav-item .nav-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Modal de Ajuda no Celular */
  .help-modal-content {
    width: 94%;
    max-height: 85vh;
  }

  .help-modal-header {
    padding: 10px 14px;
  }

  .help-modal-title {
    font-size: 0.95rem;
  }

  .help-instruction-img {
    max-height: 220px;
  }
}
