/* ==========================================================================
   «Подарочные сертификаты» — новый дизайн
   Разметка: templates/template-certificates-v2.php + includes/certificates-page.php.
   Формы — часть темы feedback/feedback-new.php, базовое оформление — blog-form.css, здесь — только посадка в блоки.
   Карточки машин — часть темы products/catalog-card-no-shadows.php (свои стили темы), здесь — только сетка.
   Токены — как на остальных новых страницах. Всё под .bg.
   ========================================================================== */

.bg {
  --ink: #231F20; --red: #E32320; --red-d: #C41D1A; --mut: #6F686A; --mut2: #8b8385; --line: #E5E1E1; --tint: #F6F4F3; --ground: #F1F0EF;
  --sans: "Archivo", "Proxima Nova", Arial, sans-serif; --serif: "Source Serif 4", Georgia, serif;
  --gut: clamp(16px, 5vw, 64px); --max: 1280px;
  background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5;
}
.bg *, .bg *::before, .bg *::after { box-sizing: border-box; }
.bg a:focus-visible, .bg summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.bg-wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gut); }
.bg > section ul:not(.auto-card *), .bg > section ol { list-style: none; margin: 0; padding: 0; }
.bg p { margin: 0; }
.bg h1, .bg h2 { text-transform: none; }
.bg-h2 { margin: 0; font: 800 clamp(28px, 3.4vw, 44px)/1.06 var(--sans); font-variation-settings: "wdth" 115; letter-spacing: -.01em; color: inherit; text-align: start; text-wrap: balance; }
.bg-lead { margin-top: 16px !important; max-width: 640px; font-family: var(--serif); font-size: 18px; line-height: 1.6; color: #3d3637; }
.bg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 28px; border-radius: 10px; font: 700 16px var(--sans); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.bg-btn--red { background: var(--red); color: #fff; }
.bg-btn--red:hover { background: var(--red-d); color: #fff; }
.bg-link { display: inline-block; margin-top: 24px; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.bg-link:hover { color: var(--red); }

.bg-sec { padding: 88px 0; }
.bg-sec--white { background: #fff; }
.bg-sec--dark { background: var(--ink); color: #fff; }
.bg-sec--dark .bg-lead { color: rgba(255,255,255,.76); }
.bg-sec--white + .bg-sec--white { padding-top: 0; }
.bg-top { padding: 24px 0 40px; }
.bg-top .bg-h2 { margin-top: 18px; }

/* шапка на фото */
.bg-hero { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: clamp(620px, 86vh, 840px); background: var(--ink); color: #fff; overflow: hidden; box-shadow: 0 -16px 0 var(--ink); }
.bg-hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 55%; }
.bg-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(35,31,32,.88) 0%, rgba(35,31,32,.62) 38%, rgba(35,31,32,.1) 75%), linear-gradient(0deg, rgba(35,31,32,.95) 0%, rgba(35,31,32,0) 50%); }
.bg-hero > .bg-wrap { width: 100%; }
.bg-hero__crumbs { position: relative; padding-top: 18px; }
.bg .bg-hero .breadcrumbs { margin: 0; padding: 0; }
.bg .bg-hero .breadcrumbs, .bg .bg-hero .breadcrumbs * { color: rgba(255,255,255,.85) !important; font-family: var(--sans) !important; font-size: 14px !important; }
.bg-hero__in { position: relative; margin-top: auto; padding-top: 80px; padding-bottom: 44px; }
.bg-hero__title { max-width: 900px; margin: 0 0 18px; color: #fff; text-align: start; font: 800 clamp(40px, 6.2vw, 86px)/1 var(--sans); font-variation-settings: "wdth" 118; letter-spacing: -.015em; text-wrap: balance; }
.bg-hero__lead { max-width: 620px; margin-bottom: 30px !important; font-family: var(--serif); font-size: 21px; line-height: 1.5; color: rgba(255,255,255,.88); }
.bg-perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 44px !important; border-top: 1px solid rgba(255,255,255,.22); }
.bg-perks li { padding: 20px 24px 0 0; }
.bg-perks li + li { padding-inline-start: 24px; border-inline-start: 1px solid rgba(255,255,255,.22); }
.bg-perks b { display: block; margin-bottom: 6px; font-size: 20px; line-height: 1.25; }
.bg-perks span { display: block; font-family: var(--serif); font-size: 16px; line-height: 1.5; color: rgba(255,255,255,.74); }

/* подарок-эмоции: фото + поводы + форма */
.bg-emo { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
.bg-emo__media, .bg-incl__media, .bg-opts__media, .bg-order__media { overflow: hidden; border-radius: 16px; background: var(--tint); }
.bg-emo__media { position: sticky; top: 110px; aspect-ratio: 4 / 5; }
.bg-emo__media img, .bg-incl__media img, .bg-opts__media img, .bg-order__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bg-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px !important; }
.bg-tags li { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 20px; background: #fff; font-size: 15px; font-weight: 600; }
.bg-tags li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }

/* формы (часть темы new-form) внутри блоков: без внешних отступов, одна колонка */
.bg-form { margin-top: 32px; }
.bg .bg-form section.new-form.new-form_white { padding: 0; background: none; }
.bg .bg-form section.new-form .container { max-width: none; padding: 0; }
.bg .bg-form section.new-form .new-form__inner { grid-template-columns: 1fr; min-height: 0; border-radius: 16px; }
.bg .bg-form section.new-form .new-form__col { padding: 36px clamp(20px, 3.4vw, 44px) 32px; }
.bg .bg-form section.new-form .new-form__title { font-size: clamp(26px, 2.4vw, 34px); }
.bg .bg-form section.new-form .new-form__col > .new-form__text { max-width: none; font-size: 17px; }
.bg .bg-form section.new-form .new-form__form { margin: 22px 0 26px; }

/* парк: цифра, текст, бренды */
.bg-fleet { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 56px; align-items: end; margin-bottom: 40px; }
.bg-fleet__num b { display: block; font: 800 clamp(72px, 9vw, 128px)/.9 var(--sans); font-variation-settings: "wdth" 112; letter-spacing: -.02em; color: var(--red); }
.bg-fleet__num span { display: block; margin-top: 10px; font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.bg-brands { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.bg-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 112px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.bg-brand:hover { border-color: #cfc7c8; box-shadow: 0 10px 26px rgba(35,31,32,.08); color: var(--ink); }
.bg-brand img { max-width: 74%; max-height: 40px; object-fit: contain; }
.bg-brand span { font-size: 13px; font-weight: 700; line-height: 1.2; text-align: center; }

/* машины: карточки темы в сетке */
.bg-sec--cars .bg-h2 { margin-bottom: 28px; }
.bg-cars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.bg .bg-cars .auto-card { width: auto; min-width: 0; max-width: none; height: 100%; margin: 0; }
.bg .bg-cars .auto-card__swiper { width: 100%; overflow: hidden; }
/* body.landing__body красит цену в белый (была тёмная страница) — здесь фон белый */
.bg .bg-cars .auto-card__new-price, .bg .bg-cars .auto-card__new-price * { color: var(--ink); }
.bg .bg-cars .auto-card__new-price_old, .bg .bg-cars .new-price-opacity { color: var(--mut); }

/* что входит в аренду */
.bg-incl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.bg-incl__list { margin: 32px 0 34px !important; counter-reset: incl; }
.bg-incl__list li { position: relative; padding: 20px 0 20px 64px; border-top: 1px solid rgba(255,255,255,.14); counter-increment: incl; }
.bg-incl__list li:last-child { border-bottom: 1px solid rgba(255,255,255,.14); }
.bg-incl__list li::before { content: counter(incl, decimal-leading-zero); position: absolute; inset-inline-start: 0; top: 18px; font: 800 28px/1 var(--sans); font-variation-settings: "wdth" 112; color: var(--red); }
.bg-incl__list b { display: block; margin-bottom: 4px; font-size: 20px; line-height: 1.3; }
.bg-incl__list p { font-family: var(--serif); font-size: 16px; line-height: 1.55; color: rgba(255,255,255,.74); }
.bg-incl__media { aspect-ratio: 4 / 3; }
[dir="rtl"] .bg-incl__list li { padding: 20px 64px 20px 0; }

/* варианты сертификата */
.bg-opts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.bg-opts__media { aspect-ratio: 4 / 3; }
.bg-opts__media img { object-position: 50% 62%; }
.bg-opts__body .bg-h2 { font-size: clamp(32px, 4vw, 56px); }

/* заказ: фото + форма */
.bg-order { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: stretch; }
.bg-order__media { min-height: 460px; }
.bg-order__media img { object-position: 50% 40%; }
.bg-order .bg-form { margin: 0; }
.bg .bg-order .bg-form section.new-form, .bg .bg-order .bg-form section.new-form .container, .bg .bg-order .bg-form section.new-form .new-form__inner { height: 100%; }
.bg .bg-order .bg-form section.new-form .new-form__col { justify-content: center; }

/* FAQ */
.bg-faq { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 72px; align-items: start; }
.bg-faq__title { position: sticky; top: 110px; }
.bg-q { border-bottom: 1px solid var(--line); }
.bg-q:first-child { border-top: 1px solid var(--line); }
.bg-q__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 20px 4px; cursor: pointer; list-style: none; }
.bg-q__head::-webkit-details-marker { display: none; }
.bg .bg-q__title { margin: 0; font: 700 19px/1.35 var(--sans); color: var(--ink); text-align: start; text-transform: none; transition: color .15s; }
.bg-q__head:hover .bg-q__title, .bg-q[open] .bg-q__title { color: var(--red); }
.bg-q__icon { position: relative; flex: none; width: 32px; height: 32px; margin-top: -3px; border: 1.5px solid var(--line); border-radius: 50%; transition: background .2s, border-color .2s; }
.bg-q__icon::before, .bg-q__icon::after { content: ""; position: absolute; inset-inline-start: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 1px; background: var(--ink); transition: transform .2s, background .2s; }
.bg-q__icon::after { transform: rotate(90deg); }
.bg-q[open] .bg-q__icon { background: var(--ink); border-color: var(--ink); }
.bg-q[open] .bg-q__icon::before, .bg-q[open] .bg-q__icon::after { background: #fff; }
.bg-q[open] .bg-q__icon::after { transform: rotate(0deg); }
.bg-q__body { padding: 0 56px 24px 4px; font-family: var(--serif); font-size: 17px; line-height: 1.65; color: #3d3637; overflow-wrap: anywhere; }
.bg-q__body [itemprop="text"] > * + * { margin-top: 10px; }
.bg .bg-q__body ul { margin: 8px 0 0; padding-inline-start: 22px; list-style: disc; }
.bg-q__body li + li { margin-top: 4px; }
.bg-q__body strong, .bg-q__body b { color: var(--ink); }
.bg-q__body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }

@media (max-width: 1100px) {
  .bg-brands { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bg-cars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bg-faq { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 48px; }
}
@media (max-width: 900px) {
  .bg-emo, .bg-incl, .bg-opts, .bg-order, .bg-faq, .bg-fleet { grid-template-columns: 1fr; gap: 32px; }
  .bg-emo__media { position: static; aspect-ratio: 4 / 3; }
  .bg-emo__media img { object-position: 50% 30%; }
  .bg-faq__title { position: static; }
  .bg-fleet { align-items: start; gap: 16px; }
  .bg-order__media { min-height: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 700px) {
  .bg-hero { min-height: 0; }
  .bg-hero__in { padding-top: 120px; padding-bottom: 28px; }
  .bg-hero::after { background: linear-gradient(0deg, rgba(35,31,32,.96) 0%, rgba(35,31,32,.8) 55%, rgba(35,31,32,.35) 100%); }
  .bg-hero__title { font-size: clamp(36px, 10.5vw, 48px); }
  .bg-hero__lead { font-size: 17px; }
  .bg-hero .bg-btn { width: 100%; }
  .bg-perks { grid-template-columns: 1fr; margin-top: 28px !important; }
  .bg-perks li, .bg-perks li + li { padding: 14px 0; border-inline-start: 0; }
  .bg-perks li + li { border-top: 1px solid rgba(255,255,255,.22); }
  .bg-perks b { font-size: 18px; }
  .bg-perks span { font-size: 15px; }
  .bg-sec { padding: 52px 0; }
  .bg-lead { font-size: 17px; }
  .bg-tags li { height: 36px; padding: 0 14px; font-size: 14px; }
  /* бренды — лента в две строки с прокруткой вбок */
  .bg-brands { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 104px; gap: 8px; margin-inline: calc(var(--gut) * -1) !important; padding: 0 var(--gut) 8px !important; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .bg-brands::-webkit-scrollbar { display: none; }
  .bg-brands li { scroll-snap-align: start; }
  .bg-brand { height: 92px; }
  .bg-cars { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .bg-incl__list li { padding-inline-start: 52px; }
  .bg-incl__list li::before { font-size: 24px; }
  .bg-incl .bg-btn { width: 100%; }
  .bg .bg-form section.new-form .new-form__inner { border-radius: 12px; }
  .bg .bg-form section.new-form .new-form__col { padding: 28px 18px 26px; }
  .bg-q__head { gap: 16px; padding: 18px 0; }
  .bg .bg-q__title { font-size: 17px; }
  .bg-q__body { padding: 0 0 20px; font-size: 16px; }
}
