/* ===== Design tokens ===== */
:root {
  --color-primary: #0b3d62;
  --color-primary-dark: #082c48;
  --color-accent: #1fa97b;
  --color-accent-dark: #17835f;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7fa;
  --color-text: #1a1a1a;
  --color-text-muted: #5a6472;
  --color-border: #e1e5ea;
  --radius: 8px;
  --max-width: 1100px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ===== Reset ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; max-width: 100%; }
section[id] { scroll-margin-top: 80px; } /* sticky header would otherwise cover the anchor target */
body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--color-accent-dark); }
.btn-outline {
  border: 2px solid #fff;
  color: #fff;
}
.hero .btn-outline:hover { background: #fff; color: var(--color-primary); }
.section .btn-outline {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.section .btn-outline:hover { background: var(--color-primary); color: #fff; }

/* ===== Header ===== */
.site-header {
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  white-space: nowrap;
}
.logo-img { height: 32px; width: auto; flex-shrink: 0; }
.logo span { color: var(--color-accent); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  color: #fff;
  font-weight: 500;
}
.main-nav a:hover { color: var(--color-accent); }
.nav-cta {
  background: var(--color-accent);
  padding: 8px 18px;
  border-radius: var(--radius);
}
.nav-cta:hover { background: var(--color-accent-dark); color: #fff !important; }

.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle-label span {
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  padding: clamp(40px, 8vw, 90px) 0;
}
.hero-text { max-width: 620px; }
.hero h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); margin-bottom: 8px; }
.hero-subtitle { font-size: 1.05rem; font-weight: 600; color: var(--color-accent); margin-bottom: 16px; }
.hero .lead { font-size: 1.1rem; color: #d8e3ee; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== Sections ===== */
.section { padding: clamp(48px, 8vw, 80px) 0; }
.section-alt { background: var(--color-bg-alt); }
.section h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 12px; color: var(--color-primary); }
.section-intro { color: var(--color-text-muted); margin-bottom: 30px; }

.stacked {
  display: grid;
  gap: 36px;
}
.stacked h3 { margin-bottom: 10px; color: var(--color-primary); }
.stacked p { margin-bottom: 12px; }

.doc-list { list-style: disc; padding-left: 20px; }
.doc-list li { margin-bottom: 8px; }
.note {
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 10px;
}

/* ===== Legal pages (privacy/terms) ===== */
.legal-content { max-width: 760px; }
.legal-content h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--color-primary); margin-bottom: 30px; }
.legal-content h2 { font-size: 1.15rem; color: var(--color-primary); margin: 28px 0 10px; }
.legal-content p { margin-bottom: 12px; }
.legal-content a { text-decoration: underline; }

/* ===== Price table ===== */
.price-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.price-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: #fff;
}
.price-table th, .price-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.price-table th {
  background: var(--color-primary);
  color: #fff;
}
.price-table tr:last-child td { border-bottom: none; }
.price-table tbody tr { transition: background 0.15s; }
.price-table tbody tr:hover { background: var(--color-bg-alt); }

/* ===== Booking embed ===== */
.booking-embed {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.booking-embed iframe {
  width: 100%;
  height: 900px; /* fallback; adjusted dynamically by js/script.js */
  border: 0;
  display: block;
}

/* ===== Contact ===== */
.contact-list { margin-bottom: 30px; }
.contact-list li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.directions-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 999px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.directions-btn:hover { background: var(--color-accent-dark); }
.directions-btn svg { width: 16px; height: 16px; }

.map-wrap {
  height: 320px;
  margin-bottom: 30px;
  border-radius: var(--radius);
  overflow: hidden;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-primary-dark);
  color: #c7d4e0;
  padding: 48px 0 24px;
  font-size: 0.85rem;
}
.footer-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  color: #c7d4e0;
}
.footer-row a { color: #c7d4e0; }
.footer-row a:hover { color: #fff; }
.sal-badge { display: block; }
.copyright {
  color: #8fa2b5;
  font-size: 0.78rem;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===== Responsive ===== */
@media (max-width: 800px) {
  .nav-toggle-label { display: flex; }
  .logo { font-size: 1.05rem; gap: 6px; }
  .logo-img { height: 22px; }
  .main-nav ul {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-primary);
    padding: 10px 20px 20px;
  }
  .main-nav ul li { width: 100%; padding: 10px 0; }
  .nav-toggle:checked ~ ul { display: flex; }
}

/* Price table: switch from a horizontally-scrolling table to stacked cards on small screens */
@media (max-width: 600px) {
  .price-table-wrap { overflow-x: visible; box-shadow: none; }
  .price-table { min-width: 0; }
  .price-table thead { display: none; }
  .price-table, .price-table tbody, .price-table tr, .price-table td { display: block; width: 100%; }
  .price-table tr {
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
  }
  .price-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border);
    text-align: right;
  }
  .price-table td:last-child { border-bottom: none; }
  .price-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--color-primary);
    text-align: left;
  }
  .price-table td[data-label="Categorie vehicul"] {
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    justify-content: flex-start;
  }
  .price-table td[data-label="Categorie vehicul"]::before { display: none; }
}

/* Small phones: stack CTA buttons full-width instead of wrapping side by side */
@media (max-width: 480px) {
  .hero-actions {
    width: 100%;
  }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
  .container { padding: 0 16px; }
}

/* ===== Interaction & accessibility ===== */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
