/* DriveGas – slider-ul din prima pagină și blocurile DRIVE + / DRIVE + VIP (prima pagină și /drive-plus).
   Culorile sunt din tokens.css (drive-*, vip-*, gold): cardurile închise arată la fel în ambele teme, ca în macheta fondatorului;
   cardurile deschise (reducerile, harta, „De ce Drive Gas?") urmează tema. */

@layer pages {
  /* ================= slider ================= */
  .home-top { padding-top: var(--space-2); }
  .home-stories { padding-bottom: var(--space-3); }
  .hero-slider { display: grid; gap: var(--space-3); }

  .hero-slider__bar { display: grid; gap: var(--space-2); }
  .hero-slider__tabs { position: relative; display: flex; gap: var(--space-2); list-style: none; overflow-x: auto; scrollbar-width: none; }
  .hero-slider__tabs::-webkit-scrollbar { display: none; }
  .hs-tab {
    position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 1 1 0; min-height: 46px; padding: 0 18px 4px;
    border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text-2); font-weight: 700; white-space: nowrap; overflow: hidden;
    transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
  }
  .hero-slider__tabs li { display: flex; flex: 1 1 0; }
  .hs-tab:hover { background: var(--surface-3); }
  .hs-tab[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
  .hs-tab__bar { position: absolute; left: 18px; right: 18px; bottom: 6px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; opacity: 0; transition: opacity var(--dur-fast); }
  .hs-tab[aria-current="true"] .hs-tab__bar { opacity: 1; }
  .hs-tab__bar i { display: block; width: 100%; height: 100%; background: var(--primary); transform: scaleX(0); transform-origin: left; }
  .hs-tab.is-active .hs-tab__bar i { animation: hs-progress var(--slide-ms, 12s) linear forwards; animation-play-state: paused; }
  .hero-slider.is-running .hs-tab.is-active .hs-tab__bar i { animation-play-state: running; }
  @keyframes hs-progress { to { transform: scaleX(1); } }

  .hero-slider__controls { display: flex; gap: var(--space-2); }
  .hs-btn {
    display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 16px 0 12px;
    border-radius: var(--radius-pill); background: var(--surface); color: var(--text); font-weight: 700; touch-action: manipulation;
    box-shadow: inset 0 0 0 1px var(--line); transition: background var(--dur-fast), transform var(--dur-fast) var(--ease);
  }
  .hs-btn:last-child { padding: 0 12px 0 16px; }
  .hs-btn:hover { background: var(--surface-2); }
  .hs-btn:active { transform: scale(.96); }
  .hs-btn .icon { width: 20px; height: 20px; }
  .hs-btn[aria-pressed="true"] { background: var(--primary-container); color: var(--on-primary-container); box-shadow: none; }
  .hero-slider__controls > .hs-btn { min-width: 0; }
  /* pe telefoane foarte înguste (320 px) rămân doar cuvintele „Înapoi", „Pauză", „Înainte" */
  @media (max-width: 359.98px) {
    .hs-btn, .hs-btn:last-child { padding: 0 8px; }
    .hs-btn .icon { display: none; }
  }
  @media (min-width: 768px) {
    .hero-slider__bar { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .hero-slider__tabs { max-width: 460px; }
    .hs-btn { flex: none; }
  }

  .hero-slider__track {
    /* containerul derulant taie tot ce iese din el, pe toate laturile: loc pentru umbra cardurilor (de exemplu „Cum crește reducerea ta"),
       compensat cu marginea negativă. Distanța dintre slide-uri (gap) este de două ori spațiul lateral, ca slide-ul vecin să nu se vadă pe margine. */
    --shadow-room: min(24px, var(--gutter));  /* nu iese din pagină pe telefon */
    position: relative; display: flex; gap: calc(2 * var(--shadow-room)); overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none; scroll-padding-inline: var(--shadow-room);
    padding: 6px var(--shadow-room) 32px; margin: -6px calc(-1 * var(--shadow-room)) -32px;
  }
  .hero-slider__track::-webkit-scrollbar { display: none; }
  .slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
  /* fără JavaScript nu există butoane: slide-urile se așază unul sub altul */
  html:not(.js) .hero-slider__bar { display: none; }
  html:not(.js) .hero-slider__track { flex-direction: column; overflow: visible; gap: var(--space-6); }
  html:not(.js) .slide { flex: none; }

  /* ================= butoane pe fundal închis ================= */
  .btn--drive { --btn-bg: var(--drive-accent); --btn-fg: var(--drive-a); box-shadow: 0 10px 24px -12px rgb(0 0 0 / .6); }
  .btn--drive:hover { filter: brightness(1.06); }
  .btn--drive-outline { --btn-bg: transparent; --btn-fg: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .75); }
  .btn--drive-outline:hover { --btn-bg: rgb(255 255 255 / .12); filter: none; }

  /* ================= DRIVE +: cardul închis ================= */
  .drive-block { display: grid; }
  .drive-block .plus { color: var(--brand-green); }
  .drive-hero {
    position: relative; isolation: isolate; overflow: hidden; display: grid; padding: 26px 22px 24px; border-radius: var(--radius-xl); color: var(--on-hero);
    background:
      radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--drive-c) 70%, transparent), transparent 65%),
      linear-gradient(165deg, var(--drive-a) 0%, var(--drive-b) 60%, var(--drive-a) 100%);
    box-shadow: var(--shadow-2);
  }
  .drive-hero__copy { position: relative; z-index: 1; display: grid; justify-items: start; }
  .drive-eyebrow { color: var(--drive-accent); font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .drive-title { display: grid; justify-items: start; margin-top: var(--space-2); line-height: 1; }
  .drive-title__word { font-size: clamp(4.2rem, 18vw, 6.6rem); font-style: italic; line-height: .88; letter-spacing: .01em; }
  .drive-title__line { margin-top: .08em; font-size: clamp(2.1rem, 8.6vw, 3.5rem); line-height: 1; }
  .drive-title__line--accent { color: var(--drive-accent); }
  .drive-lead { margin-top: var(--space-4); font-size: 1.25rem; line-height: 1.35; color: rgb(255 255 255 / .92); }
  .drive-lead strong { color: #fff; }
  .drive-actions { margin-top: var(--space-5); }
  .drive-actions .btn { flex: 1 1 auto; }

  .drive-hero__art { position: relative; z-index: 0; height: 262px; margin: var(--space-2) -22px 0; -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%); mask-image: linear-gradient(180deg, transparent, #000 14%); }
  @media (min-width: 560px) { .drive-hero__art { height: clamp(300px, 56vw, 440px); } } /* tablete: scena nu se mai taie sus (marchiza și totemul rămân vizibile) */
  .drive-art { display: block; width: 100%; height: 100%; }
  .logo-art { --logo-blue: var(--brand-blue); --logo-green: var(--brand-green); }
  .drive-art__gpl { font-family: var(--font-display); font-weight: 700; font-size: 50px; fill: #11a656; letter-spacing: .02em; }
  .drive-art__slogan { font-family: var(--font-body); font-size: 9.5px; fill: #455868; }

  .drive-perks { position: relative; z-index: 1; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
  .drive-perks li { display: grid; justify-items: start; gap: 8px; font-size: .8125rem; line-height: 1.25; color: rgb(255 255 255 / .94); }
  .drive-perks .icon { width: 28px; height: 28px; color: var(--drive-accent); }

  @media (min-width: 900px) {
    .drive-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-content: center; min-height: 540px; padding: 52px 52px 48px; }
    .drive-hero__copy { grid-column: 1; grid-row: 1; align-self: end; }
    .drive-perks { grid-column: 1; grid-row: 2; align-self: start; margin-top: var(--space-6); gap: var(--space-5); }
    .drive-perks li { grid-template-columns: auto 1fr; align-items: center; gap: 12px; font-size: .9375rem; }
    .drive-hero__art {
      position: absolute; inset: 0 0 0 42%; z-index: 0; height: auto; margin: 0;
      -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%); mask-image: linear-gradient(90deg, transparent 0, #000 30%);
    }
    .drive-actions .btn { flex: 0 0 auto; }
  }

  /* ================= DRIVE +: „Cum crește reducerea ta" ================= */
  /* sub imaginea DRIVE + (nu peste ea), la aceeași lățime cu cardul de sus */
  .drive-tiers {
    position: relative; margin: var(--space-4) 0 0; padding: var(--space-5) 12px var(--space-4);
    border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  }
  .drive-tiers__title { font-size: 1.875rem; line-height: 1.05; }
  .drive-tiers__list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-4); }
  .tier { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; }
  .tier__bulina .bulina { width: 56px; height: 56px; filter: drop-shadow(0 6px 8px color-mix(in srgb, var(--shadow) 22%, transparent)); }
  .tier__text { display: grid; justify-items: center; gap: 8px; min-width: 0; max-width: 100%; }
  .tier__count { font-size: .9375rem; font-weight: 700; line-height: 1.15; text-wrap: balance; }
  /* pe telefon pastila are două rânduri („– 10" mare, „bani/L" mic), ca să încapă în coloană; pe desktop este pe un singur rând */
  .tier__pill { display: grid; justify-items: center; gap: 2px; padding: 6px 12px 7px; border-radius: 10px; background: var(--drive-accent); color: var(--drive-a); font-weight: 700; line-height: 1; }
  .tier__num { font-size: 1.5rem; white-space: nowrap; }
  .tier__unit { font-size: .75rem; letter-spacing: .03em; }
  .tier__arrow { position: absolute; top: 18px; right: calc(-1 * var(--space-2) - 10px); display: grid; place-items: center; width: 20px; height: 20px; color: var(--text-3); }
  .tier__arrow .icon { width: 18px; height: 18px; }
  .drive-tiers__note {
    display: flex; gap: 10px; align-items: flex-start; margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line);
    color: var(--text-2); font-size: var(--fs-small); line-height: 1.4;
  }
  .drive-tiers__note .icon { flex: none; width: 20px; height: 20px; margin-top: 1px; }
  .drive-tiers__note strong { color: var(--text); }
  @media (min-width: 900px) {
    .drive-tiers { margin: var(--space-5) 0 0; padding: var(--space-6) var(--space-7) var(--space-5); }
    .drive-tiers__title { font-size: 2.25rem; }
    .drive-tiers__list { gap: var(--space-8); margin-top: var(--space-5); }
    .tier { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; gap: var(--space-4); text-align: left; }
    .tier__bulina .bulina { width: 68px; height: 68px; }
    .tier__text { justify-items: start; }
    .tier__count { font-size: 1.1875rem; }
    .tier__pill { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 16px 8px; border-radius: 12px; }
    .tier__num { font-size: 1.75rem; }
    .tier__unit { font-size: 1.125rem; letter-spacing: 0; }
    .tier__arrow { top: 50%; right: calc(-1 * var(--space-8) / 2 - 12px); translate: 0 -50%; width: 24px; height: 24px; }
    .tier__arrow .icon { width: 22px; height: 22px; }
    .drive-tiers__note { justify-content: center; font-size: 1rem; }
  }

  /* ================= DRIVE + VIP ================= */
  .drive-block--vip { gap: var(--space-5); }
  .vip-row { display: grid; gap: var(--space-4); }
  .vip-card {
    position: relative; isolation: isolate; overflow: hidden; display: grid; padding: 28px 22px 0; border-radius: var(--radius-xl); color: var(--on-hero);
    background:
      radial-gradient(70% 55% at 78% 62%, color-mix(in srgb, var(--brand-green) 30%, transparent), transparent 70%),
      linear-gradient(135deg, var(--vip-b), var(--vip-a) 72%);
    box-shadow: var(--shadow-2);
  }
  .vip-card__copy { position: relative; z-index: 1; display: grid; gap: var(--space-3); justify-items: start; }
  .vip-title { font-size: clamp(3.2rem, 13vw, 4.8rem); font-style: italic; line-height: .9; letter-spacing: .01em; }
  .vip-lead { max-width: 28ch; font-size: 1.0625rem; line-height: 1.35; color: rgb(255 255 255 / .9); }
  .vip-claim { margin-top: var(--space-2); font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 8vw, 2.7rem); line-height: 1; }
  .vip-claim span, .vip-claim em { display: block; }
  .vip-claim em { font-style: normal; color: var(--drive-accent); }
  .vip-card__art { position: relative; z-index: 0; height: 270px; margin: var(--space-2) -22px 0; }
  .vip-art { display: block; width: 100%; height: 100%; }
  .vip-art__drive { font-family: var(--font-display); font-weight: 700; font-style: italic; font-size: 30px; letter-spacing: .02em; fill: #fff; }
  .vip-art__plus { fill: #11a656; }
  .vip-art__vip { font-family: var(--font-display); font-weight: 700; font-style: italic; font-size: 82px; letter-spacing: .02em; fill: url(#va-gold-text); }
  .vip-art__script { font-family: var(--font-body); font-style: italic; font-weight: 700; font-size: 22px; fill: #fff; }
  @media (min-width: 900px) {
    .vip-row { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: stretch; }
    .vip-card { grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); align-items: center; padding: 40px 0 40px 40px; min-height: 360px; }
    .vip-card__art { height: 100%; min-height: 300px; margin: 0 -14px 0 0; }
  }

  /* ----- „Găsește cea mai apropiată stație" ----- */
  .finder {
    display: grid; gap: var(--space-4); align-content: space-between; padding: var(--space-5); border-radius: var(--radius-xl);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  }
  .finder__main { display: grid; gap: var(--space-4); }
  .finder__copy { display: grid; gap: var(--space-3); align-content: start; }
  .finder__title { font-size: 2rem; line-height: 1.02; }
  .finder__cta { justify-self: start; }
  .finder__art { height: 150px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); }
  .map-art { display: block; width: 100%; height: 100%; }
  .ma-bg { fill: var(--surface-2); }
  .ma-park { fill: var(--primary-container); }
  .ma-water { fill: none; stroke: var(--secondary-container); stroke-width: 16; stroke-linecap: round; }
  .ma-road { fill: none; stroke: var(--surface); stroke-width: 6; stroke-linecap: round; }
  .ma-road--major { stroke-width: 10; }
  .ma-pin { fill: var(--primary); }
  .ma-label { font-family: var(--font-body); font-weight: 700; font-size: 17px; fill: var(--text-2); }
  .finder__perks { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); }
  .finder__perks li { display: grid; justify-items: start; gap: 6px; font-size: .8125rem; line-height: 1.25; }
  .finder__perks .icon { width: 26px; height: 26px; color: var(--primary); }
  @media (min-width: 900px) {
    .finder__main { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: stretch; }
    .finder__art { height: auto; min-height: 150px; }
    .finder__perks li { grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
  }

  /* ----- „De ce Drive Gas?" ----- */
  .why__title { font-size: 2.25rem; line-height: 1.05; }
  .why__list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--space-5); margin-top: var(--space-4); }
  .why__item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-4); align-items: start; }
  .why__icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--drive-b); color: var(--drive-accent); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line); }
  .why__icon .icon { width: 30px; height: 30px; }
  .why__name { font-size: 1.1875rem; font-weight: 700; line-height: 1.2; }
  .why__text { margin-top: 2px; color: var(--text-2); font-size: var(--fs-small); line-height: 1.4; }
  .why__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--primary); font-size: var(--fs-small); font-weight: 700; text-decoration: none; }
  .why__link:hover { text-decoration: underline; }
  .why__link .icon { width: 16px; height: 16px; }

  /* ================= slide pentru o campanie activă ================= */
  .promo-slide {
    position: relative; isolation: isolate; overflow: hidden; display: grid; gap: var(--space-5); align-items: center; min-height: 440px; padding: 30px 22px;
    border-radius: var(--radius-xl); color: #fff; background: linear-gradient(135deg, var(--hero-a), var(--hero-c)); box-shadow: var(--shadow-2);
  }
  .promo-slide--blue { background: linear-gradient(135deg, #123a78, var(--hero-a) 55%, #1d6fb5); }
  .promo-slide--green { background: linear-gradient(135deg, #0a6b36, var(--hero-c) 55%, #19b866); }
  .promo-slide--mix { background: linear-gradient(135deg, var(--hero-a), var(--hero-b) 55%, var(--hero-c)); }
  .promo-slide__copy { display: grid; gap: var(--space-3); justify-items: start; }
  .promo-slide__copy .drive-eyebrow { color: #fff; opacity: .85; }
  .promo-slide__title { font-size: clamp(3rem, 12vw, 5rem); line-height: .92; }
  .promo-slide__sub { font-size: 1.25rem; font-weight: 700; }
  .promo-slide__text { max-width: 44ch; font-size: 1.125rem; line-height: 1.4; color: rgb(255 255 255 / .94); }
  .promo-slide__when { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
  .promo-slide__when .icon { width: 20px; height: 20px; }
  .promo-slide__art { position: relative; display: grid; place-items: center; min-height: 180px; }
  .promo-slide__art img { width: 100%; height: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius-lg); }
  .promo-slide__glyph { width: 150px; height: 150px; stroke-width: 1.1; opacity: .9; filter: drop-shadow(0 8px 18px rgb(0 0 0 / .25)); }
  @media (min-width: 900px) {
    .promo-slide { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--space-8); min-height: 560px; padding: 56px; }
  }

  /* ================= pagina /drive-plus ================= */
  .drive-page { padding-top: var(--space-2); }
  /* pe desktop, firimiturile stau ca pe celelalte pagini (.page-head) */
  @media (min-width: 1024px) { .drive-page { padding-top: var(--space-6); } }
  .drive-page .drive-block--vip { margin-top: var(--space-5); }
  /* condițiile: fiecare card cât conținutul lui (regulamentul deschis nu întinde cardul de alături) */
  .drive-cond { align-items: start; }
  /* „Te identifici cu bulina ta": legătura dintre programe și cardul cu cod de bare */
  .bulina-callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3) var(--space-4); align-items: center; margin-top: var(--space-5); padding: var(--space-5); }
  .bulina-callout__art .bulina { width: 64px; height: 64px; filter: drop-shadow(0 8px 10px color-mix(in srgb, var(--shadow) 24%, transparent)); }
  .bulina-callout__copy h2 { font-size: 1.75rem; line-height: 1.05; }
  .bulina-callout__copy p { margin-top: 4px; }
  .bulina-callout .btn { grid-column: 1 / -1; justify-self: start; }
  @media (min-width: 768px) {
    .bulina-callout { grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--space-5) var(--space-6); }
    .bulina-callout .btn { grid-column: auto; }
  }
  .drive-cond__title { font-size: 2rem; }
}
