/* ==========================================================================
   EuroTruckHub — Design System
   ========================================================================== */

:root {
  --rt-navy-950: #05070d;
  --rt-navy-900: #0a0f1c;
  --rt-navy-800: #111a2e;
  --rt-navy-700: #1a2740;
  --rt-navy-600: #263654;
  --rt-navy-500: #3a4d70;
  --rt-ink-100: #f4f6fb;
  --rt-ink-300: #c3ccdc;
  --rt-ink-500: #8a97b3;

  --rt-orange-500: #ff7a1a;
  --rt-orange-400: #ff9142;
  --rt-orange-600: #e4630a;

  --rt-green-500: #22c55e;
  --rt-green-400: #4ade80;
  --rt-yellow-500: #fbbf24;
  --rt-red-500: #ef4444;

  --rt-bg: var(--rt-navy-950);
  --rt-surface: var(--rt-navy-900);
  --rt-surface-2: var(--rt-navy-800);
  --rt-border: rgba(255, 255, 255, 0.08);
  --rt-border-strong: rgba(255, 255, 255, 0.14);
  --rt-text: var(--rt-ink-100);
  --rt-text-dim: var(--rt-ink-300);
  --rt-text-faint: var(--rt-ink-500);
  --rt-accent: var(--rt-orange-500);

  --rt-radius-sm: 10px;
  --rt-radius-md: 16px;
  --rt-radius-lg: 24px;
  --rt-radius-full: 999px;

  --rt-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --rt-shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.45);
  --rt-shadow-glow: 0 0 0 1px rgba(255, 122, 26, 0.25), 0 8px 32px rgba(255, 122, 26, 0.18);

  --rt-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --rt-font-display: 'Manrope', var(--rt-font);
}

:root[data-theme='light'] {
  --rt-bg: #f5f6fa;
  --rt-surface: #ffffff;
  --rt-surface-2: #eef1f7;
  --rt-border: rgba(10, 15, 28, 0.08);
  --rt-border-strong: rgba(10, 15, 28, 0.14);
  --rt-text: #0a0f1c;
  --rt-text-dim: #445070;
  --rt-text-faint: #6b7690;
  --rt-shadow-md: 0 8px 24px rgba(10, 15, 28, 0.08);
  --rt-shadow-lg: 0 24px 64px rgba(10, 15, 28, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--rt-bg);
  color: var(--rt-text);
  font-family: var(--rt-font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4 {
  font-family: var(--rt-font-display);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.4em;
  letter-spacing: -0.02em;
}

p { margin: 0 0 1em; color: var(--rt-text-dim); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Utility ---------- */
.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }
.mt-24 { margin-top: 24px; }
.text-center { text-align: center; }
.text-dim { color: var(--rt-text-dim); }
.text-faint { color: var(--rt-text-faint); }
.text-accent { color: var(--rt-orange-400); }
.small { font-size: 13px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--rt-radius-full);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--rt-orange-400), var(--rt-orange-600));
  color: #fff;
  box-shadow: var(--rt-shadow-glow);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(255,122,26,.4), 0 12px 36px rgba(255,122,26,.3); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--rt-border-strong);
  color: var(--rt-text);
}
.btn-ghost:hover { border-color: var(--rt-orange-400); color: var(--rt-orange-400); }

.btn-surface {
  background: var(--rt-surface-2);
  color: var(--rt-text);
  border-color: var(--rt-border);
}
.btn-surface:hover { border-color: var(--rt-border-strong); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon { padding: 10px; width: 42px; height: 42px; border-radius: var(--rt-radius-full); }

/* ---------- Nav ---------- */
.rt-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--rt-bg) 78%, transparent);
  border-bottom: 1px solid var(--rt-border);
}
.rt-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.rt-logo { display: flex; align-items: center; gap: 9px; font-family: var(--rt-font-display); font-weight: 800; font-size: 19px; }
.rt-logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--rt-orange-400), var(--rt-orange-600));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rt-logo-mark svg { width: 19px; height: 19px; }
.rt-nav-links { display: flex; align-items: center; gap: 28px; }
.rt-nav-links a { font-size: 14.5px; font-weight: 600; color: var(--rt-text-dim); transition: color .15s ease; }
.rt-nav-links a:hover, .rt-nav-links a.active { color: var(--rt-text); }
.rt-nav-actions { display: flex; align-items: center; gap: 10px; }
.rt-nav-toggle {
  display: none;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--rt-border-strong);
  background: var(--rt-surface-2);
  align-items: center; justify-content: center;
  color: var(--rt-text); flex-shrink: 0;
}
.rt-nav-toggle svg { width: 20px; height: 20px; }

.rt-nav-mobile-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0 24px 16px;
  max-width: 1180px;
  margin: 0 auto;
}
.rt-nav-mobile-panel.is-open { display: flex; }
.rt-nav-mobile-panel a {
  padding: 12px 4px;
  font-size: 15px; font-weight: 600; color: var(--rt-text-dim);
  border-top: 1px solid var(--rt-border);
}
.rt-nav-mobile-panel a.active { color: var(--rt-orange-400); }
.rt-nav-mobile-auth { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.rt-nav-mobile-auth a { border-top: none; padding: 0; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--rt-border-strong);
  background: var(--rt-surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--rt-text);
}
.theme-toggle svg { width: 18px; height: 18px; }

.rt-notif-wrap { position: relative; }
.rt-notif-badge {
  position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 999px; background: var(--rt-red-500); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
}
.rt-notif-panel {
  display: none; position: absolute; top: calc(100% + 10px); right: 0; width: 320px; max-height: 400px;
  overflow-y: auto; background: var(--rt-surface); border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-lg); box-shadow: 0 12px 32px rgba(0,0,0,.28); z-index: 60;
}
.rt-notif-panel.is-open { display: block; }
.rt-notif-item {
  display: block; padding: 12px 16px; border-bottom: 1px solid var(--rt-border);
  color: var(--rt-text); text-decoration: none;
}
.rt-notif-item:last-child { border-bottom: none; }
.rt-notif-item.is-unread { background: rgba(255,122,26,.08); }
.rt-notif-item-title { font-weight: 700; font-size: 13.5px; }
.rt-notif-item-body { font-size: 12.5px; color: var(--rt-text-dim); margin-top: 2px; }
.rt-notif-item-time { font-size: 11.5px; color: var(--rt-text-faint); margin-top: 4px; }
.rt-notif-empty { padding: 20px 16px; font-size: 13px; color: var(--rt-text-faint); text-align: center; }

.rt-lang-wrap { position: relative; }
.rt-lang-panel {
  display: none; position: absolute; top: calc(100% + 10px); right: 0; width: 170px;
  background: var(--rt-surface); border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-lg); box-shadow: 0 12px 32px rgba(0,0,0,.28); z-index: 60;
  padding: 6px;
}
.rt-lang-panel.is-open { display: block; }
.rt-lang-option {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 9px 12px; border-radius: 8px; border: none; background: none; cursor: pointer;
  color: var(--rt-text-dim); font-size: 13.5px; font-weight: 600; text-align: left;
}
.rt-lang-option:hover { background: var(--rt-surface-2); color: var(--rt-text); }
.rt-lang-option.is-active { color: var(--rt-orange-400); font-weight: 800; }

@media (max-width: 860px) {
  .rt-nav-links { display: none; }
  .rt-nav-toggle { display: flex; }
  .rt-nav-actions .btn-primary.btn-sm { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 76px 0 48px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(60% 60% at 20% 20%, rgba(255, 122, 26, 0.22), transparent 70%),
    radial-gradient(50% 50% at 85% 10%, rgba(34, 197, 94, 0.14), transparent 70%);
  z-index: -1;
  filter: blur(10px);
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--rt-radius-full);
  background: var(--rt-surface-2); border: 1px solid var(--rt-border-strong);
  font-size: 13px; font-weight: 700; color: var(--rt-orange-400);
  margin-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); max-width: 820px; }
.hero .lead { font-size: clamp(16px, 1.7vw, 19px); max-width: 620px; color: var(--rt-text-dim); }
.hl { color: var(--rt-orange-400); }

/* ---------- Search bar ---------- */
.search-bar {
  background: var(--rt-surface);
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-lg);
  padding: 10px;
  display: flex;
  gap: 8px;
  box-shadow: var(--rt-shadow-lg);
  margin-top: 32px;
  flex-wrap: wrap;
}
.search-field {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--rt-radius-md);
  min-width: 0;
}
.search-field + .search-field { border-left: 1px solid var(--rt-border); }
.search-field svg { flex-shrink: 0; color: var(--rt-text-faint); width: 18px; height: 18px; }
.search-field input, .search-field select {
  border: none; background: transparent; color: var(--rt-text);
  font-size: 14.5px; font-weight: 600; width: 100%; outline: none;
  font-family: inherit;
}
.search-field input::placeholder { color: var(--rt-text-faint); font-weight: 500; }
.search-bar .btn-primary { flex-shrink: 0; }

@media (max-width: 760px) {
  .search-bar { flex-direction: column; }
  /* Em coluna, o flex-basis de 200px passaria a valer como ALTURA e deixava
     cada campo com ~200px de espaço morto — aqui a base volta ao conteúdo. */
  .search-field { flex: 0 0 auto; }
  .search-field + .search-field { border-left: none; border-top: 1px solid var(--rt-border); }
}

.hero-quick-links { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }
.hero-quick-link {
  display: flex; align-items: center; gap: 10px;
  background: var(--rt-surface); border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-full); padding: 6px 20px 6px 6px;
  font-weight: 700; font-size: 14px; color: var(--rt-text);
  transition: border-color .15s ease, transform .15s ease;
}
.hero-quick-link:hover { border-color: var(--rt-orange-500); transform: translateY(-2px); }
.hero-quick-icon {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255, 122, 26, .15); color: var(--rt-orange-400);
  display: flex; align-items: center; justify-content: center;
}
.hero-quick-icon svg { width: 18px; height: 18px; }

/* ---------- Stats strip ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 0;
  border-top: 1px solid var(--rt-border);
  border-bottom: 1px solid var(--rt-border);
  margin: 56px 0;
}
.stat-item { text-align: center; }
.stat-num { font-family: var(--rt-font-display); font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.stat-label { color: var(--rt-text-faint); font-size: 13.5px; font-weight: 600; }
@media (max-width: 760px) { .stats-strip { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Section heading ---------- */
.section-head { max-width: 620px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--rt-orange-400); margin-bottom: 10px;
}

/* ---------- Feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--rt-surface);
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-lg);
  padding: 28px;
  transition: transform .2s ease, border-color .2s ease;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--rt-border-strong); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; margin-bottom: 0; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.step-item { position: relative; padding-left: 4px; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--rt-surface-2); border: 1px solid var(--rt-border-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--rt-font-display); font-weight: 800; color: var(--rt-orange-400);
  margin-bottom: 16px; font-size: 16px;
}
.step-item h3 { font-size: 17px; }
.step-item p { font-size: 14.5px; }
@media (max-width: 900px) { .steps-grid { grid-template-columns: 1fr; } }

/* ---------- Safety showcase ---------- */
.safety-section {
  background: var(--rt-surface);
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.safety-meter { display: flex; flex-direction: column; gap: 14px; }
.safety-row { display: flex; align-items: center; gap: 12px; }
.safety-row .label { flex: 0 0 150px; font-size: 13.5px; font-weight: 600; color: var(--rt-text-dim); }
.safety-track { flex: 1; height: 8px; border-radius: 99px; background: var(--rt-surface-2); overflow: hidden; }
.safety-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--rt-green-500), var(--rt-green-400)); }
.safety-score-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--rt-surface-2); border: 1px solid var(--rt-border-strong);
  padding: 10px 18px; border-radius: var(--rt-radius-full); font-weight: 700; font-size: 14px;
  margin-bottom: 20px;
}
@media (max-width: 900px) { .safety-section { grid-template-columns: 1fr; padding: 28px; } }

/* ---------- Testimonials ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testi-card {
  background: var(--rt-surface); border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-lg); padding: 24px;
}
.testi-stars { color: var(--rt-yellow-500); font-size: 14px; margin-bottom: 12px; letter-spacing: 2px; }
.testi-quote { font-size: 14.5px; color: var(--rt-text); margin-bottom: 18px; }
.testi-person { display: flex; align-items: center; gap: 10px; }
.testi-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff; flex-shrink: 0;
}
.testi-name { font-size: 13.5px; font-weight: 700; }
.testi-role { font-size: 12px; color: var(--rt-text-faint); }
@media (max-width: 900px) { .testi-grid { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--rt-navy-800), var(--rt-navy-700));
  border-radius: var(--rt-radius-lg);
  padding: 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rt-border-strong);
}
.cta-band::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(60% 100% at 50% 0%, rgba(255,122,26,.25), transparent 70%);
}
.cta-band > * { position: relative; z-index: 1; }
.store-badges { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.store-badge {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.06); border: 1px solid var(--rt-border-strong);
  padding: 10px 18px; border-radius: 12px; font-size: 13px;
}
.store-badge b { display: block; font-size: 15px; font-family: var(--rt-font-display); }
.store-badge svg { width: 22px; height: 22px; }

/* ---------- Footer ---------- */
.rt-footer { border-top: 1px solid var(--rt-border); padding: 56px 0 32px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--rt-text-faint); margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: var(--rt-text-dim); }
.footer-links a:hover { color: var(--rt-orange-400); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--rt-border); font-size: 13px; color: var(--rt-text-faint); flex-wrap: wrap; gap: 12px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Badges & pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--rt-radius-full);
  font-size: 12px; font-weight: 700;
}
.badge-green { background: rgba(34,197,94,.15); color: var(--rt-green-400); }
.badge-orange { background: rgba(255,122,26,.15); color: var(--rt-orange-400); }
.badge-yellow { background: rgba(251,191,36,.15); color: var(--rt-yellow-500); }
.badge-red { background: rgba(239,68,68,.15); color: var(--rt-red-500); }
.badge-neutral { background: var(--rt-surface-2); color: var(--rt-text-dim); border: 1px solid var(--rt-border); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--rt-radius-full);
  background: var(--rt-surface-2); border: 1px solid var(--rt-border);
  font-size: 13px; font-weight: 600; color: var(--rt-text-dim);
  cursor: pointer; transition: all .15s ease; white-space: nowrap;
}
.chip:hover { border-color: var(--rt-border-strong); }
.chip.active { background: var(--rt-orange-500); border-color: var(--rt-orange-500); color: #fff; }
.chip svg { width: 14px; height: 14px; }

/* ---------- Search / results layout ---------- */
.search-layout {
  display: grid;
  grid-template-columns: 300px 1fr 420px;
  gap: 24px;
  align-items: start;
  padding: 28px 0 80px;
}
.search-sidebar {
  background: var(--rt-surface); border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-lg); padding: 22px;
  position: sticky; top: 84px;
}
.filter-group { margin-bottom: 22px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-label { display: block; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--rt-text-faint); margin-bottom: 10px; }
.filter-option-row { display: flex; flex-direction: column; gap: 9px; }
.filter-option { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--rt-text-dim); cursor: pointer; }
.filter-option input { accent-color: var(--rt-orange-500); width: 15px; height: 15px; }
.clear-filters { background: none; border: none; color: var(--rt-orange-400); font-size: 13px; font-weight: 700; }
select, input[type="number"], input[type="text"], input[type="search"],
input[type="email"], input[type="password"], input[type="tel"], input[type="date"] {
  background: var(--rt-surface-2); border: 1px solid var(--rt-border); border-radius: 10px;
  padding: 10px 12px; color: var(--rt-text); font-size: 13.5px; width: 100%; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
select:focus, input:focus, textarea:focus {
  outline: none; border-color: var(--rt-orange-500);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.18);
}
input::placeholder, textarea::placeholder { color: var(--rt-text-faint); }
input:disabled, select:disabled, textarea:disabled, button:disabled { opacity: .55; cursor: not-allowed; }

.results-col { min-width: 0; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.results-list { display: flex; flex-direction: column; gap: 14px; }

.poi-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 16px;
  background: var(--rt-surface); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-md);
  padding: 16px; cursor: pointer; transition: border-color .15s ease, transform .15s ease;
}
.poi-card:hover { border-color: var(--rt-border-strong); transform: translateY(-2px); }
.poi-card.is-active { border-color: var(--rt-orange-500); box-shadow: 0 0 0 1px var(--rt-orange-500); }
.poi-thumb {
  width: 96px; height: 96px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.poi-thumb svg { width: 34px; height: 34px; }
.poi-title-row { display: flex; justify-content: space-between; gap: 8px; }
.poi-name { font-size: 15.5px; font-weight: 700; margin-bottom: 2px; }
.poi-meta { font-size: 12.5px; color: var(--rt-text-faint); margin-bottom: 8px; }
.poi-rating { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.poi-rating .stars { color: var(--rt-yellow-500); }
.poi-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.poi-tag { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--rt-surface-2); color: var(--rt-text-dim); }
.poi-footer-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12.5px; }

.map-col { position: sticky; top: 84px; height: calc(100vh - 110px); border-radius: var(--rt-radius-lg); overflow: hidden; border: 1px solid var(--rt-border); }
#map { width: 100%; height: 100%; background: var(--rt-surface-2); }

.view-toggle-mobile { display: none; gap: 8px; margin-bottom: 16px; }
.view-toggle-mobile button {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--rt-border);
  background: var(--rt-surface); color: var(--rt-text-dim); font-size: 13.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.view-toggle-mobile button.active { background: var(--rt-orange-500); border-color: var(--rt-orange-500); color: #fff; }
.view-toggle-mobile svg { width: 16px; height: 16px; }

@media (max-width: 1180px) {
  .search-layout { grid-template-columns: 260px 1fr; }
  .view-toggle-mobile { display: flex; }
  .map-col { display: none; position: static; height: 65vh; }
  .search-layout.show-map .map-col { display: block; }
  .search-layout.show-map .results-col { display: none; }
}
@media (max-width: 860px) {
  .search-layout { grid-template-columns: 1fr; }
  .search-sidebar { position: static; }
  .search-layout.show-map .search-sidebar { display: none; }
  .search-layout.show-map .map-col { height: calc(100vh - 220px); }
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--rt-surface); color: var(--rt-text); }
.leaflet-container a.leaflet-popup-close-button { color: var(--rt-text-faint); }
.rt-pin-wrap { position: relative; width: 34px; height: 34px; }
.rt-pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display:flex; align-items:center; justify-content:center; box-shadow: 0 4px 10px rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.85); }
.rt-pin svg { transform: rotate(45deg); width: 16px; height: 16px; }
.rt-pin-badge { position: absolute; top: -2px; right: -2px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--rt-bg); z-index: 2; }
.rt-pin-badge-green { background: var(--rt-green-400); }
.rt-pin-badge-red { background: var(--rt-red-500); }
.rt-hazard-pin { width: 30px; height: 30px; border-radius: 50%; display:flex; align-items:center; justify-content:center; color:#fff; box-shadow: 0 3px 8px rgba(0,0,0,.4); border: 2px solid rgba(255,255,255,.9); }
.rt-hazard-pin svg { width: 16px; height: 16px; }

.rt-locate-control a {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: var(--rt-surface); color: var(--rt-text); text-decoration: none;
}
.rt-locate-control a svg { width: 16px; height: 16px; }
.rt-locate-control.is-loading a { opacity: .5; pointer-events: none; }
.rt-user-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: #38bdf8; border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(56,189,248,.35), 0 2px 6px rgba(0,0,0,.4);
}
.map-popup { min-width: 190px; }
.map-popup h4 { font-size: 14px; margin-bottom: 4px; }
.map-popup .poi-rating { margin-bottom: 6px; }
.map-popup a { color: var(--rt-orange-400); font-weight: 700; font-size: 12.5px; }

/* ---------- Detail page ---------- */
.detail-hero {
  border-radius: var(--rt-radius-lg); overflow: hidden; position: relative;
  height: 280px; display: flex; align-items: flex-end; padding: 32px;
  border: 1px solid var(--rt-border);
}
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; padding: 32px 0 80px; align-items: start; }
.detail-card { background: var(--rt-surface); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-lg); padding: 26px; margin-bottom: 20px; }
.detail-card h3 { font-size: 17px; margin-bottom: 14px; }
.amenity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.amenity-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--rt-text-dim); }
.amenity-item svg { width: 18px; height: 18px; color: var(--rt-green-400); flex-shrink: 0; }

.traffic-cam-note svg { width: 18px; height: 18px; color: var(--rt-text-faint); flex-shrink: 0; margin-top: 1px; }
.review-item { padding: 18px 0; border-top: 1px solid var(--rt-border); }
.review-item:first-child { border-top: none; padding-top: 0; }
.review-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.sidebar-sticky { position: sticky; top: 84px; }
.price-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--rt-border); font-size: 14px; }
.price-row:first-of-type { border-top: none; }
.price-row b { font-family: var(--rt-font-display); }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } .detail-hero { height: 200px; } }

/* ---------- Auth forms (login / registo) ---------- */
.auth-field-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.auth-field {
  display: flex; align-items: center; gap: 10px;
  background: var(--rt-surface-2); border: 1px solid var(--rt-border); border-radius: 12px;
  padding: 0 14px; margin-bottom: 16px; transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-field:focus-within { border-color: var(--rt-orange-500); box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.18); }
.auth-field svg { flex-shrink: 0; color: var(--rt-text-faint); width: 18px; height: 18px; }
.auth-field input {
  border: none; background: transparent; box-shadow: none !important; padding: 13px 0;
  font-size: 15px; min-width: 0;
}
.auth-field input:focus { outline: none; }
.auth-field-toggle {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin: 0 -6px 0 0; border-radius: 8px;
  background: none; border: none; color: var(--rt-text-faint);
}
.auth-field-toggle:hover { color: var(--rt-text-dim); background: var(--rt-border); }
.auth-field-toggle svg { width: 18px; height: 18px; }

.auth-alert {
  display: flex; align-items: flex-start; gap: 10px;
  border-radius: 12px; padding: 12px 14px; font-size: 13.5px; font-weight: 600;
  margin-top: 4px; margin-bottom: 0;
}
.auth-alert svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.auth-alert.is-error { background: rgba(239, 68, 68, 0.12); color: var(--rt-red-500); }
.auth-alert.is-success { background: rgba(34, 197, 94, 0.12); color: var(--rt-green-400); }

.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  animation: rt-spin .7s linear infinite;
}
@keyframes rt-spin { to { transform: rotate(360deg); } }

/* ---------- Community page ---------- */
.community-layout { display: grid; grid-template-columns: 320px 1fr; gap: 28px; padding: 28px 0 80px; align-items: start; }
.review-form { background: var(--rt-surface); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-lg); padding: 22px; position: sticky; top: 84px; }
.review-form label { display: block; font-size: 12.5px; font-weight: 700; margin: 14px 0 6px; color: var(--rt-text-dim); }
.review-form label:first-child { margin-top: 0; }
textarea { background: var(--rt-surface-2); border: 1px solid var(--rt-border); border-radius: 10px; padding: 10px 12px; color: var(--rt-text); font-size: 13.5px; width: 100%; font-family: inherit; resize: vertical; min-height: 80px; }
.star-picker { display: flex; gap: 6px; font-size: 22px; }
.star-picker span { cursor: pointer; color: var(--rt-navy-600); transition: color .1s ease; }
.star-picker span.active, .star-picker span:hover { color: var(--rt-yellow-500); }
.feed-card { background: var(--rt-surface); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-lg); padding: 22px; margin-bottom: 16px; }
.feed-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
@media (max-width: 900px) { .community-layout { grid-template-columns: 1fr; } .review-form { position: static; } }

/* ---------- About page ---------- */
.value-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
@media (max-width: 760px) { .value-grid { grid-template-columns: 1fr; } }

/* ---------- Fade-in ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--rt-text-faint); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 14px; opacity: .5; }

/* ---------- POI add/edit modal ---------- */
.rt-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.rt-modal {
  background: var(--rt-surface); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-lg);
  width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.rt-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--rt-border); flex-shrink: 0;
}
.rt-modal-head h3 { margin: 0; font-size: 18px; }
.rt-modal-close {
  background: none; border: none; color: var(--rt-text-faint); font-size: 22px; line-height: 1;
  cursor: pointer; padding: 4px 8px;
}
.rt-modal-close:hover { color: var(--rt-text); }
.rt-modal-body { padding: 20px 22px; overflow-y: auto; }
.rt-modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 22px; border-top: 1px solid var(--rt-border); flex-shrink: 0;
}
.rt-map-toolbar { position: absolute; top: 10px; right: 10px; z-index: 500; display: flex; gap: 8px; }
.rt-map-toolbar.is-armed .btn { outline: 2px solid var(--rt-orange-500); }
.rt-hazard-picker {
  position: absolute; top: 56px; right: 10px; z-index: 501;
  background: var(--rt-surface); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-lg);
  padding: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 6px; min-width: 190px;
}
.rt-hazard-picker button {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: none;
  background: var(--rt-surface-2); color: var(--rt-text); font-size: 13px; font-weight: 600; cursor: pointer; text-align: left;
}
.rt-hazard-picker button:hover { background: var(--rt-border); }
.rt-hazard-picker button svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Cookie consent banner ---------- */
.rt-cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 1500;
  max-width: 720px; margin: 0 auto;
  background: var(--rt-surface); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-lg);
  padding: 18px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.35);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
}
.rt-cookie-banner p { margin: 0; font-size: 13.5px; color: var(--rt-text-dim); flex: 1; min-width: 220px; }
.rt-cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

.rt-offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
  background: var(--rt-orange-500); color: #fff; text-align: center;
  font-size: 13px; font-weight: 700; padding: 8px 16px;
}

.rt-register-banner {
  /* nowrap para o botão ficar À DIREITA do texto, não numa linha abaixo — o
     wrap só volta em ecrãs estreitos, onde empilhar é mesmo o melhor. */
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex-wrap: nowrap; background: linear-gradient(90deg, var(--rt-orange-500), var(--rt-orange-400));
  color: var(--rt-navy-950); text-align: center; padding: 10px 48px 10px 16px; position: relative;
}
.rt-register-banner p { margin: 0; font-size: 13.5px; font-weight: 700; min-width: 0; }
.rt-register-banner .btn { flex-shrink: 0; background: #fff; color: var(--rt-orange-600); border: none; }
.rt-register-banner .btn:hover { background: rgba(255,255,255,.9); }
.rt-register-banner-close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--rt-navy-950); opacity: .55; cursor: pointer;
  font-size: 18px; line-height: 1; padding: 4px;
}
.rt-register-banner-close:hover { opacity: 1; }
@media (max-width: 640px) {
  .rt-register-banner { flex-wrap: wrap; padding: 10px 40px 10px 12px; }
  .rt-register-banner p { font-size: 12.5px; }
}

/* ---------- Ad slot placeholder (ready for AdSense once approved) ---------- */
.rt-ad-slot {
  border: 1px dashed var(--rt-border); border-radius: var(--rt-radius-lg);
  padding: 22px; text-align: center; background: var(--rt-surface-2);
  color: var(--rt-text-faint); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase;
  margin: 16px 0;
}

/* ---------- Tachograph page ---------- */
.tacho-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.tacho-tab {
  flex: 1; min-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 10px; border-radius: var(--rt-radius-lg); border: 1px solid var(--rt-border);
  background: var(--rt-surface); color: var(--rt-text-dim); cursor: pointer; font-size: 13px; font-weight: 700;
  transition: border-color .15s ease, color .15s ease;
}
.tacho-tab svg { width: 28px; height: 28px; }
.tacho-tab.is-active { border-color: var(--rt-orange-500); color: var(--rt-orange-400); background: rgba(255,122,26,.08); }
.tacho-mode-detail { display: flex; gap: 18px; align-items: flex-start; }
.tacho-mode-detail .icon-box {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,122,26,.15); color: var(--rt-orange-400);
}
.tacho-mode-detail .icon-box svg { width: 30px; height: 30px; }
.tacho-times-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tacho-time-card { background: var(--rt-surface); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-lg); padding: 18px; }
.tacho-time-card .label { font-size: 12.5px; color: var(--rt-text-faint); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.tacho-time-card .value { font-size: 22px; font-weight: 800; margin: 6px 0; }
.tacho-time-card .note { font-size: 12.5px; color: var(--rt-text-dim); margin: 0; }

.tacho-live-warning {
  display: flex; align-items: flex-start; gap: 12px; background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.35); border-radius: var(--rt-radius-lg); padding: 14px 16px;
}
.tacho-live-warning svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--rt-red-500); margin-top: 1px; }
.tacho-live-warning p { margin: 0; font-size: 13px; font-weight: 600; color: var(--rt-text); line-height: 1.5; }
.tacho-live-gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.tacho-live-gauge { background: var(--rt-surface); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-lg); padding: 16px 18px; }
@media (max-width: 640px) { .tacho-live-gauges { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .tacho-times-grid { grid-template-columns: 1fr 1fr; } }
.tacho-symbol-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tacho-symbol-card { display: flex; gap: 14px; align-items: flex-start; background: var(--rt-surface); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-lg); padding: 16px; }
.tacho-symbol-card .icon-box {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--rt-surface-2); color: var(--rt-text-dim);
}
.tacho-symbol-card .icon-box svg { width: 22px; height: 22px; }
.tacho-symbol-card h4 { margin: 0 0 4px; font-size: 14.5px; }
.tacho-symbol-card p { margin: 0; font-size: 13px; color: var(--rt-text-dim); }
@media (max-width: 640px) { .tacho-symbol-grid { grid-template-columns: 1fr; } }

/* ---------- Legal pages ---------- */
.legal-content h2 { font-size: 20px; margin: 32px 0 12px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: var(--rt-text-dim); line-height: 1.7; }
.legal-content ul { padding-left: 20px; margin: 8px 0 16px; }

/* ---------- Mobile polish (general) ---------- */
a, button, .btn, .rt-nav-toggle, .theme-toggle, .rt-lang-option, .auth-field-toggle {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--rt-orange-500); outline-offset: 2px;
}
@media (max-width: 640px) {
  /* Impede o zoom automático do Safari iOS ao focar um campo com
     font-size < 16px — mantém a densidade do desktop, só ajusta aqui. */
  select, input, textarea { font-size: 16px; }
  .auth-field input { font-size: 16px; }
  .search-field input, .search-field select { font-size: 16px; }
  .btn { padding: 13px 20px; }
  .rt-notif-panel, .rt-lang-panel { width: calc(100vw - 32px); max-width: 320px; }
  .detail-card { padding: 20px; }
}
