/* ========== Base Reset ========== */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #1e2742;
  overflow-x: hidden;
}

/* ========== Header / Navbar ========== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  color: #3d52a0;
  padding: 12px 24px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  gap: 20px;
  isolation: isolate; /* keep dropdown layering sane */
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}
.site-brand:hover {
  text-decoration: none;
}

header img {
  height: 50px;
  width: auto;
  display: block;
}

.nav-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3d52a0;
}

nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-links a,
.nav-button {
  color: #3d52a0;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  transition: all 0.3s ease;
}
a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-button:hover {
  background: #f0f0f5;
  border-color: #3d52a0;
}

/* Hamburger button (hidden on desktop) */
.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 10px;
  color: #3d52a0;
  cursor: pointer;
  line-height: 1;
}
.menu-toggle:focus-visible {
  outline: 2px solid #3d52a0;
  outline-offset: 2px;
}

/* Mobile navbar: dropdown menu */
@media (max-width: 768px) {
  header {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 12px;
  }

  .menu-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none; /* hidden by default */
    position: absolute;
    top: 100%; /* below header */
    right: 24px;
    background: #ffffff;
    border: 1px solid #e4e6ee;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    padding: 8px;
    gap: 0;
    flex-direction: column;
    min-width: 240px;
    z-index: 1100;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .nav-links a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    text-align: left;
    flex: 0 0 auto;
  }
  .nav-links a:hover {
    background: #f0f0f5;
  }

  .nav-links.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-align: center;
  }
}

/* Anchor sections don’t hide under sticky header */
#about-us,
#car-catalog,
#contact-location,
#faq,
#get-in-touch-card {
  scroll-margin-top: 90px; /* keeps it from hiding under sticky nav */
  position: static; /* behaves like normal block */
  z-index: 1; /* no stacking tricks */
}

/* ========== WHY US cards ========== */
.highlights {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.highlight {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.highlight:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.highlight h3 {
  font-size: 1.2rem;
  color: #3d52a0;
  font-weight: 900;
  margin: 0 0 6px;
}
.highlight p {
  font-size: 0.98rem;
  color: #555;
  margin: 0;
}

/* ========== CARS ========== */
#car-catalog h2 {
  text-align: center;
  margin: 40px 0 10px;
  color: #3d52a0;
}
.car-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin: 0 20px 40px;
}
.car {
  display: flex;
  flex-direction: column;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 10px 10px 30px;
  padding: 10px 10px 14px;
  width: calc(25% - 40px);
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
}
.car-media {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}
.car-media img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  object-fit: contain;
  display: block;
}
.details {
  margin-top: 12px;
}
.car button,
.btn {
  background: #3d52a0;
  color: #fff;
  border: 1px solid #3d52a0;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 6px;
  width: 100%;
  font-weight: 600;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.car button:hover,
.btn:hover {
  background: #526eaa;
  box-shadow: 0 4px 12px rgba(61, 82, 160, 0.25);
}

/* ========== Modal ========== */
body.modal-open {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  position: fixed;
  width: 100%;
}

.popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

:root {
  --vh-safe: 1vh;
}

.popup-content {
  width: min(520px, 96vw);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
  position: relative;
  padding: 20px 20px 0;
  overflow: hidden;
  max-height: calc(var(--vh-safe) * 92);
}
@supports (height: 100dvh) {
  .popup-content {
    max-height: 92dvh;
  }
}
@supports (height: 100svh) {
  .popup-content {
    max-height: 92svh;
  }
}

.popup .close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: #666;
  cursor: pointer;
}

.form-body {
  display: grid;
  gap: 14px;
  padding-bottom: 12px;
  overflow-y: auto;
  max-height: calc((var(--vh-safe) * 92) - 120px);
  -webkit-overflow-scrolling: touch;
}

.btn-container {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 12px 0 16px;
  margin-top: 6px;
  border-top: 1px solid #f0f1f5;
}
.popup-content .btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 700;
  border: none;
  background: #22c55e;
  color: #fff;
}
.popup-content .btn:hover {
  background: #16a34a;
}

.form-group {
  display: grid;
  gap: 6px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  outline: none;
}
.form-group .error {
  color: #b91c1c;
  display: none;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

/* ========== FAQ ========== */
.faq-section {
  background: #fff;
  padding: 24px;
  margin: 30px 60px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Rubik", sans-serif;
  color: #1e2742;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.faq-toggle-all {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.faq-title {
  display: block;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #3d52a0;
  margin-bottom: 24px;
  cursor: pointer;
  user-select: none;
}
.faq-title .arrow::after {
  content: "▼";
  margin-left: 10px;
  font-size: 1.2rem;
  color: #3d52a0;
}
.faq-toggle-all:checked + .faq-title .arrow::after {
  content: "▲";
}

.faq-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 700px) {
  .faq-columns {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1100px) {
  .faq-columns {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9f9fc;
  padding: 14px 16px;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.faq-item:hover {
  background: #f1f3f9;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.faq-question {
  font-weight: 600;
  color: #1e2742;
  margin-bottom: 10px;
}
.faq-answer {
  display: none;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.4;
}
.faq-toggle-all:checked ~ .faq-columns .faq-answer {
  display: block;
}

/* ========== GET IN TOUCH ========== */
.get-in-touch-card {
  margin: 0 50px 40px;
  padding: 24px;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  justify-self: center;
}

.git-header {
  display: grid;
  text-align: center;
  margin-bottom: 16px;
  padding: 20px;
}
.git-header h3 {
  color: #3d52a0;
  font-size: 1.6rem;
  margin: 0 0 8px;
}
.git-header p {
  display: grid;
  margin: 6px 0;
  line-height: 1.5;
  font-size: 1rem;
}

.git-content {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .git-content {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .git-header h3 {
    font-size: 1.4rem;
  }
  .git-header p {
    font-size: 0.95rem;
  }
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.icon.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #eef0f8;
}
.icon img {
  width: 18px;
  height: 18px;
}
.contact-link {
  color: #1e2742;
  text-decoration: none;
  font-weight: 500;
}
.contact-link:hover {
  text-decoration: underline;
}

.map-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 10px;
  overflow: hidden;
  background: #e9ecf5;
}
.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.maps-button {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid #3d52a0;
  border-radius: 8px;
  color: #3d52a0;
  text-decoration: none;
  font-weight: 600;
}
.maps-button:hover {
  background: #f0f0f5;
}

/* ========== About (hero) ========== */
.about-section {
  position: relative;
  background: url("frontpage9.jpg") center/cover no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}
.about-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(61, 82, 160, 0.25), rgba(61, 82, 160, 0.25));
  pointer-events: none;
}
.about-card {
  position: relative;
  width: 100%;
  max-width: 1280px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(6px);
  -webkit-backdrop-filter: saturate(160%) blur(6px);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  padding: 50px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 32px;
}
@media (max-width: 980px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.brand {
  margin: 0;
  font-size: 2.6rem;
  font-weight: 900;
  color: #3d52a0;
  letter-spacing: 0.5px;
}

.brand-socials a {
  font-size: 1.6rem;
  color: #3d52a0;
  opacity: 0.9;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.brand-socials a + a {
  margin-left: 8px;
}
.brand-socials a:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.tagline {
  margin: 4px 0 10px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #34498f;
}
.intro {
  margin: 0 0 12px;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #2b2b2b;
}

.service-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 22px;
  list-style: none;
  padding: 12px 0 0;
  margin: 0 0 14px;
}
.service-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #1e2742;
  font-weight: 600;
}
.service-list i {
  color: #3d52a0;
  margin-top: 2px;
  min-width: 18px;
}
@media (max-width: 640px) {
  .service-list {
    grid-template-columns: 1fr;
  }
}

/* Chips */
:root {
  --chip-blue: #3d52a0;
  --chip-blue-bg: #eef2ff;
  --chip-blue-border: #c7d2fe;
  --chip-warn: #9a3412;
  --chip-warn-bg: #fff7ed;
  --chip-warn-border: #f59e0b66;

  --cta-green: #22c55e;
  --cta-green-hover: #16a34a;
  --cta-green-ghost-bg: #ecfdf5;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}
.chip i {
  color: currentColor;
  font-size: 1rem;
}
.chip-blue {
  background: var(--chip-blue-bg);
  color: var(--chip-blue);
  border-color: var(--chip-blue-border);
}
.chip-warn {
  background: var(--chip-warn-bg);
  color: var(--chip-warn);
  border-color: var(--chip-warn-border);
}
.chip:hover {
  filter: brightness(0.98);
}

/* Quick stats */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.why-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.why-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.1);
}
.why-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  color: #3d52a0;
  margin-bottom: 8px;
}
.why-card h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  color: #1e2742;
  font-weight: 800;
}
.why-card p {
  margin: 0;
  color: #4b5563;
  font-size: 1.02rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.stat {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.stat .num {
  display: block;
  font-weight: 900;
  color: #3d52a0;
  font-size: 1.25rem;
}
.stat .label {
  display: block;
  color: #475569;
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Buttons (green theme) */
.btn-primary {
  background: var(--cta-green);
  color: #fff;
  border: 1px solid var(--cta-green);
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.25);
}
.btn-primary:hover {
  background: var(--cta-green-hover);
  border-color: var(--cta-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.35);
}
.btn-ghost {
  background: #fff;
  color: var(--cta-green);
  border: 2px solid var(--cta-green);
}
.btn-ghost:hover {
  background: var(--cta-green-ghost-bg);
  color: var(--cta-green-hover);
  transform: translateY(-2px);
}

/* CTA row */
.cta-row {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.cta-row > * {
  width: 100%;
}
.cta-row a.btn {
  display: block;
  width: 80%;
}

.car-specs {
  list-style: none;
  padding: 0 0 0 20px;
  margin: 0 0 10px;
  color: #666;
  font-size: 0.95rem;
}
.car-specs li {
  margin: 4px 0;
}

/* Brand link underline fixes + focus */
header .site-brand,
header .site-brand:link,
header .site-brand:visited,
header .site-brand:hover,
header .site-brand:active,
header .site-brand:focus,
header .site-brand:focus-visible {
  text-decoration: none !important;
}
header .site-brand .nav-title {
  text-decoration: none !important;
  border-bottom: 0 !important;
}
header .site-brand:focus,
header .site-brand:focus-visible {
  outline: 2px solid #3d52a0;
  outline-offset: 2px;
}

/* ========== Responsive helpers ========== */
@media (max-width: 1024px) and (min-width: 769px) {
  .car {
    width: calc(50% - 40px);
  }
}
@media (max-width: 900px) {
  .highlights {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  .about-content {
    padding: 20px 16px;
  }
  .highlights {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .car {
    width: 90% !important;
    margin: 10px auto;
  }
  .popup-content {
    width: 90%;
    padding: 15px 15px 0;
  }
  .faq-section {
    margin: 20px;
    padding: 20px;
  }
}

/* ========== Footer ========== */
footer {
  background: #3d52a0;
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  font-size: 14px;
}


@media (max-width: 768px) {
  /* Allow the brand to shrink and wrap */
  .site-header .site-brand,
  header .site-brand {
    white-space: normal;   /* was nowrap */
    min-width: 0;          /* allow flex item to shrink */
    flex: 1 1 auto;
    gap: 12px;
  }

  /* Keep logo smaller so text has room */
  .site-header .site-brand img,
  header .site-brand img {
    height: 36px;
    width: auto;
  }

  /* Make long title wrap instead of pushing layout */
  .site-header .nav-title,
  header .nav-title {
    font-size: 1.05rem;
    line-height: 1.2;
    overflow-wrap: anywhere; /* break long words if needed */
    word-break: break-word;
  }

  /* Keep hamburger visible on the right */
  .site-header .menu-toggle,
  header .menu-toggle {
    flex: 0 0 auto;
    margin-left: 8px;
  }
}
