/* =====================================================================
   BAIC Iraq Homepage V2 stylesheet.
   One file, component sections in page order. No framework, no legacy style.css.
   Breakpoints (max-width): 1199px header -> drawer · 999px tablet layouts · 767px mobile layouts.
   Shared by the homepage and /about/ (about.css adds the About page sections).
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --red: #d1291a;
  --red-dark: #b0200f;
  --ink: #1f1f1f;
  --text: #333;
  --muted: #5e5e5e;
  --line: #e4e4e4;
  --bg-alt: #f4f5f6;
  --dark: #171717;
  --white: #fff;
  --font: Arial, Helvetica, sans-serif;
  --hd-h: 80px;
  --wrap: 1360px;
  --gutter: clamp(16px, 4vw, 56px);
  --sec-y: clamp(56px, 7vw, 104px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 1199px) { :root { --hd-h: 64px; } }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hd-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font: 16px/1.6 var(--font); overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
main:focus { outline: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--white); text-decoration: none; transform: translateY(-160%); transition: transform .2s; }
.skip-link:focus { transform: none; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sec { padding-block: var(--sec-y); }
.sec-title { color: var(--ink); font-size: clamp(28px, 3.2vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; text-transform: uppercase; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 1px solid currentColor; background: transparent; font-size: 14px; letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.btn-primary { border-color: var(--red); background: var(--red); color: var(--white); }
.btn-primary:hover { border-color: var(--red-dark); background: var(--red-dark); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-link { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.btn-link:hover { color: var(--red); }

/* ---------- 3. Header ---------- */
.hd { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--hd-h); color: var(--white); font-size: 17px; transition: background-color .25s, color .25s, box-shadow .25s; }
.hd.is-solid, .hd:hover, .hd:focus-within, .hd.is-menu { background: var(--white); color: var(--ink); box-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
.hd-bar { height: 100%; max-width: 1780px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.hd-logo { flex: 0 0 auto; display: block; }
.hd-logo img { width: 120px; height: auto; transition: filter .25s; }
@media (min-width: 1200px) {
  /* transparent over the hero until scrolled, hovered, focused or a menu is open */
  .hd:not(.is-solid):not(:hover):not(:focus-within):not(.is-menu) .hd-logo img { filter: grayscale(1) invert(1) brightness(1.2); }
  .hd:not(.is-solid):not(:hover):not(:focus-within):not(.is-menu) .hd-link,
  .hd:not(.is-solid):not(:hover):not(:focus-within):not(.is-menu) .hd-cta { text-shadow: 0 0 8px rgba(0, 0, 0, .6); }
}
.hd-nav { flex: 1 1 auto; align-self: stretch; }
.hd-list { height: 100%; display: flex; justify-content: center; gap: 8px; }
.hd-list > li { display: flex; }
.hd-link { display: flex; align-items: center; gap: 4px; padding: 0 14px; border: 0; background: none; color: inherit; font-size: inherit; text-decoration: none; white-space: nowrap; cursor: pointer; position: relative; }
.hd-link::after { content: ""; position: absolute; left: 50%; bottom: 16px; width: 0; height: 2px; background: var(--red); transform: translateX(-50%); transition: width .2s; }
.hd-link:hover::after, .hd-models-btn[aria-expanded="true"]::after { width: 34px; }
.hd-link svg { width: 16px; height: 16px; fill: currentColor; transition: transform .2s; }
.hd-models-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.hd-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.hd-cta { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border: 1px solid currentColor; color: inherit; font-size: 14px; text-decoration: none; transition: background-color .2s, color .2s, border-color .2s; }
.hd-cta:hover { border-color: var(--red); background: var(--red); color: var(--white); text-shadow: none; }
.hd-burger { display: none; width: 44px; height: 44px; padding: 10px; border: 0; background: none; cursor: pointer; }
.hd-burger svg { width: 24px; height: 24px; fill: currentColor; }

/* models mega menu (desktop) */
.mega { position: absolute; top: var(--hd-h); left: 0; right: 0; background: rgba(255, 255, 255, .97); color: var(--ink); border-top: 1px solid var(--line); box-shadow: 0 18px 32px rgba(0, 0, 0, .08); animation: fade-down .2s var(--ease); }
.mega[hidden] { display: none; }
.mega-inner { width: min(1360px, 100% - 140px); margin: 0 auto; padding: 32px 0 44px; display: grid; grid-template-columns: 170px 1fr; gap: 32px; }
.mega-filters { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mega-filter { min-height: 40px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 17px; text-align: left; cursor: pointer; }
.mega-filter:hover, .mega-filter[aria-pressed="true"] { color: var(--red); }
.mega-filter[aria-pressed="true"] { font-weight: 700; }
.mega-group + .mega-group { margin-top: 22px; }
.mega-group[hidden] { display: none; }
.mega-group h3 { margin-bottom: 12px; font-size: 18px; color: var(--ink); }
.mega-cards { display: flex; flex-wrap: wrap; gap: 20px 36px; }
.mega-card { width: 150px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; color: var(--ink); text-decoration: none; }
.mega-card img { width: 140px; height: 64px; object-fit: contain; transition: transform .2s; }
.mega-card:hover img { transform: scale(1.06); }
.mega-card:hover span { color: var(--red); }
.mega-card span { font-size: 15px; }
@keyframes fade-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* drawer (< 1200px) */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .35); color: var(--ink); animation: fade .2s; }
.drawer[hidden] { display: none; }
.drawer-panel { position: absolute; top: 0; right: 0; width: min(360px, 88vw); height: 100%; overflow: auto; padding: 72px 24px 32px; background: var(--white); animation: slide-in .28s var(--ease); }
.drawer-close { position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; border: 0; background: none; font-size: 32px; line-height: 1; cursor: pointer; }
.drawer-link { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: space-between; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-size: 18px; text-decoration: none; text-align: left; cursor: pointer; }
.drawer-toggle span { font-size: 24px; font-weight: 300; transition: transform .2s; }
.drawer-toggle[aria-expanded="true"] span { transform: rotate(45deg); }
.drawer-sub[hidden] { display: none; }
.drawer-sub a { min-height: 48px; display: flex; align-items: center; padding: 0 14px; border-bottom: 1px solid #f1f1f1; color: var(--muted); font-size: 16px; text-decoration: none; }
.drawer-sub a:hover { color: var(--red); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }

@media (max-width: 1199px) {
  .hd { background: var(--white); color: var(--ink); box-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
  .hd-logo img { width: 105px; }
  .hd-bar { padding: 0 16px; justify-content: space-between; }
  .hd-nav { display: none; }
  .hd-burger { display: block; }
  main { padding-top: var(--hd-h); }
}
@media (max-width: 767px) { .hd-cta { display: none; } }

/* ---------- 4. Hero ---------- */
.hero { position: relative; background: #2a2e33; color: var(--white); }
/* the track reserves the slide height before home-v2.js renders the slides (no layout shift on slow loads) */
.hero-track { display: grid; touch-action: pan-y; min-height: max(420px, min(clamp(480px, 56.25vw, 1080px), 100vh)); }
.hero-slide { grid-area: 1 / 1; position: relative; height: clamp(480px, 56.25vw, 1080px); max-height: 100vh; min-height: 420px; overflow: hidden; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s linear .8s; }
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s ease; z-index: 1; }
.hero-media { position: absolute; inset: 0; background: linear-gradient(135deg, #3a3f45, #1d2024); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.hero-slide::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, 0) 55%); }
.hero-slide--end::after { background: linear-gradient(270deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, 0) 55%); }
.hero-copy { position: absolute; z-index: 2; top: 50%; left: 6%; width: min(560px, 40%); display: flex; flex-direction: column; align-items: flex-start; transform: translateY(-40%); }
.hero-slide--end .hero-copy { left: auto; right: 6%; align-items: flex-end; text-align: right; }
.hero-slide.is-active .hero-copy { animation: rise .8s var(--ease) .15s both; }
.hero-title { font-size: clamp(56px, 7vw, 118px); line-height: .9; font-weight: 900; font-style: italic; letter-spacing: -.035em; text-shadow: 0 2px 14px rgba(0, 0, 0, .25); }
.hero-title img { width: min(420px, 100%); height: auto; filter: drop-shadow(0 1px 7px rgba(0, 0, 0, .2)); }
.hero-tagline { margin-top: 16px; font-size: clamp(18px, 1.7vw, 32px); line-height: 1.2; font-weight: 300; text-shadow: 0 1px 10px rgba(0, 0, 0, .3); }
.hero-actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-slide--end .hero-actions { justify-content: flex-end; }
.hero .btn { color: var(--white); border-color: rgba(255, 255, 255, .95); background: rgba(0, 0, 0, .12); }
.hero .btn:hover { background: var(--white); color: var(--ink); }
.hero .btn-primary { background: var(--red); border-color: var(--red); }
.hero .btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }
.hero :focus-visible { outline-color: var(--white); }
.hero-controls { position: absolute; z-index: 3; left: 50%; bottom: 22px; display: flex; align-items: center; gap: 4px; transform: translateX(-50%); }
.hero-controls[hidden] { display: none; }
.hero-arrow, .hero-pause { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .25); color: var(--white); cursor: pointer; }
.hero-arrow:hover, .hero-pause:hover { background: rgba(0, 0, 0, .5); }
.hero-arrow svg, .hero-pause svg { width: 22px; height: 22px; fill: currentColor; }
.hero-pause .i-play, .hero-pause[aria-pressed="true"] .i-pause { display: none; }
.hero-pause[aria-pressed="true"] .i-play { display: block; }
.hero-dots { display: flex; }
.hero-dot { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; }
.hero-dot::before { content: ""; width: 28px; height: 3px; background: rgba(255, 255, 255, .5); transition: background-color .2s, width .2s; }
.hero-dot[aria-current="true"]::before { width: 36px; background: var(--white); }
.hero-noscript { padding: 120px 24px 60px; text-align: center; }
@keyframes rise { from { opacity: 0; transform: translateY(calc(-40% + 18px)); } to { opacity: 1; transform: translateY(-40%); } }

@media (max-width: 1199px) {
  /* header sits above the hero here: keep the whole overlay hero (and its controls) inside the first screen */
  .hero-slide { min-height: 320px; max-height: calc(100vh - var(--hd-h)); max-height: calc(100svh - var(--hd-h)); }
  .hero-track { min-height: max(320px, min(clamp(480px, 56.25vw, 1080px), calc(100vh - var(--hd-h)))); min-height: max(320px, min(clamp(480px, 56.25vw, 1080px), calc(100svh - var(--hd-h)))); }
}
@media (max-width: 999px) {
  .hero-copy { width: 46%; }
  .hero-actions { gap: 8px; margin-top: 18px; }
  .hero .btn { min-height: 40px; padding: 0 14px; font-size: 13px; }
}
@media (min-width: 768px) and (max-height: 560px) {
  /* short landscape screens (phones turned sideways, small laptop windows): compact copy keeps clear of the controls */
  .hero-copy { top: 42%; }
  .hero-title { font-size: 44px; }
  .hero-title img { width: min(220px, 100%); }
  .hero-tagline { margin-top: 6px; font-size: 16px; }
  .hero-actions { margin-top: 12px; }
}
@media (max-width: 767px) {
  .hero-slide { height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column; background: #151515; }
  .hero-track { min-height: calc(62.5vw + 232px); }   /* 16:10 image + copy panel */
  .hero-slide::after { display: none; }
  .hero-media { position: relative; inset: auto; aspect-ratio: 16 / 10; }
  .hero-copy, .hero-slide--end .hero-copy { position: static; width: auto; padding: 22px 16px 84px; align-items: flex-start; text-align: left; transform: none; }
  .hero-slide.is-active .hero-copy { animation: none; }
  .hero-slide--end .hero-actions { justify-content: flex-start; }
  .hero-title { font-size: 48px; }
  .hero-title img { width: min(220px, 60%); }
  .hero-tagline { margin-top: 8px; font-size: 16px; }
  .hero-actions { margin-top: 16px; }
  .hero-controls { bottom: 14px; }
}

/* ---------- 5. Explore your BAIC ---------- */
.explore { background: linear-gradient(180deg, var(--white), var(--bg-alt)); }
.ex-cats { min-height: 52px; margin-top: 28px; display: flex; gap: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ex-cat { min-height: 48px; padding: 0 18px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font-size: 17px; white-space: nowrap; cursor: pointer; }
.ex-cat:hover { color: var(--ink); }
.ex-cat[aria-selected="true"] { border-bottom-color: var(--red); color: var(--ink); font-weight: 700; }
.ex-panel { margin-top: 32px; display: grid; grid-template-columns: 230px minmax(0, 1fr); grid-template-areas: "models stage" "models info"; gap: 8px 48px; }
.ex-models { grid-area: models; display: flex; flex-direction: column; gap: 6px; }
.ex-model { width: 100%; min-height: 72px; display: flex; align-items: center; gap: 14px; padding: 8px 12px; border: 0; border-left: 3px solid transparent; background: none; color: var(--muted); font-size: 18px; text-align: left; cursor: pointer; transition: background-color .2s, color .2s; }
.ex-model img { width: 104px; height: 46px; object-fit: contain; }
.ex-model:hover { background: rgba(0, 0, 0, .03); color: var(--ink); }
.ex-model[aria-pressed="true"] { border-left-color: var(--red); background: var(--white); color: var(--ink); font-weight: 700; box-shadow: 0 6px 18px rgba(0, 0, 0, .05); }
.ex-stage { grid-area: stage; min-width: 0; }
.ex-view { position: relative; aspect-ratio: 12 / 5; max-height: 56vh; margin-inline: auto; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: pan-y; cursor: pointer; }
.ex-static, .ex-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ex-static { object-fit: contain; }
.ex-static:not([src]) { visibility: hidden; }
.ex-canvas { visibility: hidden; }
.ex-view.is-drawn .ex-canvas { visibility: visible; }
.ex-view.is-drawn .ex-static { visibility: hidden; }
.ex-view.is-360 { cursor: grab; }
.ex-view.is-dragging { cursor: grabbing; }
.ex-cursor, .ex-badge { position: absolute; pointer-events: none; background: url(/assets/home-360/360-icon.png) center / contain no-repeat; display: none; }
.ex-cursor { top: 0; left: 0; width: 70px; height: 70px; opacity: 0; transition: opacity .15s; }
.ex-badge { top: 0; left: 6%; width: 32px; height: 32px; }
.ex-spinner { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 3px solid rgba(0, 0, 0, .12); border-top-color: var(--red); border-radius: 50%; display: none; animation: spin .8s linear infinite; }
.ex-view.is-loading .ex-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 1200px) and (hover: hover) {
  .ex-view.is-360 { cursor: none; }
  .ex-view.is-360 .ex-cursor { display: block; }
  .ex-view.is-360.is-hover .ex-cursor { opacity: 1; }
}
@media (max-width: 1199px), (hover: none) { .ex-view.is-360 .ex-badge { display: block; } }
.ex-hint { min-height: 1.6em; margin-top: 6px; color: var(--muted); font-size: 14px; text-align: center; }
.ex-info { grid-area: info; min-height: 92px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.ex-name { color: var(--ink); font-size: clamp(28px, 3vw, 40px); line-height: 1; font-weight: 900; font-style: italic; letter-spacing: -.02em; }
.ex-colours { display: flex; flex-direction: column; gap: 8px; }
.ex-colour-label { color: var(--muted); font-size: 14px; }
.ex-swatches { display: flex; flex-wrap: wrap; gap: 4px; }
.ex-swatch { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.ex-swatch::before { content: ""; width: 28px; height: 28px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); transition: transform .15s; }
.ex-swatch:hover::before { transform: scale(1.1); }
.ex-swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--ink); }
.ex-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }

@media (max-width: 999px) {
  .ex-panel { grid-template-columns: minmax(0, 1fr); grid-template-areas: "models" "stage" "info"; }
  .ex-models { flex-direction: row; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; }
  .ex-model { flex: 0 0 auto; width: auto; min-height: 64px; flex-direction: column; justify-content: center; gap: 4px; border-left: 0; border-bottom: 3px solid transparent; font-size: 15px; scroll-snap-align: start; }
  .ex-model img { width: 96px; height: 40px; }
  .ex-model[aria-pressed="true"] { border-bottom-color: var(--red); }
}
@media (max-width: 767px) {
  .ex-cats { margin-top: 20px; }
  .ex-cat { padding: 0 14px; font-size: 16px; }
  .ex-panel { margin-top: 18px; }
  .ex-info { flex-direction: column; align-items: flex-start; }
  .ex-actions .btn { flex: 1 1 auto; }
}

/* ---------- 6. About ---------- */
.about-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px 64px; align-items: start; }
.about-lede { color: var(--muted); font-size: 17px; max-width: 640px; }
.about-lede a { color: var(--ink); font-weight: 700; }
.about-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.about-card { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #2a2e33; color: var(--white); text-decoration: none; }
.about-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.about-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .6)); pointer-events: none; }
.about-card--link:hover img { transform: scale(1.04); }
.about-cap { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 22px; display: flex; flex-direction: column; gap: 4px; font-size: clamp(20px, 1.8vw, 26px); font-weight: 700; text-transform: uppercase; line-height: 1.15; }
.about-sub { font-size: 14px; font-weight: 400; letter-spacing: .08em; }
.about-more { margin-top: 10px; font-size: 14px; font-weight: 400; text-transform: none; text-decoration: underline; text-underline-offset: 4px; }
.about-card--link:focus-visible { outline-offset: 4px; }
.about-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.about-intro .btn { color: var(--ink); }
.about-intro .btn:hover { border-color: var(--ink); background: var(--ink); color: var(--white); }
@media (max-width: 999px) { .about-head { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 28px; }
  .about-card { aspect-ratio: 16 / 10; }
}

/* ---------- 7. BAIC IN IRAQ (network) ---------- */
.net { background: var(--bg-alt); }
.net-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; }
.net-sub { margin-top: 8px; color: var(--muted); font-size: clamp(17px, 1.5vw, 21px); }
.net-stats { display: flex; gap: 36px; }
.net-stats div { display: flex; flex-direction: column-reverse; }
.net-stats dt { color: var(--muted); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.net-stats dd { color: var(--ink); font-size: 34px; font-weight: 700; line-height: 1.1; }
.net-grid { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.net-map { position: relative; padding: 24px; background: var(--white); }
.net-svg { width: 100%; max-height: 560px; height: auto; margin: 0 auto; }
.net-iraq { fill: #eceef0; stroke: #a9adb3; stroke-width: 2; stroke-linejoin: round; }
.net-marker { cursor: pointer; }
.net-marker circle { fill: var(--red); stroke: var(--white); stroke-width: 3; transition: r .15s; }
.net-marker:hover circle, .net-marker[aria-pressed="true"] circle { r: 12px; }
.net-marker[aria-pressed="true"] circle { fill: var(--ink); }
.net-leader { stroke: var(--ink); stroke-width: 1.5; }
.net-marker:focus-visible { outline: none; }
.net-marker:focus-visible circle { stroke: var(--ink); stroke-width: 4; }
.net-map-note { margin-top: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.net-card { padding: 26px 28px; background: var(--white); border-left: 4px solid var(--red); }
.net-card-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.net-card h3 { margin-top: 12px; color: var(--ink); font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; }
.net-branch { margin-top: 4px; color: var(--text); font-size: 17px; }
.net-address { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink); font-size: 18px; line-height: 1.7; }
.net-card-actions { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.net-nomap { color: var(--muted); font-size: 14px; }
.net-list-title { margin-top: 28px; color: var(--ink); font-size: 16px; letter-spacing: .08em; text-transform: uppercase; }
.net-list { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.net-item { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid transparent; background: var(--white); text-align: left; cursor: pointer; transition: border-color .15s; }
.net-item:hover { border-color: #c9c9c9; }
.net-item[aria-pressed="true"] { border-color: var(--red); }
.net-no { color: var(--red); font-size: 13px; font-weight: 700; }
.net-item strong { display: block; color: var(--ink); font-size: 15px; line-height: 1.25; }
.net-item small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; }
@media (max-width: 999px) {
  /* tablet: map | selected card, branch list full width below */
  .net-side { display: contents; }
  .net-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .net-map { grid-column: 1; grid-row: 1; }
  .net-card { grid-column: 2; grid-row: 1; }
  .net-list-title, .net-list { grid-column: 1 / -1; margin-top: 0; }
  .net-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .net-stats { gap: 24px; }
  .net-stats dd { font-size: 26px; }
  .net-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 24px; }
  .net-card { grid-column: 1; grid-row: 1; padding: 20px; }
  .net-list-title { grid-row: 2; margin-top: 8px; }
  .net-list { grid-row: 3; grid-template-columns: minmax(0, 1fr); }
  .net-map { grid-column: 1; grid-row: 4; padding: 14px; }
  .net-svg { max-width: 260px; }
  .net-marker circle { r: 12px; }                     /* map units: keeps markers visible on the half-scale mobile map */
  .net-marker:hover circle, .net-marker[aria-pressed="true"] circle { r: 15px; }
}

/* ---------- 8. News ---------- */
.news-note { margin-top: 10px; color: var(--muted); font-size: 15px; }
.news-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.news-card a { height: 100%; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.news-card img { width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; background: var(--bg-alt); transition: opacity .2s; }
.news-card a:hover img { opacity: .88; }
.news-card h3 { margin-top: 14px; font-size: 17px; line-height: 1.4; font-weight: 700; }
.news-card a:hover h3 { color: var(--red); }
.news-ext { margin-top: auto; padding-top: 10px; color: var(--muted); font-size: 13px; }
@media (max-width: 999px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .news-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 22px; }
  .news-card a { display: grid; grid-template-columns: 120px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 14px; }
  .news-card img { grid-row: 1 / 3; aspect-ratio: 1; }
  .news-card h3 { margin-top: 0; font-size: 15px; }
  .news-ext { padding-top: 6px; }
}

/* ---------- 9. Footer ---------- */
.ft { position: relative; overflow: hidden; background: var(--dark); color: var(--white); }
.ft::before { content: "BAIC"; position: absolute; right: -2vw; bottom: -4vw; font-size: clamp(130px, 19vw, 360px); line-height: .75; font-weight: 700; letter-spacing: -.06em; color: rgba(255, 255, 255, .025); pointer-events: none; }
.ft :focus-visible { outline-color: var(--white); }
.ft-shell { position: relative; width: min(1540px, 100% - 2 * var(--gutter)); margin: 0 auto; }
.ft-top { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px 70px; align-items: center; padding: 48px 0 42px; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.ft-logo { display: inline-block; }
.ft-logo img { width: 132px; height: auto; filter: grayscale(1) invert(1) brightness(1.6); }
.ft-copy { max-width: 520px; margin-top: 24px; color: #b0b0b0; font-size: 14px; line-height: 1.75; }
.ft-contact { justify-self: end; width: min(440px, 100%); display: flex; flex-direction: column; align-items: flex-start; }
.ft-label { color: #ff5a4a; font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.ft-phone { margin-top: 12px; color: var(--white); font-size: clamp(32px, 3vw, 50px); line-height: 1; letter-spacing: -.035em; text-decoration: none; }
.ft-mail { margin-top: 12px; color: #c4c4c4; font-size: 16px; text-decoration: none; }
.ft-phone:hover, .ft-mail:hover { color: #ff5a4a; }
.ft-main { display: grid; grid-template-columns: repeat(3, minmax(140px, .75fr)) minmax(280px, 1.25fr); gap: 40px; padding: 52px 0 60px; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.ft-col-title { font-size: 14px; }
.ft-col-title button { width: 100%; padding: 0; border: 0; background: none; color: var(--white); font-weight: 700; text-align: left; cursor: default; display: flex; justify-content: space-between; align-items: center; }
.ft-col-title button span { display: none; }
.ft-links { margin-top: 20px; display: flex; flex-direction: column; gap: 4px; }
.ft-links a { display: inline-block; min-width: 24px; padding: 6px 0; color: #b0b0b0; font-size: 14px; text-decoration: none; transition: color .15s; }
.ft-links a:hover { color: var(--white); }
.ft-network { padding-left: 44px; border-left: 1px solid rgba(255, 255, 255, .16); }
.ft-network-title { max-width: 360px; margin: 16px 0 26px; font-size: clamp(25px, 2.2vw, 36px); line-height: 1.15; letter-spacing: -.02em; }
.ft-cta { display: inline-flex; align-items: center; gap: 24px; min-height: 48px; padding: 0 22px; border: 1px solid rgba(255, 255, 255, .7); color: var(--white); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; transition: background-color .2s, border-color .2s; }
.ft-cta:hover { background: var(--red); border-color: var(--red); }
.ft-bottom { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #9a9a9a; font-size: 13px; }
.ft-top-link { min-height: 44px; display: inline-flex; align-items: center; color: #c4c4c4; text-decoration: none; }
.ft-top-link:hover { color: var(--white); }
@media (max-width: 999px) {
  .ft-top { grid-template-columns: 1fr 1fr; }
  .ft-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ft-network { grid-column: 1 / -1; padding: 32px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .16); }
}
@media (max-width: 767px) {
  .ft-top { grid-template-columns: minmax(0, 1fr); padding: 44px 0 34px; }
  .ft-contact { justify-self: start; }
  .ft-main { display: block; padding: 0 0 36px; }
  .ft-col { border-bottom: 1px solid rgba(255, 255, 255, .13); }
  .ft-col-title button { min-height: 56px; cursor: pointer; }
  .ft-col-title button span { display: block; font-size: 22px; font-weight: 300; transition: transform .2s; }
  .ft-col-title button[aria-expanded="true"] span { transform: rotate(45deg); }
  .ft-links { margin-top: 0; padding-bottom: 14px; }
  .ft-links[hidden] { display: none; }
  .ft-links a { padding: 10px 0; }
  .ft-network { margin-top: 32px; }
  .ft-bottom { flex-direction: column; align-items: flex-start; justify-content: center; padding: 22px 0; gap: 6px; }
}

/* ---------- 10. Test Drive success toast ---------- */
.toast { position: fixed; top: 18px; left: 50%; z-index: 70; width: min(620px, 100% - 28px); transform: translateX(-50%); animation: toast-in .3s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast[hidden] { display: none; }
.toast-inner { display: flex; align-items: center; gap: 18px; padding: 18px 20px; background: var(--white); border-left: 4px solid var(--red); box-shadow: 0 10px 32px rgba(0, 0, 0, .18); }
.toast-copy { flex: 1; min-width: 0; color: #555; font-size: 14px; line-height: 1.5; }
.toast-copy strong { display: block; color: #111; font-size: 18px; }
.toast-close { width: 44px; height: 44px; flex: 0 0 auto; border: 0; background: none; font-size: 26px; cursor: pointer; }

/* ---------- 11. Floating social sidebar (BAIC Iraq accounts, call, back to top) ----------
   >= 1200px: column on the right edge, inside the page gutter. < 1200px (home-v2.js adds .is-compact): one 48px button
   in the bottom-right corner that opens the links upwards. Without JS it shows on desktop only (the footer has the
   same links). .is-away hides it while the footer is on screen. */
.social { position: fixed; z-index: 40; right: 0; top: 50%; transform: translateY(-50%); transition: opacity .2s, visibility .2s; }
.social.is-away { opacity: 0; visibility: hidden; }
.social-list { display: flex; flex-direction: column; gap: 2px; }
.social-link, .social-toggle { width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: rgba(23, 23, 23, .88); color: var(--white); text-decoration: none; cursor: pointer; transition: background-color .2s; }
.social-link:hover, .social-toggle:hover { background: var(--red); }
.social-link svg, .social-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.social-link .i-line { fill: none; stroke: currentColor; stroke-width: 2; }
.social-toggle[hidden] { display: none; }
.social-toggle svg { transition: transform .2s; }
.social-toggle[aria-expanded="true"] svg { transform: rotate(45deg); }
.social :focus-visible { outline-offset: -4px; outline-color: var(--white); }
@media (max-width: 1199px) {
  .social:not(.is-compact) { display: none; }
  .social.is-compact { top: auto; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: none; display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; }
  .social.is-compact .social-toggle { border-radius: 50%; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); }
  .social.is-compact .social-list { gap: 8px; }
  .social.is-compact .social-link { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
  .social.is-compact:not(.is-open) .social-list { display: none; }
}

/* ---------- 12. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .ex-view.is-loading .ex-spinner { border-top-color: rgba(0, 0, 0, .35); }
}
