/* =========================================================
   BusAlmaty — base styles (pure CSS, no frameworks)
   ========================================================= */

:root {
  --blue: #1a5cff;
  --blue-600: #0f47d6;
  --blue-50: #e6eeff;
  --navy: #0b1b3f;
  --text: #1b2436;
  --muted: #5b6578;
  --bg: #ffffff;
  --bg-soft: #f3f6fc;
  --border: #e3e8f2;
  --wa: #0f8043;      /* WhatsApp green, darkened for 4.5:1 contrast with white text */
  --wa-600: #0c6c38;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(11, 27, 63, .08);
  --shadow-lg: 0 12px 36px rgba(11, 27, 63, .14);
  --header-h: 68px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Manrope has no Kazakh letters: KZ version uses Onest (similar style, full Kazakh support) */
html:lang(kk) { --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 800px; }

.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }
.section__title { font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.2; color: var(--navy); margin-bottom: 10px; }
.section__sub { color: var(--muted); font-size: 1.05rem; margin-bottom: 36px; max-width: 640px; }

.grid { display: grid; gap: 24px; }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section__head .section__title { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; line-height: 1.2; transition: background .2s, transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn--lg { padding: 15px 26px; font-size: 1.05rem; }
.btn--xl { padding: 18px 34px; font-size: 1.15rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-600); }
.btn--ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--wa { background: var(--wa); color: #fff; box-shadow: 0 6px 20px rgba(15, 128, 67, .3); }
.btn--wa:hover { background: var(--wa-600); }
.icon { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }

.chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--blue-50); color: var(--blue-600); font-size: .85rem; font-weight: 600;
}

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.logo {
  /* Wordmark is Latin-only: always Manrope, also in the KZ version (which switches body text to Onest) */
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; line-height: 1;
  color: var(--navy); white-space: nowrap;
}
.logo__tld { color: var(--blue); }

.nav { display: flex; gap: 24px; font-weight: 500; }
.nav a { color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--blue); }

.header__actions { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; background: var(--bg-soft); border-radius: 999px; padding: 3px; }
.lang__btn {
  border: 0; background: transparent; padding: 6px 10px; border-radius: 999px;
  font-size: .85rem; font-weight: 600; color: var(--muted);
}
.lang__btn.is-active { background: var(--blue); color: #fff; }

.burger { display: none; width: 40px; height: 40px; border: 0; background: transparent; padding: 8px; }
.burger span { display: block; height: 2px; background: var(--navy); border-radius: 2px; margin: 5px 0; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .burger { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 16px; border-top: 1px solid var(--border); }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.14), transparent 40%),
    linear-gradient(135deg, var(--navy) 0%, var(--blue-600) 55%, var(--blue) 100%);
  color: #fff; padding: 96px 0 88px;
  position: relative; overflow: hidden; isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background: var(--navy) url("../images/hero-poster.webp") center / cover;
}
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(11, 27, 63, .88) 0%, rgba(11, 27, 63, .62) 50%, rgba(15, 71, 214, .45) 100%);
}
.hero__title, .hero__text { text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.hero__inner { position: relative; z-index: 2; max-width: 1200px; }
.hero__title { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.08; font-weight: 800; letter-spacing: -.025em; max-width: 820px; margin-bottom: 18px; }
.hero__text { font-size: clamp(1.05rem, 2vw, 1.25rem); opacity: .9; max-width: 640px; margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .95rem; opacity: .9; }
.hero__badges li::before { content: "✓"; margin-right: 8px; font-weight: 700; }

/* ---------- Fleet cards ---------- */
.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__img { width: 100%; height: auto; aspect-ratio: 16 / 10.5; object-fit: cover; background: var(--blue-50); }
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 20px; flex: 1; }
.card__body .chip { align-self: flex-start; }
.card__title { font-size: 1.25rem; color: var(--navy); }
.card__text { color: var(--muted); }
/* desktop: always 4 cards in one row (auto-fill gave 3 + 1 lonely card at ~1024px) */
@media (min-width: 960px) { .grid--4 { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
/* tablet / narrow window: 2 cards per row, lower photos so cards are not oversized */
@media (min-width: 641px) and (max-width: 959px) { .card__img { aspect-ratio: 16 / 8; } }
@media (min-width: 960px) and (max-width: 1150px) {
  .card__body { padding: 16px; }
  .card__title { font-size: 1.1rem; }
}
.price__note { margin-top: auto; padding-top: 8px; margin-bottom: 12px; font-size: .9rem; font-weight: 600; color: var(--navy); }

/* ---------- Audience tiles ---------- */
.aud-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.aud { padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.aud__icon {
  width: 44px; height: 44px; padding: 10px; margin-bottom: 14px; border-radius: 12px;
  background: var(--blue); fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.aud__title { font-size: 1.05rem; line-height: 1.3; color: var(--navy); margin-bottom: 4px; }
.aud__text { font-size: .92rem; color: var(--muted); }
@media (max-width: 1024px) { .aud-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .aud-grid { gap: 10px; }
  .aud { padding: 14px; border-radius: 14px; }
  .aud__icon { width: 34px; height: 34px; padding: 7px; margin-bottom: 10px; border-radius: 10px; }
  .aud__title { font-size: .92rem; }
  .aud__text { font-size: .8rem; line-height: 1.4; }
}

/* ---------- Slider (reviews) ---------- */
.slider__track {
  --per-view: 3; --gap: 24px;
  display: grid; grid-auto-flow: column; gap: var(--gap);
  grid-auto-columns: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  /* no CSS smooth scrolling and no horizontal padding: otherwise the browser snaps the track on load,
     which counts as a scroll and stops LCP measurement (PageSpeed: NO_LCP) */
  overflow-x: auto; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: none; padding: 4px 0 12px;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__track > * { scroll-snap-align: start; }
.slider__track:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: var(--radius); }
.slider__nav { display: flex; gap: 8px; flex-shrink: 0; }
.slider__btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: var(--navy); transition: background .2s, color .2s, opacity .2s;
}
.slider__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.slider__btn:hover:not(:disabled) { background: var(--blue); border-color: var(--blue); color: #fff; }
.slider__btn:disabled { opacity: .4; cursor: default; }
@media (max-width: 900px) { .slider__track { --per-view: 2; } }
@media (max-width: 640px) {
  .slider__track { --gap: 12px; grid-auto-columns: 85%; margin: 0 -16px; padding: 4px 16px 12px; scroll-padding: 0 16px; }
  .slider__btn { width: 40px; height: 40px; }
}

/* ---------- Reviews ---------- */
.review {
  margin: 0; padding: 24px; background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.review blockquote { margin: 0 0 16px; font-style: italic; color: var(--text); }
.review figcaption { font-weight: 600; color: var(--navy); }
.review figcaption::before { content: "★★★★★"; display: block; color: #f5b301; margin-bottom: 4px; letter-spacing: 2px; }

/* ---------- FAQ ---------- */
.faq { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 600; font-size: 1.08rem; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; color: var(--blue); transition: transform .2s;
}
.faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq p { padding: 0 0 20px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact {
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, .12), transparent 45%),
    linear-gradient(135deg, var(--navy) 0%, var(--blue-600) 100%);
  color: #fff; text-align: center;
}
.contact__inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.contact__title { font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; opacity: .7; }
.contact__phone {
  font-size: clamp(2.1rem, 8.5vw, 4.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em;
  white-space: nowrap; transition: opacity .2s;
}
.contact__phone:hover { opacity: .85; }
.contact__text { font-size: 1.05rem; opacity: .8; max-width: 460px; }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--blue-50); }
.btn--ig {
  background: linear-gradient(45deg, #f58529 0%, #dd2a7b 50%, #8134af 100%); color: #fff;
  box-shadow: 0 6px 20px rgba(221, 42, 123, .35); background-origin: border-box;
}
.btn--ig:hover { filter: brightness(1.06); }
.icon--line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact__meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px;
  margin-top: 18px; font-size: .9rem; opacity: .8;
}
.contact__meta a:hover { text-decoration: underline; }
.contact__avatar { width: 44px; height: 44px; border: 2px solid rgba(255, 255, 255, .6); border-radius: 50%; object-fit: cover; }
@media (max-width: 480px) {
  .contact__actions { width: 100%; flex-direction: column; }
  .contact__actions .btn { width: 100%; padding: 16px 20px; font-size: 1.05rem; white-space: nowrap; }
  .contact__sep { display: none; }
  .contact__meta a[href^="mailto"] { flex-basis: 100%; }
}

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 24px 0; font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- Contact bar (fixed bottom) ---------- */
:root { --bar-h: 72px; }
body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }
.contact-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border); box-shadow: 0 -8px 28px rgba(11, 27, 63, .08);
}
.contact-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.contact-bar__text { color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-bar__text b { color: var(--navy); }
.contact-bar__actions { display: flex; gap: 10px; flex-shrink: 0; }
.contact-bar__call { display: none; }
.btn--line { border-color: var(--border); color: var(--navy); background: #fff; }
.btn--line:hover { border-color: var(--blue); color: var(--blue); }
@media (max-width: 768px) {
  :root { --bar-h: 68px; }
  .contact-bar { padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .contact-bar__text { display: none; }
  .contact-bar__actions { flex: 1; }
  .contact-bar__actions .btn { flex: 1; padding: 13px 12px; }
  .contact-bar__num { display: none; }
  .contact-bar__call { display: inline; }
}

/* Desktop: contacts live in a slimmer header, no fixed bottom bar covering content */
.header__phone, .header__cta { display: none; }
@media (min-width: 901px) {
  :root { --header-h: 60px; --bar-h: 0px; }
  .contact-bar { display: none; }
  .header__cta { display: inline-flex; padding: 9px 18px; font-size: .95rem; box-shadow: none; }
  .header__actions { gap: 14px; }
}
@media (min-width: 1100px) {
  .header__phone {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    font-weight: 700; color: var(--navy); transition: color .2s;
  }
  .header__phone .icon { width: 18px; height: 18px; color: var(--blue); }
  .header__phone:hover { color: var(--blue); }
}

@media (max-width: 480px) {
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .hero__cta .btn { width: 100%; }
  .lang__btn { padding: 6px 8px; }
  .logo { font-size: 1.25rem; }
}

/* ---------- Advantages (compact) ---------- */
.adv-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.adv { display: flex; gap: 12px; align-items: flex-start; }
.adv__icon {
  display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px;
  border-radius: 9px; background: var(--blue); color: #fff; font-size: .85rem; font-weight: 800;
}
.adv__title { font-size: 1rem; line-height: 1.3; color: var(--navy); margin-bottom: 2px; }
.adv__text { font-size: .9rem; line-height: 1.45; color: var(--muted); }
/* tablet / small laptop: 3 + 2 cards filling full rows (6-column grid), no orphan gaps */
@media (min-width: 641px) and (max-width: 959px) {
  .adv-list { grid-template-columns: repeat(6, 1fr); }
  .adv-list > .adv { grid-column: span 2; }
  .adv-list > .adv:nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 640px) {
  .adv-list { grid-template-columns: 1fr; gap: 0; }
  .adv { padding: 12px 0; border-top: 1px solid var(--border); }
  .adv:first-child { border-top: 0; padding-top: 0; }
  .adv__icon { width: 26px; height: 26px; border-radius: 7px; font-size: .75rem; }
}

/* ---------- Review tag ---------- */
.review { display: flex; flex-direction: column; }
.review blockquote { flex: 1; }
.review__tag { display: block; font-weight: 400; font-size: .88rem; color: var(--muted); }

/* ---------- Services (clickable cards) ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc {
  display: flex; align-items: center; gap: 16px; height: 100%; padding: 20px;
  border-radius: var(--radius); background: #fff; border: 1px solid var(--border);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.svc:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); }
.svc__icon {
  flex-shrink: 0; width: 48px; height: 48px; padding: 12px; border-radius: 14px;
  background: var(--blue-50); fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: background .2s, stroke .2s;
}
.svc:hover .svc__icon { background: var(--blue); stroke: #fff; }
.svc__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.svc__title { font-weight: 700; line-height: 1.3; color: var(--navy); }
.svc__text { font-size: .9rem; line-height: 1.45; color: var(--muted); }
.svc__arrow {
  flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s, transform .2s;
}
.svc:hover .svc__arrow { stroke: var(--blue); transform: translate(2px, -2px); }
@media (max-width: 1024px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .svc-grid { grid-template-columns: 1fr; gap: 8px; }
  .svc { padding: 12px 14px; gap: 12px; border-radius: 14px; }
  .svc__icon { width: 40px; height: 40px; padding: 10px; border-radius: 11px; }
  .svc__title { font-size: .95rem; }
  .svc__text { font-size: .8rem; line-height: 1.4; }
}

/* ---------- Background videos ---------- */
.hero__video, .section__video { opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.hero__video.is-playing, .section__video.is-playing { opacity: 1; }
.hero__video::-webkit-media-controls,
.section__video::-webkit-media-controls,
.hero__video::-webkit-media-controls-start-playback-button,
.section__video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }

/* ---------- Section with video background (advantages) ---------- */
.section--video { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--navy); }
.section__bg {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background: var(--navy) url("../images/hero-poster.webp") center / cover;
}
.section__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.section__bg::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(11, 27, 63, .9) 0%, rgba(11, 27, 63, .78) 50%, rgba(11, 27, 63, .9) 100%);
}
.section--video > .container { position: relative; z-index: 2; }
.section--video .section__title { color: #fff; }
.section--video .section__sub { color: rgba(255, 255, 255, .82); }

/* Advantages on dark video: glass cards */
.adv-list--glass .adv {
  flex-direction: column; gap: 14px; padding: 22px 20px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.adv-list--glass .adv__title { color: #fff; }
.adv-list--glass .adv__text { color: rgba(255, 255, 255, .8); }
.adv-list--glass .adv__title, .adv-list--glass .adv__text { text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
@media (max-width: 640px) {
  .adv-list--glass .adv {
    flex-direction: row; gap: 12px; padding: 14px 0; border-radius: 0;
    background: none; border: 0; border-top: 1px solid rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .adv-list--glass .adv:first-child { border-top: 0; padding-top: 0; }
}
