/* ================================================================
   EvonRoad — Global Stylesheet
   Sections:
     1. Design tokens
     2. Base / reset
     3. Accessibility
     4. Header / navigation
     5. Hero + search panel
     6. Section titles
     7. Cards (showroom, brand chip, city chip)
     8. "How it works" step numbers
     9. Tag pills (services, facilities, footer tagcloud)
    10. Pagination
    11. Footer + back-to-top
    12. Responsive tweaks
   ================================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --navy: #10213A;
  --primary: #1769FF;
  --primary-dark: #0F55D6;
  --bg: #F5F7FB;
  --text: #182230;
  --muted: #667085;
  --green: #16A34A;
  --border: #eef1f6;
  --radius: .85rem;
  --shadow-sm: 0 4px 16px rgba(16, 33, 58, .06);
  --shadow-md: 0 12px 40px rgba(16, 33, 58, .10);
  --transition: .15s ease;
}

/* ---------- 2. Base / reset ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: var(--primary); transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* ---------- 3. Accessibility ---------- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.page-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden-focusable:focus {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 2000;
  background: var(--primary);
  color: #fff !important;
  padding: .5rem 1rem;
  border-radius: .5rem;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

/* ---------- 4. Header / navigation ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.navbar-brand {
  color: var(--navy) !important;
  font-size: 1.25rem;
}
.navbar-brand img { display: block; }

.navbar-nav .nav-link {
  color: var(--text);
  font-weight: 500;
  transition: color var(--transition);
}
.navbar-nav .nav-link:hover { color: var(--primary); }

/* Active nav state */
.navbar-nav .nav-link.active {
  color: var(--primary) !important;
  font-weight: 600;
  position: relative;
}
.navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* Larger tap targets on mobile nav */
@media (max-width: 991.98px) {
  .navbar-nav .nav-link { padding: .6rem 0; font-size: 1.05rem; }
}

/* ---------- 5. Hero + search panel ---------- */
.hero {
  background: linear-gradient(135deg, #f0f5ff 0%, #ffffff 100%);
  padding: 4rem 0 3rem;
}
.hero h1 {
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.5px;
}
.hero p {
  color: var(--muted);
  max-width: 640px;
}
.search-panel {
  background: #fff;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
}
.search-panel .form-control,
.search-panel .form-select {
  border-color: var(--border);
  height: 44px;
}
.search-panel .form-control:focus,
.search-panel .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(23, 105, 255, .15);
}

/* ---------- 6. Section titles ---------- */
.section-title {
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.25px;
}

/* ---------- 7. Cards ---------- */
.showroom-card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.showroom-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 33, 58, .12);
}
.showroom-card .card-title { color: var(--navy); font-weight: 600; }
.showroom-card .card-img-fallback { background: #f6f8fc !important; }

.brand-chip,
.city-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: .75rem 1rem;
  font-weight: 600;
  color: var(--navy);
  min-height: 64px;
  transition: all var(--transition);
}
.brand-chip:hover,
.city-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.city-chip .small { color: var(--muted); font-weight: 500; margin-top: .15rem; }

/* ---------- 8. "How it works" step numbers ---------- */
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(23, 105, 255, .25);
}

/* ---------- 9. Tag pills ---------- */
.filter-tag {
  display: inline-block;
  background: #e8efff;
  color: var(--primary);
  border-radius: 999px;
  padding: .25rem .75rem;
  font-size: .85rem;
  font-weight: 600;
}

/* ---------- 10. Pagination ---------- */
.pagination .page-link {
  color: var(--navy);
  border-color: var(--border);
  min-width: 40px;
  text-align: center;
}
.pagination .page-link:hover {
  background: #e8efff;
  color: var(--primary);
  border-color: #e8efff;
}
.pagination .active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------- 11. Footer + back-to-top ---------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  color: var(--text);
}
.site-footer-brand { color: var(--navy); font-size: 1.1rem; }
.site-footer a { color: var(--muted); transition: color var(--transition); }
.site-footer a:hover { color: var(--primary); }

.footer-links li { margin-bottom: .35rem; }
.footer-links a { display: inline-block; padding: .15rem 0; }

.footer-tagcloud a {
  display: inline-block;
  padding: .15rem .55rem;
  margin: 0 .35rem .35rem 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .8rem;
  color: var(--text);
  transition: all var(--transition);
}
.footer-tagcloud a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.footer-social {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  transition: all var(--transition);
}
.footer-social:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* Back-to-top button */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 20px rgba(23, 105, 255, .35);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1050;
  transition: opacity .2s ease, transform .2s ease;
}
.back-to-top.show { display: inline-flex; }
.back-to-top:hover { transform: translateY(-3px); }

/* ---------- 12. Responsive tweaks ---------- */
@media (max-width: 991.98px) {
  .hero { padding: 3rem 0 2rem; }
  .hero h1 { font-size: 2rem; }
  .navbar-nav .nav-link.active::after { display: none; }
  .navbar-nav .nav-link.active {
    color: var(--primary) !important;
    background: #f0f5ff;
    border-radius: .5rem;
    padding-left: .75rem;
  }
}

@media (max-width: 575.98px) {
  .hero { padding: 2.25rem 0 1.5rem; }
  .hero h1 { font-size: 1.65rem; }
  .hero .lead { font-size: 1rem; }
  .search-panel { padding: 1rem; }
  .brand-chip, .city-chip { min-height: 56px; font-size: .9rem; }
  .site-footer .footer-links { font-size: .875rem; }
  .footer-tagcloud a { font-size: .75rem; }
  .back-to-top { right: .75rem; bottom: .75rem; width: 40px; height: 40px; }
}