/* ============================================================
   СТРАНИЦА УСЛУГИ (шаблон). Переиспользует шапку, кнопки, блоки
   EKIPA/Opinie/Partnerzy/Kontakt/Footer (партиалы). Здесь — только
   специфичные блоки: hero услуги, «Na czym polega», «Jak działa»,
   FAQ-вариант (без табов), CTA. Фоны/картинка/иконки/тексты —
   per-service (задаются в HTML, под будущую админку).
   Figma: hero 406:2203, блок2 406:2264, блок3 406:2319, FAQ 406:2682, CTA 406:2742.
   ============================================================ */

/* ── BLOCK 1: HERO услуги (Figma 406:2203) ──────────────────── */
.svc-hero {
  position: relative; width: 100%; height: 810px; overflow: hidden;
  background: var(--dark-1100, #000); isolation: isolate;
}
.svc-hero__bg { position: absolute; inset: 0; z-index: 0; }
.svc-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
/* лёгкое затемнение только сверху (под шапку/заголовок) — фон уже сбалансирован,
   красный glow снизу НЕ глушим */
.svc-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.32) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 100%);
}
.svc-hero__inner { position: relative; z-index: 2; max-width: 1440px; height: 100%; margin: 0 auto; }

/* шапка — общий компонент .hero__header, снимаем абсолют из hero.css */
.svc-hero .hero__header { position: relative; left: auto; top: auto; width: 100%; max-width: 1440px; margin: 0 auto; }
/* мега-меню «Usługi» вписываем в hero услуги (на главной — фикс 1440 внутри stage) */
.svc-hero .mega { width: 100%; left: 0; }
/* на странице услуги мега — плавающая выпадашка (fixed), чтобы открывалась с любого места:
   и из шапки hero, и из закреплённой плашки (navdock) при скролле */
.svc-page .mega { position: fixed; top: 80px; left: 24px; right: 24px; width: auto; max-width: 1392px; padding: 0; z-index: 500; }

/* заголовок Druk 92/104 по центру сверху (top 176). На шаблоне допускаем перенос для длинных названий */
.svc-hero__title {
  position: absolute; left: 50%; top: 168px; transform: translateX(-50%);
  margin: 0; width: max-content; max-width: calc(100% - 96px);
  font-family: var(--ff-display); font-weight: 700; font-style: italic;
  font-size: 92px; line-height: 104px; text-transform: uppercase; text-align: center;
  background: linear-gradient(180deg, #ffffff 38.834%, #787674 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  z-index: 3; pointer-events: none; letter-spacing: normal; }
/* продуктовая картинка по центру (≈776). Параллакс — как на главной:
   JS ставит --mx/--my (−1..1), плавность даёт CSS-transition (см. .hero__layer). */
.svc-hero__img {
  position: absolute; left: 50%; top: 282px; z-index: 2;   /* опущена на 32px (было 250) */
  width: 776px; max-width: 86%; height: auto;
  transform: translateX(calc(-50% + var(--mx, 0) * 14px)) translateY(calc(var(--my, 0) * 9px));
  transition: transform .35s ease-out, opacity .8s ease; will-change: transform; pointer-events: none;
  filter: drop-shadow(0 40px 60px rgba(0,0,0,.45));
}

/* премиум-появление hero услуги: blur→чёткость каскадом при загрузке (как на главной).
   Чистый CSS (animation, fill: both) — без JS-зависимости; если анимация недоступна, элементы видны. */
@keyframes svc-hero-in { from { opacity: 0; filter: blur(10px); } to { opacity: 1; filter: none; } }
@keyframes svc-hero-fade { from { opacity: 0; } to { opacity: 1; } }
/* Шапку НЕ анимируем (ни filter, ни opacity): любая анимация на .hero__header
   создаёт композит-слой/группу и гасит backdrop-filter (blur) у nav и кнопок-плашек
   внутри. Шапка показывается сразу (opacity:1), вход несут заголовок/фото/низ. */
.svc-hero .hero__header { animation: none; opacity: 1; }
.svc-hero__title { animation: svc-hero-in .8s ease .12s both; }
.svc-hero__img { animation: svc-hero-fade .8s ease .2s both; }   /* картинка — только opacity (drop-shadow/параллакс не ломаем) */
.svc-hero__bottom { animation: svc-hero-in .8s ease .3s both; }
@media (prefers-reduced-motion: reduce) {
  .svc-hero .hero__header, .svc-hero__title, .svc-hero__img, .svc-hero__bottom { animation: none; }
}
/* нижний ряд: кнопка слева + подзаголовок справа — позиция как .hero__services главной */
.svc-hero__bottom {
  position: absolute; left: 24px; right: 24px; bottom: 124px; z-index: 3;
  padding: 65px 64px; box-sizing: border-box;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}
.svc-hero__btn { width: auto; max-width: none; height: 56px; flex: none; }
.svc-hero__sub {
  width: 300px; flex: none; margin: 0; text-align: right;
  font-family: var(--ff-body); font-size: 24px; line-height: 32px; color: var(--light-1000, #fff);
}
.svc-hero__sub b { font-weight: 700; letter-spacing: normal; }
/* звонилка — общий компонент .hero__call (fixed, как на главной); своей не держим */

/* ── Полосатый фон-мотив (как у FAQ): общий для блоков 2 и 3 ──
   фон = градиент серое(8% white)→чёрный сверху-вниз (как на главной, Figma) */
.svc-sec {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 100%), var(--dark-1100, #000);
}
.svc-sec__lines {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  display: flex; align-items: stretch; padding: 0 84px; gap: 151px; opacity: .12;
}
.svc-sec__lines span { flex: 1; border-right: 1px solid rgba(255,255,255,.55); }
.svc-sec__inner { position: relative; z-index: 1; width: 1264px; max-width: calc(100% - 48px); margin: 0 auto; }

/* центрированный заголовок Druk + dash + интро (общий для блоков 2 и FAQ-«по центру») */
.svc-head { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.svc-head__title {
  margin: 0; font-family: var(--ff-display); font-weight: 700; font-style: italic;
  font-size: 72px; line-height: 72px; text-transform: uppercase;
  background: linear-gradient(180deg,#fff 0%,#717171 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; letter-spacing: normal; }
.svc-head__line { display: block; height: 1px; margin-top: -6px; width: min(300px, 80%);
  transform: rotate(-2deg); }
.svc-head__line svg { display: block; width: 100%; height: 100%; overflow: visible; }
.svc-head__sub { margin: 24px 0 0; max-width: 620px; font-family: var(--ff-body); font-size: 24px; line-height: 32px; color: var(--light-1000); }
.svc-head__sub b { font-weight: 700; letter-spacing: normal; }

/* ── BLOCK 2: «Na czym polega ta usługa?» (Figma 406:2264) ──── */
.na-czym {
  padding: 88px 0 120px;   /* низ 120: за вычетом наезда jak-dziala (-32) видимый отступ до блока 3 = 88 */
  /* готовый фон блока из Figma (чёрный + градиент + линии) */
  background: var(--dark-1100, #000) url("/public/assets/uslugi/na-czym-bg.svg") no-repeat center top;
  background-size: 100% 100%;
}
.na-czym .svc-sec__lines { display: none; }   /* линии уже внутри SVG-фона */
.na-czym .svc-sec__inner { display: flex; flex-direction: column; align-items: center; gap: 52px; }
.na-czym .svc-head { width: 798px; max-width: 100%; }
/* 2 колонки по 2 карточки (как в Figma) → правильный порядок и на десктопе, и на мобайле */
.na-czym__cols {
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 24px;
}
.na-czym__col { display: contents; }
.na-czym__col:nth-child(1) .na-czym__card:nth-child(1) { grid-column: 1; grid-row: 1; }
.na-czym__col:nth-child(1) .na-czym__card:nth-child(2) { grid-column: 1; grid-row: 2; }
.na-czym__col:nth-child(2) .na-czym__card:nth-child(1) { grid-column: 2; grid-row: 1; }
.na-czym__col:nth-child(2) .na-czym__card:nth-child(2) { grid-column: 2; grid-row: 2; }
.na-czym__card {
  display: flex; align-items: stretch; gap: 24px; padding: 12px;
  height: 100%;
  box-sizing: border-box;
  border-radius: 12px; background: var(--dark-1000); border: 1px solid var(--light-40);
  backdrop-filter: blur(32px); -webkit-backdrop-filter: blur(32px);
  /* плавный «премиальный» ховер — как у карточек услуг/команды */
  transition: transform .35s cubic-bezier(.22, .61, .36, 1), background .35s ease, border-color .35s ease;
}
/* ховер карточки — лёгкий лифт + подсветка фона (обводку НЕ меняем) */
.na-czym__card:hover { transform: translateY(-4px); background: #1a1a1a; }
.na-czym__card:hover .na-czym__ic { background: var(--light-80); }
.na-czym__ic {
  align-self: stretch; width: 64px; flex: none; border-radius: 8px;
  background: var(--light-40); display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
}
.na-czym__ic svg, .na-czym__ic img { width: 32px; height: 32px; object-fit: contain; display: block; }
.na-czym__tx { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 16px 0; gap: 8px; }
.na-czym__tx h3 { margin: 0; font-family: var(--ff-body); font-weight: 700; font-size: 24px; line-height: 32px; text-transform: uppercase; color: var(--light-1000); letter-spacing: normal; }
.na-czym__tx p { margin: 0; font-family: var(--ff-body); font-size: 18px; line-height: 28px; letter-spacing: var(--ls-body); color: rgba(255,255,255,.6); }

/* ── BLOCK 3: «Jak działa i kiedy warto» (Figma 406:2331) — высота 800,
   карточки как .svc-item: медиа-иконка (glow) + текст-блок #141414 по центру, без стрелки ── */
.jak-dziala {
  padding: 88px 0; min-height: 800px; box-sizing: border-box;
  /* контент (заголовок+линия+карточки) по центру блока по вертикали */
  display: flex; flex-direction: column; justify-content: center;
  /* готовый фон блока с линиями (Figma) */
  background: var(--dark-1100, #000) url("/public/assets/uslugi/jak-dziala-bg.svg") no-repeat center top;
  background-size: 100% 100%;
}
.jak-dziala .svc-sec__lines { display: none; }
.jak-dziala .svc-sec__inner { display: flex; flex-direction: column; gap: 48px; }
.jak-dziala__head { margin: 0; display: flex; flex-direction: column; align-items: flex-start; }
.jak-dziala__title {
  margin: 0; font-family: var(--ff-display); font-weight: 700; font-style: italic;
  font-size: 72px; line-height: 72px; text-transform: uppercase;
  background: linear-gradient(180deg,#fff 0%,#717171 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; letter-spacing: normal; }
/* dash-линия под заголовком */
.jak-dziala__line { display: block; height: 1px; width: min(568px, 90%); margin-top: 6px; transform: translate(-32px, -16px) rotate(-2deg); pointer-events: none; }
.jak-dziala__line svg { display: block; width: 100%; height: 100%; overflow: visible; }
.jak-dziala__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
/* карточка = медиа + текст-блок (как .svc-item с главной) */
.jak-card {
  background: var(--dark-1000); border: 1px solid var(--light-40); border-radius: 12px;
  padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; height: 424px;
  transition: transform .18s ease;
}
/* ховер карточки — лёгкий лифт + зум картинки + подсветка плашки с текстом
   (обводку у этого типа карточек НЕ подсвечиваем) */
.jak-card:hover { transform: translateY(-4px); }
.jak-card:hover .jak-card__label { background: #202020; }
.jak-card__media {
  flex: 1 1 auto; min-height: 0; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: #0d0d0d;
}
.jak-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}
.jak-card:hover .jak-card__media img { transform: scale(1.05); }
.jak-card__label {
  flex: none; min-height: 144px; background: #141414; border-radius: 8px; padding: 24px;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s ease;
}
.jak-card__label span {
  font-family: var(--ff-body); font-weight: 700; font-size: 24px; line-height: 32px;
  text-transform: uppercase; color: var(--light-1000); text-align: center; letter-spacing: normal; }

/* ── BLOCK 7: FAQ-вариант (без табов, 2 колонки) (Figma 406:2682) ──
   Переиспользует аккордеон .faq__item/.faq__q/.faq__toggle из block10.css. */
.svc-faq { position: relative; overflow: hidden; background: #0A0A0A; padding: 88px; }
.svc-faq__head {
  position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 64px; margin-bottom: 48px;
}
.svc-faq__title {
  margin: 0; width: 563px; max-width: 60%;
  font-family: var(--ff-display); font-weight: 700; font-style: italic;
  font-size: 72px; line-height: 72px; text-transform: uppercase;
  background: linear-gradient(180deg,#fff 0%,#717171 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; letter-spacing: normal; }
.svc-faq__sub { width: 420px; max-width: 38%; margin: 8px 0 0; text-align: right; font-family: var(--ff-body); font-size: 24px; line-height: 32px; color: var(--light-1000); }
.svc-faq__sub b { font-weight: 700; letter-spacing: normal; }
.svc-faq__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; align-items: start; }
/* колонки аккордеона переиспользуют .faq__item (display:flex) */
.svc-faq__col { display: flex; flex-direction: column; gap: 18px; }

/* ── BLOCK 8: CTA услуги (Figma 406:2742) — свой фон + текст ─── */
.svc-cta { position: relative; width: 100%; height: 600px; overflow: hidden; background: var(--dark-1100,#000); isolation: isolate; }
.svc-cta__bg { position: absolute; inset: 0; z-index: 0; }
.svc-cta__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.svc-cta__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(1,1,1,.35) 0%, rgba(1,1,1,.15) 40%, rgba(1,1,1,.5) 100%); }
.svc-cta__inner {
  position: relative; z-index: 2; height: 100%; max-width: 800px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; text-align: center; padding: 0 24px;
}
.svc-cta__title {
  margin: 0; font-family: var(--ff-display); font-weight: 700; font-style: italic;
  font-size: 92px; line-height: 92px; text-transform: uppercase;
  background: linear-gradient(180deg,#fff 0%,#787674 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; letter-spacing: normal; }
.svc-cta__sub { margin: 0; font-family: var(--ff-body); font-size: 24px; line-height: 32px; color: var(--light-1000); }
.svc-cta__sub b { font-weight: 700; letter-spacing: normal; }
.svc-cta__btn { width: auto; max-width: none; height: 56px; }

/* блок 9 «Kontakt» — как на главной: без скругления фона, плавный стык с CTA
   (margin-top:-24 наследуется из block12.css, перекрывает «мёртвые» 24px CTA) */
.svc-page .ct { border-radius: 0; }

/* ── Лейаут блоков на странице услуги ──────────────────────── */
/* блок 3 — скругление 32 по всем углам (блок 2 — без скругления, ровный фон) */
.jak-dziala { border-radius: 32px; }
/* блок «Nasza EKIPA» (команда) уходит ПОД предыдущий блок «Jak działa» (он сверху по слоям);
   отступ от карточек до следующего блока = 172 */
.svc-page .jak-dziala { position: relative; z-index: 2; margin-top: -32px; }
/* блок 5 «Nasza EKIPA» (команда) — скругление фона 32px по всем углам (как блок 3) */
.svc-page .team { border-radius: 32px; }

/* блок 5 «Opinie» — заменить родные полоски на свг-линии 04_bg (team-bg.svg);
   линии опущены на 24px вниз (верхние 24px — чистый градиент без линий) */
.svc-page .r8 {
  background:
    url("/public/assets/uslugi/team-bg.svg") no-repeat center 24px / 100% calc(100% - 24px),
    linear-gradient(180deg, #010101 0%, #131313 50%, #010101 100%);
}
.svc-page .r8__lines { display: none; }

/* блок 6 «Nasi partnerzy» — БЕЗ оверрайдов: 1:1 как на главной (block9.css) */

/* блок 8 CTA (вариант --full) — фон-картинка на всю ширину/высоту (исходник 1440×800),
   без скругления; декоративные щиты не нужны — они уже впечатаны в саму картинку */
.svc-page .cta--full .cta__card { position: absolute; inset: 0; border-radius: 32px; overflow: hidden; z-index: 0; }
.svc-page .cta--full .cta__pattern { display: none; }

/* ── Адаптив ────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .svc-hero { height: auto; min-height: 620px; }
  .svc-hero__title { font-size: 64px; line-height: 68px; top: 150px; }
  .svc-hero__img { width: 620px; top: 262px; }   /* опущена на 32px (было 230) */
  .na-czym__grid, .jak-dziala__grid, .svc-faq__cols { grid-template-columns: 1fr 1fr; }
  .jak-dziala__grid { grid-template-columns: repeat(2, 1fr); }
  .svc-head__title, .svc-faq__title { font-size: 48px; line-height: 48px; }
  .svc-cta__title { font-size: 64px; line-height: 64px; }
  .svc-faq { padding: 56px; }
  .svc-faq__head { flex-direction: column; gap: 16px; }
  .svc-faq__title, .svc-faq__sub { width: auto; max-width: none; text-align: left; }
}
@media (max-width: 768px) {
  .svc-hero { height: auto; }
  /* мобайл-структура как на главной: ЗАГОЛОВОК → ПОДЗАГОЛОВОК → КНОПКА → ИЗОБРАЖЕНИЕ */
  .svc-hero__inner { display: flex; flex-direction: column; align-items: center; min-height: 0; padding-bottom: 16px; }
  .svc-hero .hero__header { order: 0; }
  .svc-hero__title { position: static; transform: none; width: 100%; max-width: none; text-align: center;
    font-size: 40px; line-height: 44px; padding: 8px 16px 0; order: 1; }
  .svc-hero__bottom { display: contents; }   /* кнопка/подзаголовок становятся прямыми flex-айтемами */
  .svc-hero__sub { order: 2; width: 100%; max-width: 343px; text-align: center; font-size: 18px; line-height: 26px; margin: 12px auto 0; padding: 0 16px; }
  .svc-hero__btn { order: 3; width: 100%; max-width: 311px; height: 56px; margin: 24px auto 0; }
  .svc-hero__btn .btn-appt__label { flex: 1 1 0; justify-content: center; }
  .svc-hero__img { position: static; transform: none; width: 92%; max-width: 420px; margin: 24px auto 0; order: 4; filter: none; }
  /* фон героя приподнят (показываем низ с жёлтым свечением, а не обрезаем) */
  .svc-hero__bg img { object-position: center bottom; }

  .na-czym { padding: 48px 16px; background-image: url("/public/assets/uslugi/na-czym-bg-mob.svg"); }
  .na-czym .svc-sec__inner { gap: 32px; max-width: 100%; }
  .na-czym .svc-head { width: 100%; }
  .na-czym__cols { display: flex; flex-direction: column; gap: 8px; }
  .na-czym__col { display: flex; flex-direction: column; gap: 8px; }
  .na-czym__card { height: auto; padding: 12px 20px 12px 12px; gap: 20px; }
  .na-czym__ic { width: 48px; }
  .na-czym__tx { padding: 8px 0; }
  .na-czym__tx h3 { font-size: 20px; line-height: 28px; }
  .na-czym__tx p { font-size: 16px; line-height: 24px; letter-spacing: var(--ls-body); }
  /* блок 4 «команда» — опустить на ~24px (наезд -48 из block6 → -24) */
  .svc-page .team { margin-top: 0; padding-bottom: 0; border-radius: 0; }   /* отступ 4↔5 минимальный; на мобайле без скругления */
  .svc-page .part { padding-top: 4px; }                   /* отступ между блоками 5 и 6 меньше на 28 (32→4) */
  /* блок 3: вплотную к блоку 2 (48px от заголовка до начала фона — из padding) */
  .svc-page .jak-dziala { margin-top: 0; }
  /* блок 3 на мобайле: фон-картинка bg_03_mob (скругление уже встроено в svg) — CSS-скругление убрано */
  .jak-dziala { padding: 48px 16px; min-height: 0; justify-content: flex-start; border-radius: 0; background: transparent url("/public/assets/uslugi/jak-dziala-bg-mob.svg") no-repeat center top / 100% 100%; }
  .jak-dziala__line { transform: rotate(-2deg); width: min(300px, 78%); }
  .jak-dziala .svc-sec__inner { gap: 24px; max-width: 100%; }
  .svc-faq__cols { grid-template-columns: 1fr; gap: 12px; }
  /* карточки блока 3 на мобайле (Figma 525:3206): 1 колонка, картинка 204px + плашка #141414 */
  .jak-dziala__grid { grid-template-columns: 1fr; gap: 8px; }
  .jak-card { height: auto; padding: 8px 9px; gap: 8px; }
  .jak-card__media { min-height: 0; height: 204px; }
  .jak-card__label { min-height: 0; padding: 16px; }
  .jak-card__label span { font-size: 20px; line-height: 28px; }
  .na-czym .svc-head__title { font-size: 40px; line-height: 40px; }
  .svc-head__title, .svc-faq__title { font-size: 34px; line-height: 36px; }
  .svc-head__sub, .svc-faq__sub { font-size: 18px; line-height: 26px; }
  .jak-dziala__title { font-size: 40px; line-height: 42px; }
  .svc-faq { padding: 48px 16px; }
  .svc-sec__lines { padding: 0 14px; gap: 28px; }
  .svc-cta { height: auto; }
  .svc-cta__inner { padding: 64px 16px; gap: 20px; }
  .svc-cta__title { font-size: 40px; line-height: 42px; }
  .svc-cta__sub { font-size: 18px; line-height: 26px; }
  .svc-cta__btn { width: 100%; max-width: 343px; }
  /* CTA мобайл: фон-картинка целиком, без обрезки снизу (исходник вертикальный 750×1280) */
  .svc-page .cta--full { height: auto; aspect-ratio: 750 / 1280; }
  .svc-page .cta--full .cta__inner { width: 100%; height: 100%; }
  /* картинку приподнять на 8px — лента снизу получает зазор, не упирается в рамку */
  .svc-page .cta--full .cta__photo { transform: translateY(-8px); }
}
