/* Zajednički izgled i podrazumevana sportska tema. */
:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --card: #16161a;
  --ink: #f2f2f4;
  --muted: #9a9aa6;
  --line: #2a2a31;
  --accent: #be2026;
  --accent-text: #ff8588;
  --focus: #ff9a9c;
  --accent-dark: #a91821;
  --green: #3ddc97;
  --radius: 10px;
  --chrome: #000; --field: #0f0f12; --faint: #a2a2ae; --car-glow: #24242b; --on-accent: #fff;
  --font: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.6; }
a { color: inherit; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Naslovi: uska, teška, kosa slova daju osećaj brzine */
h1, h2, .logo { font-family: var(--display); font-weight: var(--h-weight, 800); font-style: var(--h-style, italic); text-transform: var(--h-case, uppercase); letter-spacing: var(--h-track, .01em); }

header {
  position: sticky;
  top: 10px;
  z-index: 10;
  width: min(920px, calc(100% - 40px));
  margin: 10px auto 0;
  background: var(--chrome);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}
@supports (backdrop-filter: blur(12px)) {
  header {
    background: color-mix(in srgb, var(--chrome) 80%, transparent);
    backdrop-filter: blur(12px);
  }
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding-inline: 18px;
}
.logo { display: flex; align-items: center; padding: 0; transition: opacity .2s; font-size: var(--logo-size, 1.7rem); text-decoration: none; }
/* Logo je SVG sa currentColor: boja se menja preko --logo (po temi), a ako nije zadata, uzima se --accent */
.logo svg { display: block; height: 42px; width: 90px; flex-shrink: 0; color: var(--logo, var(--accent)); }
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-inline: 15px;
  border-radius: 8px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s, color .18s;
}
.site-nav a:hover {
  color: var(--ink);
  background-color: var(--card);
}
.site-nav .nav-booking {
  gap: 8px;
  padding-inline: 18px;
  background-color: var(--accent);
  color: var(--on-accent);
}
.site-nav .nav-booking:hover {
  background-color: var(--accent-dark);
  color: var(--on-accent);
}
.nav-booking span { font-size: 1.1em; line-height: 1; }

.btn { display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 700; padding: 13px 28px; border-radius: 6px; background: var(--accent); color: var(--on-accent); text-decoration: none; transition: background .2s, transform .2s, box-shadow .2s; }
.btn:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: var(--btn-shadow, 0 8px 22px rgba(225,6,0,.35)); }

/* Uvod i rezervacija */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 48px); align-items: center; padding-top: 72px; padding-bottom: 80px; position: relative; }
.hero h1 { font-size: var(--h1-size, clamp(2.6rem, 6vw, 4.4rem)); line-height: var(--h1-lh, 1); padding-left: var(--indent, 0px); }
.hero-text p { margin: 22px 0 32px; color: var(--muted); max-width: 46ch; padding-left: var(--indent, 0px); }
.hero-text .btn { margin-left: var(--indent, 0px); }
.hero-text { animation: rise .7s ease both; }
.panel { animation: rise .7s .15s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.panel { background: var(--card); padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); border-top: 4px solid var(--accent); box-shadow: var(--shadow, 0 16px 50px rgba(0,0,0,.5)); display: grid; gap: 14px; }
.panel h2 { font-size: var(--panel-h2, 1.6rem); margin: 0; }
label { display: grid; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--muted); }
input, select { font: inherit; font-weight: 400; color: var(--ink); padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); }
input::placeholder { color: var(--faint); }
input:focus, select:focus { border-color: var(--focus); }
input.bad, select.bad { border-color: var(--err, #ff5a52); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.total strong { font-size: 1.4rem; }
.msg { min-height: 1.3em; font-size: .9rem; color: var(--err, #ff6b63); }
.msg.ok { color: var(--green); font-weight: 600; }

section { padding: 44px 0; }
section h2 { font-size: var(--h2-size, 2.2rem); margin-bottom: 22px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip { font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink); padding: 8px 20px; border-radius: 4px; border: 1px solid var(--line); background: var(--card); cursor: pointer; transition: background .2s, border-color .2s; }
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.car { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, border-color .25s, box-shadow .25s; }
@media (hover: hover) {
  .car:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--hover-shadow, 0 14px 30px rgba(225,6,0,.15)); }
}
.car-img { padding: 22px 28px 8px; background: radial-gradient(circle at 50% 100%, var(--car-glow), transparent 70%); }
.car-img svg { width: 100%; height: 70px; }
.car-img.has-photo { padding: 0; background: var(--car-glow); }
.car-img img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.car-body { padding: 8px 20px 20px; display: grid; gap: 4px; flex: 1; }
.car h3 { font-size: 1.05rem; }
.cat { font-size: .78rem; color: var(--accent-text); font-weight: 600; }
.specs { display: flex; gap: 12px; font-size: .82rem; color: var(--muted); margin-top: 4px; }
.car-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.price { font-weight: 800; font-size: 1.2rem; }
.price small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.car .btn { padding: 8px 16px; font-size: .86rem; }

.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; padding: 64px 24px 80px; }
.why > div { border-left: 3px solid var(--accent); padding-left: 16px; }
.why h3 { margin-bottom: 6px; }
.why p { color: var(--muted); font-size: .95rem; }

footer { background: var(--chrome); border-top: 3px solid var(--accent); padding: 48px 0 28px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
footer p { color: var(--muted); font-size: .95rem; }
footer a { text-decoration: none; }
footer a:hover { color: var(--accent-text); }
.demo { margin-top: 32px; font-size: .8rem; color: var(--faint); }

/* Sprečava da forma i tekst izlaze iz ekrana na uskim telefonima (grid deca imaju min-width: auto) */
.hero > *, .row > *, label { min-width: 0; }
input, select { width: 100%; min-width: 0; }

@media (max-width: 800px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 38px; padding-bottom: 44px; gap: 28px; }
}

/* Telefoni */
@media (max-width: 600px) {
  html { scroll-padding-top: 76px; }
  .wrap { padding: 0 16px; }
  header { top: 6px; width: calc(100% - 24px); margin-top: 6px; }
  .bar { min-height: 54px; gap: 8px; padding-inline: 10px; }
  .logo svg { height: 38px; width: 80px; }
  .site-nav { gap: 4px; }
  .site-nav a { padding-inline: 8px; font-size: .84rem; }
  .site-nav .nav-booking { gap: 5px; padding-inline: 10px; }
  .hero { padding-block: 26px 30px; gap: 20px; }
  .hero h1 { font-size: clamp(1.95rem, 8vw, 2.75rem); line-height: 1.1; text-wrap: pretty; }
  .hero-text p { margin: 12px 0 16px; line-height: 1.5; }
  .hero-text .btn { padding: 10px 16px; border: 1px solid var(--line); background: var(--card); color: var(--ink); box-shadow: none; }
  .hero-text .btn:hover { border-color: var(--accent); }
  .panel { padding: 18px 14px; gap: 12px; }
  .panel h2 { margin-bottom: 2px; }
  .panel .total { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); }
  .panel .total strong { font-size: 1.12rem; }
  .panel .msg:empty { position: absolute; min-height: 0; }
  .panel button[type="submit"] { min-height: 48px; }
  .row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .location-map iframe { max-height: min(300px, 65svh); }
  section { padding: 32px 0; }
  section h2 { font-size: 1.8rem; }
  .chip { padding: 11px 18px; }
  .fleet { gap: 14px; }
  .car-img img { aspect-ratio: 16 / 9; }
  .car-body { padding: 12px 14px 14px; }
  .car .btn { padding: 10px 14px; }
  .car-foot { margin-top: 10px; }
  .why { padding: 32px 16px 38px; gap: 16px; }
  footer { padding-top: 28px; }
  .foot { flex-direction: column; gap: 16px; }
  .btn { padding: 14px 28px; }
}

/* Na najužim ekranima datum ima ceo red. */
@media (max-width: 374px) { .row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }


.logo:hover { opacity: .8; }

/* Teme dele raspored, a menjaju paletu, tipografiju i završne detalje. */
/* Dnd X je početna tema za nove posetioce. */
:root[data-theme="dndx"] {
  --bg: #0e131c;
  --card: #18212e;
  --ink: #f6f8fb;
  --muted: #b6c2d2;
  --line: #364355;
  --accent: #ff8270;
  --accent-dark: #ffa08d;
  --accent-text: #ffab9b;
  --focus: #ffc7b6;
  --on-accent: #1b1416;
  --chrome: #121a26;
  --field: #111925;
  --faint: #a5b4c8;
  --car-glow: #243446;
  --radius: 16px;
  --display: "Sora", system-ui, sans-serif;
  --h-weight: 800;
  --h-style: normal;
  --h-case: none;
  --h-track: -.045em;
  --h1-size: clamp(2.35rem, 5.4vw, 4rem);
  --h1-lh: 1.08;
  --h2-size: 1.85rem;
  --panel-h2: 1.3rem;
  --shadow: 0 18px 52px #05080d70;
  --btn-shadow: 0 8px 22px #ff827026;
  --hover-shadow: 0 14px 30px #05080d66;
}
:root[data-theme="dndx"] { --hero-glow: #1c293b; }
:root[data-theme="plava"] { --hero-glow: #dce9fc; }
:root[data-theme="premium"] { --hero-glow: #24304b; }

body {
  background-image: radial-gradient(
    ellipse clamp(340px, 52vw, 920px) 440px at 30% 385px,
    var(--hero-glow, transparent), transparent 100%
  );
  background-repeat: no-repeat;
}

@media (max-width: 800px) {
  body {
    background-image: radial-gradient(
      ellipse 100% 380px at 35% 310px,
      var(--hero-glow, transparent), transparent 100%
    );
  }
}

:root[data-theme="plava"] {
  color-scheme: light;
  --bg: #eef4fd;
  --card: #fff;
  --ink: #122743;
  --muted: #435873;
  --line: #ccd8e8;
  --accent: #1655bf;
  --accent-dark: #124597;
  --accent-text: #174c9e;
  --focus: #194db4;
  --chrome: #f9fbff;
  --field: #f7faff;
  --faint: #536783;
  --car-glow: #dfeafb;
  --on-accent: #fff;
  --green: #08734d;
  --err: #b42131;
  --radius: 14px;
  --display: "Sora", system-ui, sans-serif;
  --h-weight: 800;
  --h-style: normal;
  --h-case: none;
  --h-track: -.045em;
  --h1-size: clamp(2.35rem, 5.2vw, 3.8rem);
  --h1-lh: 1.08;
  --h2-size: 1.75rem;
  --panel-h2: 1.3rem;
  --shadow: 0 16px 44px #173e7320;
  --btn-shadow: 0 8px 20px #174c9e33;
  --hover-shadow: 0 12px 28px #173e7326;
}

:root[data-theme="minimalna"] {
  color-scheme: light;
  --bg: #f7f7f2;
  --card: #fff;
  --ink: #1c2622;
  --muted: #46574e;
  --line: #ced8cf;
  --accent: #21604d;
  --accent-dark: #164e3c;
  --accent-text: #225e48;
  --focus: #22654e;
  --chrome: #f7f7f2;
  --field: #fbfcfa;
  --faint: #526259;
  --car-glow: #e7ede6;
  --on-accent: #fff;
  --green: #176049;
  --err: #aa2830;
  --radius: 20px;
  --display: "Sora", system-ui, sans-serif;
  --h-weight: 600;
  --h-style: normal;
  --h-case: none;
  --h-track: -.045em;
  --h1-size: clamp(2.15rem, 5vw, 3.55rem);
  --h1-lh: 1.13;
  --h2-size: 1.65rem;
  --panel-h2: 1.25rem;
  --shadow: none;
  --btn-shadow: none;
  --hover-shadow: 0 10px 24px #24362914;
}

:root[data-theme="premium"] {
  color-scheme: dark;
  --bg: #0b1222;
  --card: #151e32;
  --ink: #fbf5e9;
  --muted: #b9bdcb;
  --line: #343e56;
  --accent: #edc77d;
  --accent-dark: #f8d99b;
  --accent-text: #f0cb83;
  --focus: #ffe09f;
  --chrome: #090f1c;
  --field: #0d1629;
  --faint: #a2acbf;
  --car-glow: #26334d;
  --on-accent: #151722;
  --green: #66e4ad;
  --err: #ff9396;
  --radius: 12px;
  --display: "Playfair Display", Georgia, serif;
  --h-weight: 700;
  --h-style: normal;
  --h-case: none;
  --h-track: -.025em;
  --h1-size: clamp(2.45rem, 5.3vw, 4.05rem);
  --h1-lh: 1.08;
  --h2-size: 2rem;
  --panel-h2: 1.45rem;
  --shadow: 0 20px 52px #0006;
  --btn-shadow: 0 8px 22px #edc77d33;
  --hover-shadow: 0 14px 30px #0005;
}

:root[data-theme]:not([data-theme="sport"]) header,
:root[data-theme]:not([data-theme="sport"]) footer { border-width: 1px; border-color: var(--line); }
:root[data-theme="minimalna"] .btn, :root[data-theme="minimalna"] .chip { border-radius: 999px; }
:root[data-theme="minimalna"] .panel { border-top-width: 1px; }
:root[data-theme="premium"] .why > div { border-left-width: 1px; }

.theme-box { gap: 6px; min-width: 0; }
.theme-box select { width: auto; }
.theme-box select, .panel input, .panel select, .btn, .chip { min-height: 44px; }
.panel input, .panel select { font-size: 1rem; }
.btn:disabled { cursor: wait; opacity: .72; transform: none; }
.panel .msg:not(.ok) { color: var(--err, #ff9396); }
.hero h1 { text-wrap: balance; }
.car-foot, .specs { flex-wrap: wrap; }
.car-foot { gap: 8px 12px; }
.total { flex-wrap: wrap; gap: 4px 12px; }
footer a { text-decoration: underline; text-underline-offset: .2em; }


@media (max-width: 360px) {
  .bar .logo svg { width: 74px; height: 38px; }
  .site-nav a { font-size: .8rem; padding-inline: 6px; }
  .site-nav .nav-booking span { display: none; }
  .fleet, .why { grid-template-columns: minmax(0, 1fr); }
  .site-nav { gap: 0; }
  .site-nav .nav-booking { padding-inline: 8px; }
}

/* Postepeno otkrivanje sadržaja pri ulasku u vidljivo polje. */
@keyframes scroll-reveal {
  from { opacity: .55; translate: 0 16px; }
  to { opacity: 1; translate: 0 0; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) and (animation-range: entry 0% entry 85%) {
    #vozila > h2, .car, .why > div, .location-map {
      animation: scroll-reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 85%;
    }

    .car:focus-within, .location-map:focus-within {
      animation: none;
    }
  }
}

/* Prikaz datuma u formatu dan/mesec/godina uz ugrađeni kalendar. */
.date-field { display: grid; gap: 6px; }
.date-control { position: relative; }
.date-control input[type="text"] { padding-inline-end: 44px; }
.date-control::after {
  content: "";
  position: absolute;
  inset-inline-end: 15px;
  top: calc(50% - 6px);
  width: 13px;
  height: 12px;
  border: 1px solid currentColor;
  border-top-width: 4px;
  border-radius: 2px;
  pointer-events: none;
}
.panel .date-picker {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 44px;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.date-picker::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  cursor: pointer;
}
.date-control:has(.date-picker:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
