/* Syartijo design system.
 *
 * Brand tokens mirror hasan/web Styles/input.css so the static site and the
 * ASP.NET Core app look like one product. Keep the two in sync.
 */

:root {
  --primary: #0b3d91;
  --primary-dark: #082c6b;
  --primary-light: #3d63b0;
  --accent: #ff6b00;
  --accent-dark: #cc5600;
  --success: #1e8e3e;
  --warning: #f2b705;
  --danger: #d93025;
  --n900: #1a1d21;
  --n600: #5b6470;
  --n300: #d7dce1;
  --n100: #f5f6f8;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 3px rgba(26, 29, 33, .08), 0 1px 2px rgba(26, 29, 33, .06);
  --shadow-md: 0 4px 16px rgba(26, 29, 33, .1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-arabic: "Cairo", "Noto Kufi Arabic", var(--font-sans);
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--n100);
  color: var(--n900);
  line-height: 1.65;
  font-size: 16px;
}

/* Arabic pages switch script and direction together. */
html[dir="rtl"] body { font-family: var(--font-arabic); }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-sm { padding-block: clamp(1.75rem, 4vw, 2.75rem); }
.center { text-align: center; }
.muted { color: var(--n600); }
.lead { font-size: 1.1rem; color: var(--n600); max-width: 65ch; }
.center .lead { margin-inline: auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--n300);
}
.nav { display: flex; align-items: center; gap: 1rem; height: 64px; position: relative; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.15rem; color: var(--primary); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: grid; place-items: center; font-size: 18px;
}
/* Two groups inside the bar: the market's sections, then the visitor's own
   preferences (language, currency). Keeping them in separate containers is
   what lets the preferences drop to their own row on mobile, and what stops a
   market with a long menu from pushing the switchers off the edge. */
.nav-links { display: flex; gap: .6rem; margin-inline-start: auto; align-items: center; }
.nav-sections { display: flex; gap: .25rem; align-items: center; }
.nav-prefs { display: flex; gap: .4rem; align-items: center; }
.nav-links a {
  padding: .5rem .8rem; border-radius: 8px; color: var(--n600);
  font-weight: 500; font-size: .95rem; white-space: nowrap;
}
.nav-links a:hover { background: var(--n100); color: var(--primary); text-decoration: none; }
.nav-links a.is-active { color: var(--primary); font-weight: 600; }

/* Language switcher sits apart from the section links. */
.nav-links a.lang-switch {
  border: 1px solid var(--n300); font-weight: 600; color: var(--primary);
}
.nav-links a.lang-switch:hover { border-color: var(--primary); }

/* Currency switcher. A native <select> on purpose: it is keyboard and screen
   reader accessible for free, and on phones it opens the OS picker, which
   handles a nine-item list better than anything built here would. */
.cur-switch {
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--primary);
  background: #fff; border: 1px solid var(--n300); border-radius: 8px;
  padding: .5rem .55rem; cursor: pointer; max-width: 11rem;
}
.cur-switch:hover { border-color: var(--primary); }
.cur-switch:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

.nav-toggle {
  display: none; margin-inline-start: auto; background: none; border: 1px solid var(--n300);
  border-radius: 8px; padding: .45rem .6rem; cursor: pointer; font-size: 1.1rem; color: var(--n900);
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; inset-inline: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--n300); padding: .5rem;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .75rem .9rem; }
  .nav-sections { flex-direction: column; align-items: stretch; gap: 0; }
  /* Below the sections, side by side, separated from them so the preferences
     do not read as two more destinations. */
  .nav-prefs {
    margin-top: .5rem; padding-top: .6rem; border-top: 1px solid var(--n300);
  }
  .nav-prefs > * { flex: 1; }
  .nav-links a.lang-switch { text-align: center; }
  .cur-switch { max-width: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, box-shadow .15s, transform .08s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .22); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--n300); }
.btn-outline:hover { border-color: var(--primary); }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding-block: clamp(3rem, 8vw, 5.5rem); position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset-inline-end: -120px; top: -120px;
  width: 360px; height: 360px; border-radius: 50%;
  background: rgba(255, 107, 0, .18); filter: blur(60px);
}
.hero h1 { color: #fff; }
.hero p { color: rgba(255, 255, 255, .9); font-size: 1.12rem; max-width: 60ch; margin-inline: auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.75rem; }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: #fff; border-radius: var(--radius); padding: 1.4rem;
  box-shadow: var(--shadow); border: 1px solid var(--n300);
}
.card-link { display: block; color: inherit; transition: box-shadow .15s, transform .12s; }
.card-link:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.card h3 { margin-bottom: .35rem; }
.card p:last-child { margin-bottom: 0; }

.icon-badge {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(11, 61, 145, .1); color: var(--primary); font-size: 20px; margin-bottom: .85rem;
}

/* ---------- brand chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  background: #fff; border: 1px solid var(--n300); border-radius: 999px;
  padding: .42rem .95rem; font-size: .9rem; color: var(--n900); font-weight: 500;
}
.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: 1.1rem; }
.step { position: relative; padding-inline-start: 3.25rem; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; inset-inline-start: 0; top: 0;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.step h3 { margin-bottom: .2rem; }

/* ---------- ads ---------- */
/* Reserved ad slots. Height is held even when empty so adding ads later does
   not shift content (avoids layout-shift penalties). */
.ad-slot { margin-block: 2rem; text-align: center; min-height: 100px; }
.ad-slot[data-label]::before {
  content: attr(data-label); display: block; font-size: .7rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--n600); margin-bottom: .4rem;
}

/* ---------- footer ---------- */
.site-footer { background: var(--n900); color: rgba(255, 255, 255, .75); margin-top: 3rem; }
.site-footer a { color: rgba(255, 255, 255, .75); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding-block: 2.75rem; }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: .75rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 1.1rem;
  font-size: .87rem; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between;
}

/* ---------- misc ---------- */
.notice {
  background: rgba(242, 183, 5, .12); border: 1px solid rgba(242, 183, 5, .4);
  border-radius: var(--radius); padding: .9rem 1.1rem; font-size: .93rem;
}
.prose { max-width: 72ch; }
.prose ul, .prose ol { padding-inline-start: 1.3rem; }
.prose li { margin-bottom: .45rem; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; }
.table th, .table td { padding: .7rem .9rem; border: 1px solid var(--n300); text-align: start; }
.table th { background: var(--n100); font-weight: 600; }

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0;
  background: var(--primary); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { inset-inline-start: 0; }

/* ---------- rental metasearch ---------- */
/* Everything here uses logical properties (inline-start/end, margin-inline)
   rather than left/right, so the Arabic build mirrors correctly from the
   dir="rtl" on <html> alone - there is no second RTL stylesheet to keep in
   sync. */

.rental-search-bar { background: #fff; border: 1px solid var(--n300); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.rental-search-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.rental-field { display: grid; gap: .3rem; }
.rental-field label { font-size: .82rem; font-weight: 600; color: var(--n600); }
.rental-field select, .rental-field input {
  font: inherit; padding: .6rem .65rem; border: 1px solid var(--n300);
  border-radius: 8px; background: #fff; color: var(--n900); width: 100%;
}
.rental-field select:focus-visible, .rental-field input:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* The worldwide pick-up combobox. The list is positioned against the field, so
   the field is the containing block; it is also the only cell in the search bar
   that overflows it, hence the stacking context. */
.rental-field-loc { position: relative; z-index: 2; }
.loc-list {
  position: absolute; inset-inline: 0; top: 100%; z-index: 30;
  margin: .25rem 0 0; padding: .25rem; list-style: none;
  background: #fff; border: 1px solid var(--n300); border-radius: 8px;
  box-shadow: var(--shadow); max-height: 17rem; overflow-y: auto;
}
.loc-item {
  display: flex; justify-content: space-between; align-items: baseline; gap: .6rem;
  padding: .45rem .55rem; border-radius: 6px; cursor: pointer;
}
/* Keyboard and mouse share one highlight, so arrowing down looks the same as
   hovering - two different styles would read as two different selections. */
.loc-item:hover, .loc-item.is-active { background: rgba(11, 61, 145, .09); }
.loc-place { font-weight: 600; color: var(--n900); }
/* The country is context, not the answer; it may wrap away on a narrow field
   but must never push the place name out of the row. */
.loc-country { font-size: .8rem; color: var(--n600); white-space: nowrap; }
.loc-none { padding: .5rem .55rem; color: var(--n600); font-size: .9rem; }

.rental-summary { font-weight: 600; color: var(--n600); font-size: .95rem; }

.rental-demo { background: rgba(11, 61, 145, .07); border-color: rgba(11, 61, 145, .3); }
/* Its own line, because it is an action and the sentence before it is an
   explanation - run together they read as one more clause nobody clicks. */
.rental-demo-live { display: inline-block; margin-block-start: .5rem; font-weight: 600; }

.rental-layout { display: grid; gap: 1.25rem; grid-template-columns: 260px 1fr; align-items: start; margin-top: 1.5rem; }

.rental-filters {
  background: #fff; border: 1px solid var(--n300); border-radius: var(--radius);
  padding: 1.1rem; box-shadow: var(--shadow); position: sticky; top: 80px;
  max-height: calc(100vh - 100px); overflow-y: auto;
}
.rf-title { font-size: 1rem; margin-bottom: .9rem; }
.rf-group { border-top: 1px solid var(--n300); padding-top: .8rem; margin-top: .8rem; }
.rf-group:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.rf-group h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--n600); margin-bottom: .5rem; }
.rf-row { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; font-size: .92rem; cursor: pointer; }
.rf-row input { flex: none; accent-color: var(--primary); }
.rf-row > span:first-of-type { flex: 1; }
.rf-count { color: var(--n600); font-size: .82rem; }
.rf-range { width: 100%; accent-color: var(--primary); }
.rf-range-val { font-size: .85rem; color: var(--n600); font-weight: 600; }
.rf-clear { width: 100%; margin-top: 1rem; font-size: .88rem; padding: .55rem 1rem; }

.rental-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.rental-count { font-weight: 700; }
.rental-sort { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--n600); }
.rental-sort select { font: inherit; padding: .4rem .5rem; border: 1px solid var(--n300); border-radius: 8px; background: #fff; }

.rental-loading { padding-block: 3rem; }

/* An offer is three columns on desktop - the car, who supplies it, what it
   costs - because that is the order the decision is actually made in. */
.offer {
  display: grid; grid-template-columns: 1fr auto 200px; gap: 1rem;
  background: #fff; border: 1px solid var(--n300); border-radius: var(--radius);
  padding: 1.1rem; margin-bottom: .85rem; box-shadow: var(--shadow);
  transition: box-shadow .15s;
}
.offer:hover { box-shadow: var(--shadow-md); }
.offer h3 { margin-bottom: .15rem; font-size: 1.1rem; }
.offer-sub { color: var(--n600); font-size: .88rem; margin-bottom: .6rem; }
.offer-specs { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .88rem; color: var(--n600); }
.offer-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.rb { font-size: .78rem; padding: .2rem .55rem; border-radius: 999px; background: var(--n100); color: var(--n600); border: 1px solid var(--n300); }
.rb-good { background: rgba(30, 142, 62, .1); color: var(--success); border-color: rgba(30, 142, 62, .3); }

.offer-supplier { display: grid; gap: .25rem; align-content: start; text-align: center; padding-inline: .5rem; }
.offer-sup-name { font-weight: 600; font-size: .92rem; }
.offer-rating { display: grid; gap: .1rem; font-size: .8rem; }
.offer-rating strong { font-size: 1.05rem; color: var(--primary); }

.offer-price { display: grid; gap: .15rem; align-content: start; text-align: end; border-inline-start: 1px solid var(--n300); padding-inline-start: 1rem; }
.offer-perday { font-size: 1.5rem; font-weight: 800; color: var(--n900); line-height: 1.15; }
.offer-perday-label { font-size: .8rem; color: var(--n600); }
.offer-total { font-size: .82rem; color: var(--n600); margin-top: .2rem; }
.offer-cta { margin-top: .6rem; width: 100%; }

@media (max-width: 980px) {
  .rental-layout { grid-template-columns: 1fr; }
  .rental-filters { position: static; max-height: none; }
  .offer { grid-template-columns: 1fr; gap: .75rem; }
  .offer-supplier { text-align: start; padding-inline: 0; display: flex; align-items: baseline; gap: .6rem; }
  .offer-price {
    border-inline-start: 0; padding-inline-start: 0; text-align: start;
    border-top: 1px solid var(--n300); padding-top: .75rem;
  }
  .offer-cta { width: auto; justify-self: start; padding-inline: 2rem; }
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
