/* Design: "Нощен курс" — Bulgarian motorway signage at night.
   Asphalt-dark chrome and hero (gantry sign in headlights), retroreflective
   yellow accents, daylight-paper body for scannable listings.
   Display: Saira Condensed (tall sign lettering). Body: Inter. */
:root {
  --asphalt: #101613;
  --asphalt-2: #1a231e;
  --green-900: #0b3d2e;
  --green-700: #10553f;
  --green-600: #17654c;
  --white: #ffffff;
  --paper: #f3f2ec;
  --ink: #16211b;
  --muted: #5c6b64;
  --line: #d9ded7;
  --signal: #ffd23f;      /* retroreflective yellow */
  --danger: #b3261e;
  --radius: 10px;
  --font-display: 'Saira Condensed', 'Saira', sans-serif;
  --font-sign: 'Saira', sans-serif;
  --font-body: 'Inter', sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
}
h1, h2, h3 { font-family: var(--font-sign); }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; }

/* Two-column layout with sidebar */
.layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; max-width: 1280px; }
.layout-main { min-width: 0; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }

/* Topbar: night gantry */
.topbar {
  background: var(--asphalt); color: var(--white);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 62px;
  border-bottom: 4px solid var(--signal);
}
.brand { font-family: var(--font-sign); font-size: 23px; font-weight: 800; color: var(--white); letter-spacing: .3px; }
.brand span { color: var(--signal); }
.brand:hover { text-decoration: none; }
.topbar nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar nav a { color: #c9d4cd; font-weight: 500; }
.topbar nav a.active { color: var(--white); border-bottom: 3px solid var(--signal); padding-bottom: 2px; }
.topbar .cta {
  background: var(--signal); color: var(--asphalt); font-weight: 700;
  padding: 8px 16px; border-radius: 7px;
}
.topbar .cta:hover { text-decoration: none; filter: brightness(1.06); }
.inline-form { display: inline; }
.link-btn {
  background: none; border: none; color: #c9d4cd; font: inherit;
  font-weight: 500; cursor: pointer; padding: 0;
}
.link-btn:hover { text-decoration: underline; }

/* ---------- Landing ---------- */
.hero {
  background:
    radial-gradient(ellipse 900px 420px at 70% -10%, rgba(255, 210, 63, .13), transparent 60%),
    linear-gradient(180deg, var(--asphalt) 0%, var(--asphalt-2) 100%);
  color: var(--white);
  border-bottom: 4px solid var(--signal);
}
.hero-inner { max-width: 1080px; margin: 0 auto; padding: 72px 16px 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-art svg { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 480px; } }
.hero-eyebrow {
  margin: 0 0 14px; font-family: var(--font-sign); font-weight: 600;
  font-size: 13px; text-transform: uppercase; letter-spacing: 2.2px; color: var(--signal);
}
.hero-title {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(52px, 9vw, 96px); line-height: .95; letter-spacing: .5px;
  text-transform: uppercase; color: var(--white);
}
.hero-sub { max-width: 560px; margin: 22px 0 30px; font-size: 17px; color: #cfd8d2; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-signal {
  background: var(--signal); color: var(--asphalt); font-weight: 700; font-size: 16px;
  padding: 13px 26px;
}
.btn-signal:hover { background: #ffdb63; }
.btn-ghost {
  background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.45);
  font-weight: 600; font-size: 16px; padding: 11px 24px;
}
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.06); }

/* Kilometer-post stat tiles */
.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 44px; }
.k-post {
  background: var(--green-700); border: 2px solid var(--white); border-radius: 8px;
  box-shadow: 0 0 0 2px var(--green-700);
  padding: 12px 22px 10px; display: flex; flex-direction: column; min-width: 150px;
}
.k-post strong { font-family: var(--font-display); font-size: 34px; font-weight: 800; line-height: 1; color: var(--white); }
.k-post span { font-size: 12.5px; color: #cfe0d8; text-transform: uppercase; letter-spacing: .6px; margin-top: 4px; }

/* Live route ticker — roadside LED board */
.ticker {
  background: var(--asphalt); border-bottom: 1px solid #2a352e;
  overflow: hidden; padding: 10px 0;
}
.ticker-track {
  display: flex; gap: 40px; width: max-content;
  animation: ticker-roll 45s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.ticker-item:hover { text-decoration: none; }
.ticker-route { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--signal); letter-spacing: .5px; }
.ticker-meta { font-size: 12.5px; color: #8fa199; }
.ticker-item:hover .ticker-route { color: #ffdb63; text-decoration: underline; }

.landing { max-width: 1080px; }
.land-section { margin-top: 52px; }
.land-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.land-title {
  margin: 0 0 18px; font-family: var(--font-display); font-size: 30px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
}
.land-title::after {
  content: ''; display: block; width: 56px; height: 4px; background: var(--signal); margin-top: 6px;
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px;
}
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--green-700); border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--green-700);
  color: var(--white); font-family: var(--font-display); font-size: 20px; font-weight: 800;
}
.step h3 { margin: 14px 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.news-tile {
  display: block; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; color: var(--ink);
}
.news-tile:hover { text-decoration: none; border-color: var(--green-600); }
.news-tile h3 { margin: 6px 0 8px; font-size: 16px; line-height: 1.35; }
.news-tile h3:hover { color: var(--green-700); }
.news-tile p { margin: 0; color: var(--muted); font-size: 13.5px; }

.land-cta {
  margin-top: 64px; text-align: center;
  background: linear-gradient(180deg, var(--green-900), var(--green-700));
  border-radius: 14px; border-bottom: 4px solid var(--signal);
  color: var(--white); padding: 48px 24px 44px;
}
.land-cta h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 32px; text-transform: uppercase; letter-spacing: .6px; }
.land-cta p { margin: 0 0 24px; color: #cfe0d8; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.side-box {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.side-box-title {
  margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); border-bottom: 2px solid var(--signal); padding-bottom: 6px;
}
.stat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.stat-list strong { color: var(--green-700); font-family: var(--font-sign); font-size: 17px; margin-right: 4px; }
.news-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.news-list li { display: flex; flex-direction: column; gap: 2px; }
.news-list a { font-weight: 600; font-size: 13.5px; }
.news-date { color: var(--muted); font-size: 12px; }
.side-more { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; }
.info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }

.ad-box { background: #fdf9ef; border-color: var(--signal); }
.ad-label {
  display: inline-block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); background: var(--line); padding: 2px 7px; border-radius: 99px; margin-bottom: 6px;
}
.ad-title { margin: 4px 0; font-size: 14.5px; }
.ad-body { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

.banner-ad {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fdf9ef; border: 1px solid var(--signal); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 18px; font-size: 14px;
}
.banner-ad-body { color: var(--muted); }

.news-card h2 { margin: 6px 0 8px; font-size: 19px; }
.news-article h1 { margin: 6px 0 14px; }
.news-body { line-height: 1.7; }
.news-tag {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--green-700); background: #e2f3e9;
  padding: 2px 8px; border-radius: 99px; margin-right: 8px; vertical-align: middle;
}

/* Route chip — directional road sign */
.route-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--green-600); color: var(--white);
  font-family: var(--font-sign); font-weight: 700; font-size: 17px;
  padding: 8px 16px; border-radius: 8px;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--green-600);
}
.route-chip .arrow { color: var(--signal); }

/* Cards / table */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px;
}
.posting-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  transition: border-color .15s ease;
}
.posting-row:hover { border-color: var(--green-600); }
.posting-meta { color: var(--muted); font-size: 13.5px; margin-top: 8px; display: flex; gap: 16px; flex-wrap: wrap; }
.posting-meta strong { color: var(--ink); font-weight: 600; }
.price-tag {
  font-family: var(--font-sign); font-weight: 700; font-size: 18px;
  color: var(--green-700); white-space: nowrap;
}

/* Filter bar */
.filter-bar {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 20px;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: end;
}
.filter-bar .field { display: flex; flex-direction: column; gap: 4px; }
.filter-bar label { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

/* Forms */
input, select, textarea {
  font: inherit; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--white); color: var(--ink); min-width: 0;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--green-600); outline-offset: 1px; border-color: var(--green-600);
}
.btn {
  display: inline-block; background: var(--green-700); color: var(--white);
  font-weight: 600; border: none; border-radius: 7px;
  padding: 10px 20px; cursor: pointer; font-family: var(--font-body); font-size: 15px;
}
.btn:hover { background: var(--green-600); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--green-700); border: 1.5px solid var(--green-700); }
.btn-secondary:hover { background: #e9f1ed; }
.btn-danger { background: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.form-field input, .form-field select, .form-field textarea { width: 100%; }
.form-field .errors { color: var(--danger); font-size: 13px; margin-top: 3px; }
.help { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

/* Detail page */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 760px) { .detail-grid { grid-template-columns: 1fr; } }
.contact-box { background: var(--green-900); color: var(--white); border-radius: var(--radius); padding: 20px; }
.contact-box h3 { margin-top: 0; color: var(--signal); }
.contact-box a { color: var(--signal); }
.locked {
  background: var(--white); border: 2px dashed var(--line);
  border-radius: var(--radius); padding: 20px; color: var(--muted); text-align: center;
}

/* Messages */
.messages { max-width: 1080px; margin: 14px auto 0; padding: 0 16px; }
.msg { padding: 11px 15px; border-radius: 8px; margin-bottom: 8px; font-weight: 500; }
.msg-success { background: #e2f3e9; color: #14532d; }
.msg-error { background: #fdecea; color: var(--danger); }

/* Misc */
.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 26px; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.badge-off { background: #eee; color: var(--muted); }
.badge-on { background: #e2f3e9; color: #14532d; }
.pagination { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* Footer: night chrome to match the topbar */
.footer { background: var(--asphalt); color: #c9d4cd; font-size: 14px; margin-top: 40px; border-top: 4px solid var(--signal); }
.footer-grid {
  max-width: 1080px; margin: 0 auto; padding: 40px 16px 28px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { margin: 10px 0 0; font-size: 13.5px; color: #8fa199; max-width: 300px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 {
  margin: 0 0 4px; font-family: var(--font-sign); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; color: var(--signal);
}
.footer-col a { color: #c9d4cd; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  max-width: 1080px; margin: 0 auto; padding: 16px; border-top: 1px solid #2a352e;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: #8fa199;
}

/* Static pages */
.static-page { max-width: 760px; padding: 28px 32px; }
.static-page h1 { margin-top: 0; }
.static-page h2 { font-size: 18px; margin: 26px 0 8px; }
.static-page li { margin-bottom: 6px; }
.contact-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.auth-card { max-width: 460px; margin: 30px auto; }
.section-title { font-size: 15px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 22px 0 10px; }
/* Posting form */
.post-head {
  border-radius: var(--radius); padding: 24px 26px; margin-bottom: 20px;
  color: var(--white); border-bottom: 4px solid var(--signal);
  background: linear-gradient(180deg, var(--green-900), var(--green-700));
}
.post-head-truck { background: linear-gradient(180deg, #14181c, var(--asphalt-2)); }
.post-kind {
  display: inline-block; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--signal); border: 1.5px solid var(--signal);
  border-radius: 99px; padding: 3px 12px;
}
.post-head h1 { margin: 12px 0 6px; font-family: var(--font-display); font-size: 32px;
  text-transform: uppercase; letter-spacing: .5px; }
.post-head p { margin: 0; color: #cfd8d2; max-width: 560px; }
.post-switch { margin-top: 14px; font-size: 13.5px; color: #8fa199; }
.post-switch a { color: var(--signal); font-weight: 600; }

.form-section { border: 1px solid var(--line); margin: 0 0 14px; }
.form-section legend {
  font-family: var(--font-sign); font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: .6px; color: var(--green-700);
  padding: 0 10px; background: var(--white); border: 1px solid var(--line);
  border-radius: 99px;
}
.form-check { display: flex; align-items: center; gap: 10px; flex-direction: row; }
.form-check label { margin: 0; }
.form-check input { width: 18px; height: 18px; accent-color: var(--green-700); }
.post-submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }

/* Route map on detail page */
.route-map { margin-top: 18px; }
.route-map iframe {
  display: block; width: 100%; height: 320px; border: 1px solid var(--line);
  border-radius: var(--radius);
}
.route-map .btn { display: inline-block; margin-top: 12px; }

/* Mobile */
@media (max-width: 640px) {
  .topbar { height: auto; min-height: 62px; flex-wrap: wrap; padding: 10px 14px; gap: 6px 14px; }
  .topbar nav { gap: 12px 14px; }
  .hero-inner { padding: 44px 16px 40px; }
  .hero-sub { font-size: 15.5px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .hero-stats { gap: 10px; }
  .k-post { min-width: 0; flex: 1 1 45%; padding: 10px 14px 8px; }
  .k-post strong { font-size: 27px; }
  .posting-row { grid-template-columns: 1fr; }
  .price-tag { white-space: normal; }
  .filter-bar .field { flex: 1 1 45%; }
  .filter-bar input, .filter-bar select { width: 100%; }
  .filter-bar .btn, .filter-bar .btn-secondary { flex: 1 1 45%; text-align: center; }
  .land-title { font-size: 25px; }
  .land-cta h2 { font-size: 25px; }
  .static-page { padding: 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .ticker-track { animation: none; }
}
