/* Car Rental Selfoss — strona publiczna. Klon wizualny żywej strony.
   Paleta (research-strona-inwentaryzacja.md): tekst #5C5C5C, akcent zielony #43922A, font Lato. */
:root {
  --color-text: #2b2b2b;
  --color-muted: #5c5c5c;
  --color-accent: #43922a;
  --color-accent-dark: #357021;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f6f3;
  --color-border: #e3e6e1;
  --radius: 8px;
  --maxw: 1140px;
  --font: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

h1, h2, h3 { line-height: 1.2; color: var(--color-text); }
h1 { font-size: 2.5rem; margin: 0 0 14px; }
h2 { font-size: 1.7rem; }
a { color: var(--color-accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 11px 20px; border-radius: var(--radius); font-weight: 700; cursor: pointer; border: 2px solid transparent; font-size: 1rem; line-height: 1.2; text-align: center; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn-primary:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); }
.btn-ghost { background: transparent; color: var(--color-accent-dark); border-color: var(--color-accent); }
.btn-ghost:hover { background: var(--color-accent); color: #fff; }
.btn-lg { padding: 15px 30px; font-size: 1.08rem; }
.btn-sm { padding: 8px 14px; font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--color-border); background: #fff; position: sticky; top: 0; z-index: 30; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 46px; width: auto; display: block; }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { color: var(--color-muted); font-weight: 700; font-size: 0.98rem; }
.main-nav a:hover, .main-nav a.active { color: var(--color-accent-dark); }
.main-nav a.nav-cta { color: #fff; }
.main-nav a.nav-cta:hover { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--color-muted); border-radius: 2px; }

/* ---------- Hero ---------- */
/* Wodospad Skógarfoss wyraźnie widoczny; tekst po lewej, okienko rezerwacji po prawej
   (jak na oryginale). Docelowo tło obrazka zastąpi zapętlone wideo. */
.hero { background-size: cover; background-position: center 38%; color: #fff; min-height: 58vh; display: flex; align-items: center; padding: 44px 0; }
.hero .container { width: 100%; }
.hero-grid { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.hero-text { flex: 1 1 auto; text-align: left; }
.hero h1 { color: #fff; font-size: 3.1rem; font-weight: 900; text-shadow: 0 2px 16px rgba(0,0,0,.5); margin: 0 0 12px; }
.hero .lead { font-size: 1.4rem; color: #f5f5f5; text-shadow: 0 1px 10px rgba(0,0,0,.5); margin: 0; }

/* ---------- Booking widget (okienko w hero, po prawej) ---------- */
.hero-widget { flex: 0 0 360px; width: 360px; background: #fff; color: var(--color-text); border-radius: var(--radius); box-shadow: 0 16px 44px rgba(0,0,0,.30); padding: 24px; text-align: left; }
.widget-title { margin: 0 0 16px; font-size: 1.3rem; }
.hero-widget label { display: block; margin-bottom: 12px; }
.hero-widget label span { display: block; font-size: 0.82rem; font-weight: 700; color: var(--color-muted); margin-bottom: 5px; }
.hero-widget input, .hero-widget select { width: 100%; padding: 11px 12px; border: 1px solid var(--color-border); border-radius: 6px; font: inherit; color: var(--color-text); background: #fff; }
.widget-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-block { display: block; width: 100%; margin-top: 4px; }
.widget-note { margin: 12px 0 0; font-size: 0.78rem; color: var(--color-muted); }

/* ---------- Sections ---------- */
section { }
.featured { padding: 64px 0; }
.featured-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.featured-img { border-radius: var(--radius); }
.featured-text h2 { margin-top: 0; }

.discounts { background: var(--color-bg-alt); padding: 52px 0; text-align: center; }
.discount-grid { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 680px; margin-left: auto; margin-right: auto; }
.discount-grid li { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 26px; }
.discount-pct { display: block; font-size: 2.4rem; font-weight: 900; color: var(--color-accent); }

.why { padding: 64px 0; }
.why h2 { text-align: center; margin-bottom: 22px; }
.why-lead { max-width: 760px; margin: 0 auto 14px; text-align: center; color: var(--color-muted); }
.why-grid { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-grid li { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 28px 24px; text-align: center; font-weight: 700; }
.why-icon { display: block; font-size: 2rem; margin-bottom: 12px; }

.locations { background: var(--color-bg-alt); padding: 56px 0; text-align: center; }
.locations .btn { margin: 8px 6px 0; }

/* ---------- Page head + prose ---------- */
.page-head { background: var(--color-bg-alt); padding: 48px 0; border-bottom: 1px solid var(--color-border); }
.page-head h1 { margin: 0; }
.page-intro { color: var(--color-muted); margin: 10px 0 0; max-width: 760px; }
.page-note { color: var(--color-muted); font-size: 0.88rem; margin: 8px 0 0; max-width: 760px; }
.prose, .legal { padding: 48px 0; }
.prose p, .legal p { margin: 0 0 16px; }
.contact-block, address { font-style: normal; line-height: 1.8; }
.link-list { list-style: none; padding: 0; }
.link-list li { padding: 6px 0; border-bottom: 1px solid var(--color-border); }

/* ---------- Legal ---------- */
.legal-content h2 { margin: 32px 0 12px; font-size: 1.45rem; }
.legal-content h3 { margin: 26px 0 10px; font-size: 1.15rem; color: var(--color-accent-dark); }
.legal-content p { margin: 0 0 12px; }
.legal-content ul, .legal-content ol { margin: 0 0 14px; padding-left: 22px; }
.legal-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border: 1px solid var(--color-border); }
.legal-table th { background: var(--color-bg-alt); }

/* ---------- Fleet ---------- */
.fleet { padding: 40px 0 64px; }
.car-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.car-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.car-thumb { position: relative; background: var(--color-bg-alt); height: 180px; display: flex; align-items: center; justify-content: center; }
.car-thumb img { width: 100%; height: 100%; object-fit: cover; }
.car-thumb-fallback { font-size: 3.4rem; opacity: .5; }
.badge-4x4 { position: absolute; top: 10px; left: 10px; background: var(--color-accent); color: #fff; font-size: 0.74rem; font-weight: 700; padding: 4px 9px; border-radius: 5px; }
.car-body { padding: 18px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.car-name { margin: 0; font-size: 1.15rem; }
.car-class { color: var(--color-muted); margin: 4px 0 8px; font-size: 0.9rem; }
.car-price-lead { margin: 0 0 12px; color: var(--color-text); font-size: 0.98rem; }
.car-price-lead strong { color: var(--color-accent-dark); font-size: 1.15rem; }
.car-price-lead small { color: var(--color-muted); }
.car-specs { list-style: none; padding: 0; margin: 0 0 16px; font-size: 0.88rem; color: var(--color-muted); }
.car-specs li { padding: 2px 0; }
.car-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.car-price { font-weight: 700; color: var(--color-text); }
.car-price small { color: var(--color-muted); font-weight: 400; }
.empty-state { text-align: center; color: var(--color-muted); padding: 40px 0; }

/* ---------- Contact / enquiry ---------- */
.contact { padding: 48px 0 64px; }
.contact-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }
.enquiry-form label { display: block; margin-bottom: 16px; }
.enquiry-form label span { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; color: var(--color-muted); }
.enquiry-form input, .enquiry-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--color-border); border-radius: 6px; font: inherit; }
.enquiry-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-aside { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px; }
.alert { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.alert-success { background: #eaf6e6; border: 1px solid #b6dca6; }
.alert-success h2 { margin: 0 0 8px; color: var(--color-accent-dark); }
.alert-error { background: #fdecea; border: 1px solid #f3b7b0; color: #9c2a1e; }

/* ---------- Footer ---------- */
.site-footer { border-top: 3px solid var(--color-accent); background: #2f322e; color: #cfd3cb; margin-top: 56px; padding: 40px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-name { color: #fff; font-size: 1.15rem; display: block; }
.footer-legal { margin: 6px 0; }
.footer-meta { font-size: 0.86rem; color: #a7ab9f; margin: 2px 0; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 1rem; }
.site-footer a { color: #d7e6cf; }
.site-footer .footer-label { color: #a7ab9f; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { padding: 4px 0; }
.footer-bottom { border-top: 1px solid #45493f; margin-top: 28px; padding: 16px 0; font-size: 0.82rem; color: #a7ab9f; }

/* ---------- Cookie banner ---------- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cookie-banner p { margin: 0; font-size: 0.9rem; color: var(--color-muted); }
.cookie-actions { display: flex; gap: 10px; }
/* Atrybut hidden MUSI wygrać z .cookie-banner{display:flex} (wyższa specyficzność selektorem atrybutu).
   Bez tego baner nie znika po kliknięciu zgody i blokuje treść (naprawa zgłoszonego buga). */
.cookie-banner[hidden] { display: none; }

/* ---------- Error ---------- */
.error-page { text-align: center; padding: 80px 0; }
.error-page h1 { font-size: 4rem; margin: 0; color: var(--color-accent-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .featured-inner, .contact-layout, .footer-grid { grid-template-columns: 1fr; }
  .car-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: auto; padding: 64px 0; }
  .hero-grid { flex-direction: column; align-items: stretch; gap: 32px; }
  .hero-text { text-align: center; }
  .hero-widget { flex-basis: auto; width: 100%; max-width: 460px; margin: 0 auto; }
}
@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  .hero { padding: 48px 0; }
  .hero h1 { font-size: 2.1rem; }
  .nav-toggle { display: flex; }
  .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--color-border); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px; box-shadow: 0 8px 20px rgba(0,0,0,.08); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--color-border); }
  .main-nav a.nav-cta { margin-top: 10px; border-bottom: 0; }
  .car-grid, .why-grid, .discount-grid, .enquiry-form .form-row { grid-template-columns: 1fr; }
}
