/* =========================================================
   ANDREI AUTO TRANS — Main Stylesheet (Optimized)
   ========================================================= */

/* ---------- Color Tokens ---------- */
:root {
  --page-bg: #fff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --blue: #1e3a8a;
  --blue-underline: #2370ff;
  --wa: #22c55e;
  --wa-2: #16a34a;
}

/* ---------- Reset / Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  background: var(--page-bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* =========================================================
   Topbar
   ========================================================= */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 3000;
  background: rgba(30,58,138,.95);
  color: #fff;
  font-size: .9rem;
  backdrop-filter: blur(4px) saturate(120%);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.topbar-inner {
  height: 34px;
  display: flex; align-items: center; justify-content: center;
  gap: 1.2rem;
}
.tb-item { display: inline-flex; align-items: center; gap: .35rem; opacity: .9; }
.tb-item:hover { opacity: 1; }

/* =========================================================
   Header / Navigation
   ========================================================= */
.site-header {
  position: sticky;
  top: 24px;
  z-index: 2500;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px) saturate(120%);
}
.header-inner {
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo-img { height: 140px; width: auto; }

.nav ul { list-style: none; display: flex; gap: 1rem; }
.nav a {
  padding: .6rem .9rem;
  font-size: .95rem;
  color: var(--ink);
  position: relative;
}
.nav a:hover { color: var(--blue-underline); }
.nav a.active { font-weight: 600; }
.nav a.active::after {
  content: "";
  position: absolute; left: 10px; right: 10px; bottom: -10px;
  height: 3px; border-radius: 2px; background: var(--blue-underline);
}

/* --- Mobile Nav --- */
.nav-toggle {
  display: none;
  background: transparent; border: 0;
  width: 40px; height: 40px;
}
.nav-toggle span { display:block; height:2px; background:#111; margin:6px 0; }

@media (max-width: 768px) {
  .logo-img { max-height: 58px; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 6px 12px rgba(0,0,0,.1);
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: all .3s ease;
  }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav ul { flex-direction: column; padding: 1rem; gap: .75rem; }
  .nav a { display: block; text-align: center; font-size: 1rem; }
  .nav-toggle { display: block; z-index: 20; }
}

/* =========================================================
   Hero Section
   ========================================================= */
.hero.hero--photo {
  position: relative;
  background: url("../img/hero-london.jpg") center/cover no-repeat;
  color: #fff;
}
.hero--photo .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.35));
}
.hero--photo .hero-content {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: clamp(3rem, 5vw, 8rem) 1.5rem;
}
.hero--photo h1 {
  font-size: clamp(28px, 4vw, 50px);
  font-weight: 700;
  margin-bottom: .5rem;
}
.hero--photo .sub {
  font-size: clamp(14px, 2vw, 18px);
  color: #e5e7eb;
  margin-bottom: 2rem;
}

/* =========================================================
   Info Card
   ========================================================= */
.info-card {
  width: min(1080px, 96%);
  margin: -4rem auto 2rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0,0,0,.15);
  position: relative; z-index: 10;
}
.info-card .bus { position: absolute; left: 28px; top: -45px; width: 180px; }
.info-card .cols {
  display: grid; grid-template-columns: repeat(3,1fr);
  padding: 1.5rem 1rem 1.2rem 220px;
  border-bottom: 4px solid rgba(0,0,0,.1);
}
.info-card .col { text-align: center; }
.info-card .col:not(:last-child) { border-right: 1px solid rgba(0,0,0,.08); }
.info-card h3 { margin-bottom: .25rem; font-size: 1rem; }
.info-card p { color: #374151; font-size: .9rem; }
.info-card .cta-row { display: flex; justify-content: center; padding: 1rem; }

@media (max-width: 900px) {
  .info-card { margin-top: -2rem; }
  .info-card .bus { position: static; margin: -30px auto 0; }
  .info-card .cols { grid-template-columns: 1fr; padding: 1rem; }
  .info-card .col:not(:last-child) {
    border-right: 0; border-bottom: 1px solid rgba(0,0,0,.08);
    margin-bottom: .75rem; padding-bottom: .75rem;
  }
}

/* =========================================================
   Sections, Maps & Cards
   ========================================================= */
.section { padding: clamp(1.6rem, 3vw, 3rem) 0; }

.route-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
  margin: 0 auto 1.1rem;
  max-width: min(920px, 92%);
  text-align: center;
}
.route-card h2 { margin: 0 0 10px; }
.route-card h2 + p { margin: 6px 0 18px; }

.map.wide {
  width: 100%;
  height: clamp(340px, 45vw, 520px);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

/* Europe Map */
#map-europe {
  height: clamp(380px, 50vw, 560px);
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .7rem 1.1rem;
  border-radius: 6px; font-weight: 600;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  transition: all .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; }
.btn-whatsapp {
  background: linear-gradient(135deg, var(--wa), var(--wa-2));
  border: none; color: #fff;
}
.btn-facebook {
  background: #1877f2; color: #fff; border-color: transparent;
}
.btn-facebook:hover { filter: brightness(1.05); }

/* =========================================================
   Floating WhatsApp Button
   ========================================================= */
.floating-wa {
  position: fixed; right: 16px; bottom: 16px; z-index: 3200;
}
.floating-wa a {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--wa), var(--wa-2));
  border: 1px solid rgba(255,255,255,.15);
}
.floating-wa svg { width: 28px; height: 28px; fill: #fff; }

/* =========================================================
   Auto Scrolling Gallery
   ========================================================= */
.gallery-slider { text-align: center; background: #fff; }
.gallery-slider h2 { margin-bottom: 1.5rem; font-size: 1.6rem; }

.slider {
  height: 220px; overflow: hidden; position: relative; width: 100%;
}
.slide-track {
  display: flex; width: calc(250px * 10);
  animation: scroll 35s linear infinite;
}
.slide {
  width: 250px; height: 220px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 10px;
}
.slide img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 12px; box-shadow: 0 4px 8px rgba(0,0,0,.15);
  transition: transform .4s ease;
}
.slide img:hover { transform: scale(1.05); }

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-250px * 5)); }
}

@media (max-width:600px) {
  .slider { height: 160px; }
  .slide { width: 180px; height: 160px; }
}

/* =========================================================
   Price Box & City Lists
   ========================================================= */
.price-box {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 1.8rem 1.5rem; margin: 2rem auto;
  max-width: 760px; box-shadow: 0 4px 10px rgba(0,0,0,.05);
}
.price-box h3 {
  text-align: center; margin-bottom: 1.4rem;
  color: var(--blue); font-size: 1.25rem; font-weight: 700;
}
.price-list {
  display: flex; flex-direction: column; gap: .65rem;
  font-size: .98rem; line-height: 1.6; color: var(--ink);
}
.price-item { display: flex; align-items: flex-start; gap: .4rem; }
.price-item strong { color: var(--blue); }
.price-box .cta-row { text-align: center; margin-top: 1.5rem; }

.city-grid {
  list-style: none; padding: 0;
  display: grid; gap: .35rem 1rem;
  grid-template-columns: repeat(4, minmax(0,1fr));
}
.city-grid li {
  position: relative; padding-left: 1rem; line-height: 1.5; text-align: left;
}
.city-grid li::before {
  content: "•"; position: absolute; left: 0; color: var(--blue);
}
.city-grid[data-collapsed="true"] li:nth-child(n+17) { display: none; }

.city-actions { margin-top: .8rem; text-align: center; }

/* =========================================================
   Contact Section
   ========================================================= */
.contact .contact-title,
.contact .contact-sub { text-align: center; }

.contact-actions {
  margin-top: .8rem; display: flex; flex-wrap: wrap;
  gap: .75rem; justify-content: center;
}
@media (max-width:480px) {
  .contact-actions .btn { width: 100%; max-width: 360px; }
}

/* =========================================================
   Footer
   ========================================================= */
.mini-footer {
  background: #fff; border-top: 1px solid var(--line); padding: 10px 0;
}
.mini-footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 52px;
}
.mini-footer__brand { font-weight: 700; letter-spacing: .3px; color: var(--ink); }
.mini-footer__copy { margin: 0; font-size: .85rem; color: #6b7280; }

@media (max-width:640px) {
  .mini-footer__inner { flex-direction: column; align-items: flex-start; }
  .mini-footer__right { text-align: left; }
}

/* =========================================================
   Leaflet Layering & Minor Fixes
   ========================================================= */
.leaflet-container { z-index: 10 !important; }
.leaflet-top { top: 12px !important; }

@media (max-width:480px) {
  .topbar-inner { flex-wrap: wrap; justify-content: center; }
}

#map { touch-action: none; } /* Prevent accidental grabs */
/* --- Mobile fix: display one city per line in Traseu lists --- */
@media (max-width: 768px) {
  .city-grid {
    grid-template-columns: 1fr !important; /* single column layout */
  }
  .city-grid li {
    display: list-item !important; /* show as bullet list */
    white-space: normal !important;
    line-height: 1.5;
    margin: 0 0 .4rem;
  }
  .city-grid li::before {
    content: "•" !important;
    color: var(--blue);
    left: 0;
  }
}

