:root {
  --background: 0, 0%, 2%;
  --foreground: 0, 0%, 98%;

  --card: 0, 0%, 5%;
  --card-foreground: 0, 0%, 98%;

  --popover: 0, 0%, 7%;
  --popover-foreground: 0, 0%, 98%;

  --primary: 20, 97%, 46%;
  --primary-foreground: 0, 0%, 100%;

  --secondary: 75, 51%, 28%;
  --secondary-foreground: 0, 0%, 100%;

  --muted: 0, 0%, 16%;
  --muted-foreground: 218, 11%, 65%;

  --accent: 0, 0%, 14%;
  --accent-foreground: 0, 0%, 98%;

  --destructive: 0, 84%, 60%;
  --destructive-foreground: 0, 0%, 98%;

  --success: 90, 45%, 45%;
  --success-foreground: 0, 0%, 8%;

  --warning: 45, 93%, 51%;
  --warning-foreground: 0, 0%, 8%;

  --border: 0, 0%, 100%;
  --input: 0, 0%, 100%;
  --ring: 20, 97%, 46%;

  --radius: 1rem;

  --glass-bg: hsla(var(--card), 0.4);
  --glass-bg-hover: hsla(var(--card), 0.6);
  --glass-border: hsla(var(--border), 0.08);
  --glass-border-hover: hsla(var(--border), 0.15);
  --glass-shadow: none;
  --noise-opacity: 0.04;
}

html.light {
  --background: 30, 15%, 97%;
  --foreground: 220, 25%, 10%;

  --card: 0, 0%, 100%;
  --card-foreground: 220, 25%, 10%;

  --popover: 0, 0%, 100%;
  --popover-foreground: 220, 25%, 10%;

  --primary: 20, 97%, 40%;
  --primary-foreground: 0, 0%, 100%;

  --secondary: 75, 55%, 24%;
  --secondary-foreground: 0, 0%, 100%;

  --muted: 30, 12%, 91%;
  --muted-foreground: 220, 15%, 32%;

  --accent: 30, 20%, 92%;
  --accent-foreground: 220, 25%, 10%;

  --destructive: 0, 72%, 45%;
  --destructive-foreground: 0, 0%, 100%;

  --success: 90, 50%, 28%;
  --success-foreground: 0, 0%, 100%;

  --warning: 36, 95%, 31%;
  --warning-foreground: 0, 0%, 100%;

  --border: 220, 15%, 75%;
  --input: 220, 15%, 75%;
  --ring: 20, 97%, 40%;

  --glass-bg: hsla(var(--card), 0.88);
  --glass-bg-hover: hsla(var(--card), 0.96);
  --glass-border: hsla(var(--border), 0.4);
  --glass-border-hover: hsla(var(--border), 0.55);
  --glass-shadow:
    0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --noise-opacity: 0.02;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  overflow-x: hidden;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.theme-toggle {
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  color: hsl(var(--foreground));
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.3),
    0 8px 10px -6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.875rem;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  background-color: var(--glass-bg-hover);
  border-color: hsl(var(--primary) / 0.5);
  color: hsl(var(--primary));
  box-shadow:
    0 15px 30px -5px rgba(0, 0, 0, 0.4),
    0 0 15px hsl(var(--primary) / 0.25);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle i {
  transition:
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease;
}

.theme-toggle:hover i {
  transform: rotate(25deg);
}

/* Ícones e Textos do Toggle por Tema */
.theme-toggle .fa-sun {
  display: inline-block;
}
.theme-toggle .fa-moon,
.theme-toggle .theme-text-light,
.theme-toggle .theme-text-dark {
  display: none;
}

html.light .theme-toggle .fa-sun {
  display: none;
}
html.light .theme-toggle .fa-moon {
  display: inline-block;
}

.theme-toggle .theme-text-light {
  display: inline-block;
}
html.light .theme-toggle .theme-text-light {
  display: none;
}
html.light .theme-toggle .theme-text-dark {
  display: inline-block;
}

/* Efeito de ruído (Grain) */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Efeito de Vidro (Glassmorphism) */
.glass-panel {
  background-color: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.glass-panel:hover {
  background-color: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

/* Animações de Scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Ocultar barra de rolagem mas manter funcionalidade */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* FAQ Accordion */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}
.faq-item.active .faq-answer {
  max-height: 1000px;
  transition: max-height 1s ease-in-out;
}
.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* Páginas de Detalhes e Formulários */
.glass-input {
  background-color: hsla(var(--background), 0.5);
  border: 1px solid hsla(var(--input), 0.45);
  color: hsl(var(--foreground));
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  width: 100%;
  transition: all 0.2s ease-in-out;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.glass-input::placeholder {
  color: hsl(var(--muted-foreground) / 0.6);
}

.glass-input:hover {
  background-color: hsla(var(--card), 0.6);
  border-color: hsla(var(--border), 0.2);
}

.glass-input:focus {
  outline: none;
  border-color: hsl(var(--primary));
  background-color: hsla(var(--card), 0.8);
  box-shadow:
    0 0 0 4px hsl(var(--primary) / 0.15),
    inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

select.glass-input {
  color-scheme: dark;
}

.glass-input option {
  color: hsl(var(--foreground));
  background-color: hsl(var(--card));
}
.glass-input:focus {
  outline: none;
  border-color: hsla(var(--ring), 0.5);
  background-color: hsla(var(--background), 0.8);
}

/* Contorno animado do buscador: borda suave que "respira" e acende no hover/foco */
@keyframes borderFlow {
  0% { background-position: 0% 50%, 0% 50%; }
  100% { background-position: 0% 50%, 200% 50%; }
}

#busca-trilhas .glass-input,
#busca-trilhas .route-finder-tab:not([aria-selected="true"]),
#route-finder-clear,
.animated-border {
  --finder-fill: hsl(var(--background));
  --finder-line: hsla(var(--border), 0.22);
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--finder-fill), var(--finder-fill)) padding-box,
    linear-gradient(90deg, var(--finder-line), hsla(var(--primary), 0.85), var(--finder-line), hsla(var(--primary), 0.85), var(--finder-line)) border-box;
  background-size: 100% 100%, 200% 100%;
  transition: box-shadow 0.4s ease, transform 0.3s ease;
}

#busca-trilhas .route-finder-tab:not([aria-selected="true"]),
#route-finder-clear {
  --finder-fill: hsl(var(--muted));
}

.animated-border {
  --finder-fill: hsl(var(--card));
}

#busca-trilhas .glass-input:hover,
#busca-trilhas .route-finder-tab:not([aria-selected="true"]):hover,
#route-finder-clear:hover,
#busca-trilhas .glass-input:focus,
.animated-border:hover {
  animation: borderFlow 2.5s linear infinite;
  box-shadow: 0 0 14px -2px hsla(var(--primary), 0.45);
}

#busca-trilhas .glass-input:focus {
  box-shadow: 0 0 0 3px hsla(var(--primary), 0.18), 0 0 18px -2px hsla(var(--primary), 0.5);
}

#busca-trilhas .route-finder-tab[aria-selected="true"] {
  box-shadow: 0 0 16px -3px hsla(var(--primary), 0.6);
}

html.light #busca-trilhas .glass-input {
  --finder-fill: hsl(var(--card));
  --finder-line: hsla(var(--border), 0.7);
}

html.light #busca-trilhas .route-finder-tab:not([aria-selected="true"]),
html.light #route-finder-clear,
html.light .animated-border {
  --finder-line: hsla(var(--border), 0.7);
}

/* Mantém a transição de entrada (scroll) dos cards animados */
.animated-border.reveal {
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Evita que o hover do glass-panel troque a borda animada por uma cor sólida */
.glass-panel.animated-border:hover {
  border-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  #busca-trilhas .glass-input:hover,
  #busca-trilhas .glass-input:focus,
  #busca-trilhas .route-finder-tab:hover,
  #route-finder-clear:hover,
  .animated-border:hover {
    animation: none;
  }
}

html.light .glass-input {
  background-color: hsl(var(--card));
  border: 1px solid hsla(var(--border), 0.6);
  color: hsl(var(--foreground));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

html.light select.glass-input {
  color-scheme: light;
}

html.light .glass-input option {
  color: hsl(var(--foreground));
  background-color: hsl(var(--card));
}

html.light .glass-input::placeholder {
  color: hsl(var(--muted-foreground) / 0.8);
}

html.light .glass-input:hover {
  background-color: hsla(var(--card), 0.95);
  border-color: hsla(var(--border), 0.3);
}

html.light .glass-input:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsla(var(--primary), 0.15);
}

/* Animações utilitárias registradas no tailwind.config.js */
.toast-animate {
  animation: slideIn 0.3s ease-out forwards;
}

.galeria-item {
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.route-card-focus {
  outline: 2px solid hsl(var(--primary));
  box-shadow: 0 0 0 4px hsla(var(--primary), 0.2);
}


/* Prévia do perfil do Instagram (sempre no tema escuro, como o app) */
.ig-phone {
  width: 100%;
  max-width: 24.5rem;
  height: 41rem;
  max-height: 85vh;
  background-color: #0c1014;
  color: #f5f5f5;
  border-radius: 2rem;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  position: relative;
}

.ig-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #2b3138 transparent;
  font-size: 0.9rem;
  line-height: 1.35;
}

.ig-scroll:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: -2px;
}

.ig-loading {
  padding: 2rem 1.25rem;
  color: #a8a8a8;
  text-align: center;
}

.ig-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 2rem 1fr 2rem;
  align-items: center;
  text-align: center;
  padding: 0.9rem 1rem;
  background: #0c1014;
  font-size: 1rem;
}

.ig-back {
  color: #f5f5f5;
  text-align: left;
}

.ig-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.5rem 1.1rem 0.75rem;
}

.ig-avatar {
  flex: none;
  width: 5.2rem;
  height: 5.2rem;
  padding: 3px;
  border-radius: 9999px;
  border: 2px solid #2b3138;
  overflow: hidden;
}

.ig-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9999px;
  background: #fff;
}

.ig-handle {
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.ig-stats {
  display: flex;
  gap: 1.25rem;
}

.ig-stats div {
  display: flex;
  flex-direction: column;
}

.ig-stats strong {
  font-size: 1.05rem;
}

.ig-stats span,
.ig-muted {
  color: #a8a8a8;
}

.ig-bio {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 1.1rem 0.9rem;
}

.ig-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.1rem 1rem;
}

.ig-btn {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
  background: #25292e;
  color: #f5f5f5;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.ig-btn:hover {
  background: #323840;
}

.ig-btn-primary {
  background: #0095f6;
}

.ig-btn-primary:hover {
  background: #1877f2;
}

.ig-highlights {
  display: flex;
  gap: 0.9rem;
  padding: 0.25rem 1.1rem 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.ig-highlights::-webkit-scrollbar {
  display: none;
}

.ig-highlight {
  flex: none;
  width: 4.4rem;
  text-align: center;
  color: #f5f5f5;
}

.ig-highlight-ring {
  display: block;
  width: 4.4rem;
  height: 4.4rem;
  padding: 3px;
  border-radius: 9999px;
  border: 2px solid #2b3138;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.ig-highlight:hover .ig-highlight-ring {
  transform: scale(1.06);
  border-color: hsl(var(--primary));
}

.ig-highlight-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9999px;
}

.ig-highlight-label {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ig-tabs {
  position: sticky;
  top: 3.2rem;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #0c1014;
  border-bottom: 1px solid #262b31;
}

.ig-tabs span {
  display: flex;
  justify-content: center;
  padding: 0.7rem 0;
  color: #8a8f96;
  border-bottom: 2px solid transparent;
}

.ig-tabs .is-active {
  color: #f5f5f5;
  border-bottom-color: #f5f5f5;
}

.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding-top: 2px;
}

.ig-tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1a1e23;
}

.ig-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.ig-tile:hover img {
  transform: scale(1.06);
  filter: brightness(0.8);
}

.ig-tile-badge {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

/* Moldura do Instagram: mesma borda animada das demais seções, com laranja mais forte em repouso */
.ig-phone.animated-border,
html.light .ig-phone.animated-border {
  --finder-fill: #0c1014;
  --finder-line: hsla(var(--primary), 0.8);
  border-width: 2px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 0 28px -8px hsla(var(--primary), 0.35);
}

/* Carrosséis infinitos (depoimentos e vídeos): a faixa é duplicada por JS e desliza metade do comprimento */
.testimonial-marquee,
.video-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.testimonial-track,
.video-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
}

.testimonial-track.is-marquee {
  animation: marqueeSlide 105s linear infinite;
}

.video-track.is-marquee {
  animation: marqueeSlide 70s linear infinite;
}

.testimonial-marquee:hover .is-marquee,
.testimonial-marquee:focus-within .is-marquee,
.video-marquee:hover .is-marquee,
.video-marquee:focus-within .is-marquee,
.video-marquee.is-paused .is-marquee {
  animation-play-state: paused;
}

@keyframes marqueeSlide {
  to {
    transform: translateX(calc(-50% - 0.75rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-marquee,
  .video-marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .is-marquee {
    animation: none !important;
  }
}

/* Mapa de trilhas (Leaflet carregado sob demanda) */
.rmap-wrap {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  isolation: isolate;
}

.rmap-canvas {
  height: 34rem;
  max-height: 75vh;
  background: #0c1014;
}

.rmap-canvas.is-dark-map .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.95) saturate(0.7);
}

.rmap-error {
  position: absolute;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background: rgba(5, 5, 5, 0.85);
  color: #fafafa;
}

.rmap-reset {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  background: rgba(13, 13, 13, 0.85);
  color: #fafafa;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.rmap-reset:hover {
  border-color: hsl(var(--primary));
}

.rmap-pin {
  background: none;
  border: none;
}

.rmap-pin-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: hsl(var(--primary));
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 0 0 hsla(var(--primary), 0.6);
  transition: transform 0.25s ease;
}

.rmap-pin:hover .rmap-pin-dot,
.rmap-pin:focus-visible .rmap-pin-dot {
  transform: scale(1.15);
}

.rmap-pin.is-active {
  z-index: 1000 !important;
}

.rmap-pin.is-active .rmap-pin-dot {
  transform: scale(1.3);
  animation: rmapPulse 1.8s ease-out infinite;
}

@keyframes rmapPulse {
  0% { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 0 0 hsla(var(--primary), 0.65); }
  100% { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 0 18px hsla(var(--primary), 0); }
}

.rmap-base {
  background: none;
  border: none;
}

.rmap-base span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: rgba(13, 13, 13, 0.85);
  color: #fafafa;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.rmap-card {
  position: absolute;
  z-index: 1100;
  left: 0.75rem;
  bottom: 0.75rem;
  width: 22rem;
  max-width: calc(100% - 1.5rem);
  max-height: calc(100% - 4rem);
  overflow-y: auto;
  border-radius: 1.25rem;
  background: rgba(10, 10, 10, 0.94);
  color: #fafafa;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.7);
  animation: rmapCardIn 0.35s ease-out both;
}

@keyframes rmapCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.rmap-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  cursor: pointer;
}

.rmap-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.rmap-body {
  padding: 1rem 1.1rem 1.1rem;
}

.rmap-area {
  color: hsl(var(--primary));
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rmap-title {
  margin-top: 0.15rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.rmap-why-label {
  margin-top: 0.8rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ba3af;
}

.rmap-why {
  margin-top: 0.15rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #e7e7e7;
}

.rmap-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.rmap-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  font-weight: 600;
}

.rmap-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  color: #fff;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.rmap-cta:hover {
  transform: translateY(-1px);
}

.rmap-approx {
  margin-top: 0.6rem;
  font-size: 0.7rem;
  color: #8a8f96;
  text-align: center;
}

.rmap-list {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-bottom: 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.rmap-list-item {
  flex: none;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
  border: 1px solid hsla(var(--border), 0.2);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.rmap-list-item:hover,
.rmap-list-item[aria-pressed="true"] {
  border-color: hsl(var(--primary));
  background: hsla(var(--primary), 0.15);
}

@media (max-width: 640px) {
  .rmap-card {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    width: auto;
    max-width: none;
    max-height: 60%;
  }
}

/* Páginas legais (política de privacidade e termos de uso) */
.legal-content h2 {
  margin: 2rem 0 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: hsl(var(--foreground));
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  color: hsl(var(--muted-foreground));
  line-height: 1.75;
}

.legal-content p + p {
  margin-top: 0.75rem;
}

.legal-content ul {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.legal-content li + li {
  margin-top: 0.4rem;
}

.legal-content strong {
  color: hsl(var(--foreground));
}

.legal-content a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Ajustes para celular */
@media (max-width: 480px) {
  .ig-phone {
    height: 38rem;
    border-radius: 1.5rem;
  }

  .ig-head {
    gap: 0.8rem;
    padding-inline: 0.9rem;
  }

  .ig-avatar {
    width: 4.2rem;
    height: 4.2rem;
  }

  .ig-stats {
    gap: 0.8rem;
  }

  .ig-stats strong {
    font-size: 0.98rem;
  }

  .ig-stats span {
    font-size: 0.78rem;
  }

  .ig-bio,
  .ig-actions {
    padding-inline: 0.9rem;
  }

  #stats-grid > * {
    padding: 0.75rem 0.5rem;
  }

  #stats-grid .tracking-widest,
  #stats-grid [class*="uppercase"] {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
  }

  .rmap-canvas {
    height: 26rem;
  }

  .rmap-card {
    max-height: 70%;
  }

  .rmap-photo {
    aspect-ratio: 16 / 8;
  }
}

/* o carrossel de depoimentos usa cartões um pouco menores no celular */
@media (max-width: 480px) {
  .testimonial-track > * {
    width: 290px !important;
    padding: 1.5rem !important;
  }
}

/* No menu do celular o botão de tema mostra o texto, que fica escondido nas telas pequenas */
#mobile-menu-panel .theme-toggle .theme-text-light { display: inline-block; }
html.light #mobile-menu-panel .theme-toggle .theme-text-light { display: none; }
html.light #mobile-menu-panel .theme-toggle .theme-text-dark { display: inline-block; }

/* Mapa no celular: o card da trilha aparece abaixo do mapa, sem cobrir os pontos */
@media (max-width: 640px) {
  .rmap-card {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border-width: 1px 0 0;
    box-shadow: none;
    overflow: visible;
  }

  .rmap-photo {
    aspect-ratio: 16 / 9;
  }
}

/* Tela de carregamento: o alpinista do favicon subindo a trilha */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: hsl(var(--background));
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-art {
  filter: drop-shadow(0 12px 40px hsla(var(--primary), 0.35));
}

.preloader-brand {
  margin-top: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
}

.preloader-text {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground));
}

.pl-dots i {
  font-style: normal;
  animation: plDot 1.2s infinite both;
}
.pl-dots i:nth-child(2) { animation-delay: 0.2s; }
.pl-dots i:nth-child(3) { animation-delay: 0.4s; }

@keyframes plDot {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

.pl-rings {
  transform-origin: 60px 60px;
  animation: plSpin 6s linear infinite;
}

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

.pl-trail {
  animation: plTrail 0.9s linear infinite;
}

@keyframes plTrail {
  to { stroke-dashoffset: -6; }
}

/* sobe pela encosta: a linha da montanha vai de (0,105) a (120,45), então y = 105 - x / 2 */
.pl-hiker {
  animation: plClimb 3.2s ease-in-out infinite;
}

@keyframes plClimb {
  0%   { transform: translate(18px, 96px); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translate(98px, 56px); opacity: 0; }
}

.pl-leg { animation: plStep 0.55s ease-in-out infinite alternate; }
.pl-leg-a { transform-origin: -1px -9px; }
.pl-leg-b { transform-origin: -1px -9px; animation-direction: alternate-reverse; }

@keyframes plStep {
  from { transform: rotate(-26deg); }
  to   { transform: rotate(26deg); }
}

.pl-pole { transform-origin: 3px -17px; animation: plPole 0.55s ease-in-out infinite alternate; }

@keyframes plPole {
  from { transform: rotate(14deg); }
  to   { transform: rotate(-14deg); }
}

@media (prefers-reduced-motion: reduce) {
  .pl-rings,
  .pl-trail,
  .pl-leg,
  .pl-pole,
  .pl-dots i {
    animation: none;
  }

  .pl-hiker {
    animation: none;
    transform: translate(58px, 76px);
  }
}

/* Barra de rolagem horizontal no padrão do site (lista de trilhas do mapa) */
.rmap-list {
  scrollbar-width: auto;
  padding-bottom: 0.9rem;
}

/* Chrome, Edge e Safari: barra fina laranja, sem setas */
@supports selector(::-webkit-scrollbar) {
  .rmap-list {
    scrollbar-width: auto;
  }

  .rmap-list::-webkit-scrollbar {
    height: 6px;
  }

  .rmap-list::-webkit-scrollbar-track {
    background: hsla(var(--border), 0.1);
    border-radius: 9999px;
  }

  .rmap-list::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, hsl(var(--primary)), hsla(var(--primary), 0.55));
    border-radius: 9999px;
  }

  .rmap-list::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--primary));
  }

  .rmap-list::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
  }
}

/* Firefox: barra fina laranja */
@supports not selector(::-webkit-scrollbar) {
  .rmap-list {
    scrollbar-width: thin;
    scrollbar-color: hsla(var(--primary), 0.8) transparent;
  }
}

/* Barra "Para onde você quer ir?": grande, simples e de alto contraste */
.destino-bar {
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.55), 0 0 40px -12px hsla(var(--primary), 0.35);
}

.destino-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.4rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 800;
  font-size: 1.05rem;
}

.destino-select {
  width: 100%;
  min-height: 4rem;
  padding: 0.9rem 3.25rem 0.9rem 1rem;
  text-overflow: ellipsis;
  border-radius: 1rem;
  border: 2px solid hsla(var(--border), 0.55);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 1.2rem;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.destino-select:hover {
  border-color: hsl(var(--primary));
}

.destino-select:focus-visible,
.destino-btn:focus-visible,
.destino-help:focus-visible {
  outline: 3px solid hsl(var(--ring));
  outline-offset: 3px;
}

.destino-select option {
  color: hsl(var(--foreground));
  background-color: hsl(var(--card));
}

.destino-select-icon {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: hsl(var(--primary));
  pointer-events: none;
}

.destino-btn {
  display: flex;
  width: 100%;
  min-height: 4rem;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 34px -10px hsla(var(--primary), 0.6);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.destino-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.destino-ou {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.75rem 0 1.25rem;
  color: hsl(var(--muted-foreground));
  font-size: 1rem;
}

.destino-ou::before,
.destino-ou::after {
  content: "";
  flex: 1;
  height: 1px;
  background: hsla(var(--border), 0.4);
}

.destino-help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 2px solid hsl(var(--secondary));
  color: hsl(var(--foreground));
  text-align: left;
  transition: background-color 0.2s ease;
}

.destino-help i {
  color: hsl(var(--success));
}

.destino-help:hover {
  background-color: hsla(var(--secondary), 0.14);
}

.destino-help span span {
  color: hsl(var(--muted-foreground));
}

@media (min-width: 768px) {
  .destino-bar form {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 1.25rem;
  }

  .destino-btn {
    padding-inline: 2.5rem;
    white-space: nowrap;
  }
}

/* Guia animado: boneco de trilha que acompanha a pessoa pelo site */
.gm {
  --gm-bottom: 1rem;
  position: fixed;
  right: 1rem;
  bottom: var(--gm-bottom);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  pointer-events: none;
}

.gm > * {
  pointer-events: auto;
}

.gm-hiker {
  position: relative;
  width: 6.6rem;
  height: 8.6rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
  border-radius: 1rem;
  background: none;
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.55)) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
  transition: transform 0.25s ease;
}

.gm-hiker:hover {
  transform: translateY(-4px) scale(1.05);
}

.gm-hiker:focus-visible {
  outline: 3px solid hsl(var(--ring));
  outline-offset: 2px;
}

.gm-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transition: transform 0.3s ease;
}

.gm-hiker.is-facing-back .gm-svg {
  transform: scaleX(-1);
}

.gm-leg,
.gm-pole,
.gm-arm {
  transform-box: view-box;
}

.gm-leg-a,
.gm-leg-b { transform-origin: 29px 50px; }
.gm-pole { transform-origin: 40px 42px; }
.gm-arm { transform-origin: 33px 35px; }

/* parado: respira de leve */
.gm-body {
  animation: gmBreath 3.2s ease-in-out infinite;
  transform-origin: 29px 78px;
}

@keyframes gmBreath {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.025); }
}

/* andando: pernas, braço e bastão alternam, e o corpo balança */
.gm-hiker.is-walking .gm-body {
  animation: gmBob 0.46s ease-in-out infinite;
}

.gm-hiker.is-walking .gm-leg-a { animation: gmStep 0.46s ease-in-out infinite alternate; }
.gm-hiker.is-walking .gm-leg-b { animation: gmStep 0.46s ease-in-out infinite alternate-reverse; }
.gm-hiker.is-walking .gm-pole,
.gm-hiker.is-walking .gm-arm { animation: gmPole 0.46s ease-in-out infinite alternate; }

@keyframes gmStep {
  from { transform: rotate(-24deg); }
  to { transform: rotate(24deg); }
}

@keyframes gmPole {
  from { transform: rotate(12deg); }
  to { transform: rotate(-14deg); }
}

@keyframes gmBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2.5px); }
}

/* balão de fala sobre a cabeça */
.gm-bubble {
  position: relative;
  max-width: min(17rem, calc(100vw - 2rem));
  margin-right: 0.4rem;
  border-radius: 1.1rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  border: 2px solid hsl(var(--primary));
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom right;
  pointer-events: none !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gm-bubble.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto !important;
}

.gm-bubble::after {
  content: "";
  position: absolute;
  right: 2.1rem;
  bottom: -0.55rem;
  width: 1rem;
  height: 1rem;
  background: hsl(var(--card));
  border-right: 2px solid hsl(var(--primary));
  border-bottom: 2px solid hsl(var(--primary));
  transform: rotate(45deg);
}

.gm-bubble-main {
  display: block;
  width: 100%;
  padding: 0.85rem 2rem 0.85rem 1rem;
  text-align: left;
  cursor: pointer;
  border-radius: 1.1rem;
}

.gm-bubble-main strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.25;
}

.gm-bubble-main span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.95rem;
  color: hsl(var(--muted-foreground));
}

.gm-bubble-close {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  z-index: 1;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 9999px;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
}

.gm-bubble-close:hover {
  color: hsl(var(--foreground));
  background: hsla(var(--border), 0.2);
}

/* painel de ajuda */
.gm-panel {
  width: min(24rem, calc(100vw - 2rem));
  max-height: calc(100vh - 9rem);
  overflow-y: auto;
  padding: 1.25rem;
  border-radius: 1.5rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  border: 2px solid hsl(var(--primary));
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.65);
  animation: gmPanelIn 0.3s ease-out both;
}

@keyframes gmPanelIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.gm-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.gm-panel-head h2 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.gm-panel-close {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 9999px;
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  cursor: pointer;
}

.gm-panel-lead {
  margin: 0.4rem 0 1rem;
  font-size: 1.05rem;
  color: hsl(var(--muted-foreground));
}

.gm-label {
  display: block;
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.gm-label-2 {
  margin-top: 1rem;
}

.gm-warning {
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: hsl(var(--destructive));
}

.gm-panel .destino-select {
  min-height: 3.6rem;
  font-size: 1.1rem;
}

.gm-panel .destino-btn {
  min-height: 3.6rem;
  font-size: 1.2rem;
}

.gm-panel .destino-ou {
  margin: 1.1rem 0 0.9rem;
}

@media (max-width: 480px) {
  .gm {
    right: 0.5rem;
  }

  .gm-hiker {
    width: 5.2rem;
    height: 6.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gm-body,
  .gm-hiker.is-walking .gm-body,
  .gm-hiker.is-walking .gm-leg,
  .gm-hiker.is-walking .gm-pole,
  .gm-hiker.is-walking .gm-arm,
  .gm-panel {
    animation: none;
  }

  .gm-bubble {
    transition: none;
  }
}

/* na página da trilha o guia sobe para não cobrir a barra "Agendar" do celular */
@media (max-width: 767px) {
  body:has(#details-mobile-menu-toggle) .gm { --gm-bottom: 5.6rem; }
}

/* celular deitado ou janela baixa: o boneco some enquanto o painel está aberto, para o painel caber */
@media (max-height: 560px) {
  .gm:has(.gm-panel:not(.hidden)) .gm-hiker {
    display: none;
  }

  .gm-panel {
    max-height: calc(100dvh - var(--gm-bottom) - 1rem);
  }
}
