/* ==========================================================================
   PREMIUM PAGES — компоненты внутренних страниц
   Продолжение premium_theme.css: те же переменные, тот же ритм.
   Подключать ПОСЛЕ premium_theme.css и ПЕРЕД responsive.css.
   ========================================================================== */

/* ==========================================================================
   1. ШАПКА ВНУТРЕННЕЙ СТРАНИЦЫ
   ========================================================================== */

/* Шапка внутренней страницы не занимает весь экран, в отличие от главной.
   Селектор с двумя классами — чтобы перебить `.header { min-height: 100vh }`
   из responsive.css, который подключается позже. */
.header.page-header {
  position: relative;
  min-height: 0;
  height: auto;
  display: block;
  overflow: clip;
  background-color: var(--bg-primary);
}

/* Шапка компактная: меню занимает 74px, остальное — воздух вокруг заголовка.
   Отступ сверху меньше меню быть не может — заголовок уедет под навигацию. */
.page-hero {
  position: relative;
  padding: 96px 0 34px;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(182, 138, 82, 0.16) 0%, transparent 55%),
    linear-gradient(160deg, #303030 0%, #262626 60%, #222222 100%);
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -110px;
  right: -120px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(182, 138, 82, 0.13) 0%, transparent 68%);
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(182, 138, 82, 0.45), transparent);
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

/* Ширину держим меньше контейнера: справа внизу шапки стоят иконки
   соцсетей (около 190 px плюс отступ), и текст не должен на них наезжать.
   На узких экранах иконки скрыты, поэтому там ограничение снимается. */
.page-hero-inner {
  max-width: 980px;
}

@media (min-width: 992px) {
  .page-hero-inner {
    max-width: min(980px, calc(100% - 250px));
  }
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.page-eyebrow::before {
  content: '';
  width: 42px;
  height: 1px;
  background: var(--accent);
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1.18;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 14px;
  letter-spacing: 0.5px;
}

.page-hero h1 span {
  color: var(--accent);
}

.page-hero-lead {
  font-family: var(--font-text);
  font-size: clamp(14px, 0.95vw, 16px);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 68ch;
  margin: 0;
  /* абзац короткий (2–4 строки) — раскладываем строки поровну,
     иначе в последней висело одно слово */
  text-wrap: balance;
}

.page-hero-lead b,
.page-hero-lead strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Хлебные крошки */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-text);
  font-size: 13px;
  letter-spacing: 0.6px;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumbs span {
  color: rgba(255, 255, 255, 0.28);
}

.breadcrumbs .current {
  color: var(--accent);
}

/* ==========================================================================
   2. СЕКЦИИ КОНТЕНТА
   ========================================================================== */

.page-section {
  padding: 90px 0;
  position: relative;
}

/* Первый раздел подтягиваем к шапке: у неё уже есть свой отступ снизу,
   вместе они давали полосу пустоты почти в половину экрана.
   Шапка лежит в <header>, разделы — в <main>, соседями они не являются. */
main > .page-section:first-child {
  padding-top: 54px;
}

.page-section--tight {
  padding: 60px 0;
}

.page-section--alt {
  background: var(--bg-secondary);
}

.page-section .container {
  max-width: 1600px;
}

.section-head {
  max-width: 900px;
  margin-bottom: 54px;
}

.section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Заголовок раздела держим мельче H1 в шапке — иначе он перетягивает
   внимание на себя и ломает видимую иерархию страницы. */
.section-head h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 1.9vw, 30px);
  line-height: 1.25;
  color: var(--text-main);
  margin: 0 0 16px;
  position: relative;
  padding-bottom: 14px;
}

.section-head h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 2px;
  background: var(--accent);
}

.section-head--center h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-head p {
  font-family: var(--font-text);
  font-size: clamp(14px, 1vw, 17px);
  line-height: 1.85;
  color: var(--text-muted);
  margin: 0;
}

.section-head p + p {
  margin-top: 16px;
}

/* Текстовый блок — основная типографика длинных текстов */
/* Длина строки — около 85–90 знаков: на широком экране абзацы растягивались
   на 900–1000 px (до 125 знаков), и глаз терял начало следующей строки.
   Ширину блока не трогаем, ограничиваем сам текст. Единица ch считается по
   ширине цифры «0», а кириллические буквы уже, поэтому чисел в ch меньше,
   чем ожидаемое число знаков. */
.content-prose {
  font-family: var(--font-text);
  font-size: clamp(14px, 0.95vw, 16.5px);
  line-height: 1.9;
  color: var(--text-muted);
}

.content-prose p,
.content-prose li,
.content-prose h3 {
  max-width: 66ch;
}

.content-prose p {
  margin-bottom: 20px;
}

.content-prose b,
.content-prose strong {
  color: var(--text-main);
  font-weight: 600;
}

.content-prose .accent-text,
.content-prose em {
  color: var(--accent);
  font-style: normal;
}

.content-prose h3 {
  font-family: var(--font-heading);
  font-size: clamp(19px, 1.5vw, 26px);
  color: var(--text-main);
  margin: 44px 0 18px;
}

.content-prose h4 {
  font-family: var(--font-text);
  font-size: clamp(16px, 1.1vw, 19px);
  font-weight: 600;
  color: var(--accent);
  margin: 32px 0 14px;
}

.content-prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(182, 138, 82, 0.35);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.content-prose a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
  text-decoration: none;
}

/* Списки с золотой галочкой */
.check-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 24px;
}

.check-list li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
  line-height: 1.75;
  color: var(--text-muted);
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(182, 138, 82, 0.55);
  border-radius: 50%;
  background:
    linear-gradient(transparent, transparent),
    radial-gradient(circle, rgba(182, 138, 82, 0.18) 0%, transparent 70%);
}

.check-list li::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 14px;
  width: 6px;
  height: 3px;
  border-left: 1.6px solid var(--accent);
  border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}

.check-list li b,
.check-list li strong {
  color: var(--text-main);
  font-weight: 600;
}

/* ==========================================================================
   3. АККОРДЕОН (услуги, вопросы-ответы)
   ========================================================================== */

.premium-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accordion-item {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.accordion-item:hover {
  border-color: rgba(182, 138, 82, 0.35);
}

.accordion-item.is-open {
  border-color: rgba(182, 138, 82, 0.5);
  background: linear-gradient(145deg, rgba(182, 138, 82, 0.07), rgba(255, 255, 255, 0.015));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 30px;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-text);
  font-size: clamp(15px, 1.15vw, 19px);
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--text-main);
  transition: color 0.3s ease;
}

.accordion-trigger:focus {
  outline: none;
}

.accordion-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.accordion-trigger:hover {
  color: var(--accent-hover);
}

.accordion-item.is-open .accordion-trigger {
  color: var(--accent);
}

.accordion-num {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 15px;
  color: rgba(182, 138, 82, 0.75);
  min-width: 28px;
}

.accordion-icon {
  flex-shrink: 0;
  margin-left: auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(182, 138, 82, 0.4);
  border-radius: 50%;
  position: relative;
  transition: background 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.35s ease;
}

.accordion-icon::before {
  width: 13px;
  height: 1.5px;
}

.accordion-icon::after {
  width: 1.5px;
  height: 13px;
}

.accordion-item.is-open .accordion-icon {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(180deg);
}

.accordion-item.is-open .accordion-icon::before,
.accordion-item.is-open .accordion-icon::after {
  background: #1f1f1f;
}

.accordion-item.is-open .accordion-icon::after {
  opacity: 0;
  transform: translate(-50%, -50%) scaleY(0);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-body {
  padding: 4px 30px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 0;
}

.accordion-body > *:first-child {
  margin-top: 22px;
}

.accordion-body p {
  font-family: var(--font-text);
  font-size: clamp(13.5px, 0.9vw, 15.5px);
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 18px;
  /* на широком экране строка растягивалась до 170 знаков — читать тяжело */
  max-width: 70ch;
}

.accordion-body b,
.accordion-body strong {
  color: var(--text-main);
  font-weight: 600;
}

.accordion-body ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 18px;
  columns: 2;
  column-gap: 44px;
}

.accordion-body ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: clamp(13px, 0.88vw, 15px);
  line-height: 1.7;
  color: var(--text-muted);
  break-inside: avoid;
}

.accordion-body ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
}

.accordion-body ul.single-column {
  columns: 1;
}

/* ==========================================================================
   4. КАРТОЧКИ НАПРАВЛЕНИЙ (сетка ссылок-якорей)
   ========================================================================== */

.anchor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.anchor-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  font-family: var(--font-text);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.35s ease;
}

.anchor-chip svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: var(--accent);
  stroke-width: 1.5;
  fill: none;
  transition: transform 0.35s ease;
}

.anchor-chip:hover {
  color: var(--text-main);
  text-decoration: none;
  border-color: rgba(182, 138, 82, 0.5);
  background: rgba(182, 138, 82, 0.08);
  transform: translateY(-3px);
}

.anchor-chip:hover svg {
  transform: scale(1.12);
}

/* ==========================================================================
   5. ТАБЛИЦА ЦЕН
   ========================================================================== */

.price-table-wrapper {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-text);
}

.price-table caption {
  caption-side: top;
  padding: 24px 30px;
  text-align: left;
  font-family: var(--font-heading);
  font-size: clamp(18px, 1.5vw, 24px);
  color: var(--text-main);
  background: rgba(182, 138, 82, 0.09);
  border-bottom: 1px solid rgba(182, 138, 82, 0.22);
}

.price-table thead th {
  padding: 20px 30px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.price-table thead th:last-child,
.price-table tbody td:last-child {
  text-align: right;
  white-space: nowrap;
}

.price-table tbody td {
  padding: 20px 30px;
  font-size: clamp(13.5px, 0.9vw, 15.5px);
  line-height: 1.7;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  transition: background 0.3s ease, color 0.3s ease;
}

.price-table tbody tr:last-child td {
  border-bottom: 0;
}

.price-table tbody tr:hover td {
  background: rgba(182, 138, 82, 0.06);
  color: var(--text-main);
}

.price-table .price-value {
  font-family: var(--font-heading);
  font-size: clamp(15px, 1.1vw, 19px);
  font-weight: 600;
  color: var(--accent);
}

.price-table .price-note {
  display: block;
  font-family: var(--font-text);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 4px;
}

.price-table tbody tr.price-group td {
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-main);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.price-disclaimer {
  margin-top: 26px;
  padding: 22px 26px;
  border-left: 2px solid var(--accent);
  background: rgba(182, 138, 82, 0.06);
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
}

/* Строка на всю ширину блока доходила до 160 знаков — ограничиваем текст,
   рамка и фон при этом остаются во всю ширину. */
.price-disclaimer p,
.note-box p,
.note-box {
  max-width: 70ch;
}

.price-disclaimer b {
  color: var(--text-main);
}

/* ==========================================================================
   6. КАРТОЧКИ ДЕЛ / ОПЫТА
   ========================================================================== */

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 22px;
}

.case-card {
  position: relative;
  padding: 30px 30px 30px 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.case-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.case-card:hover {
  transform: translateY(-6px);
  border-color: rgba(182, 138, 82, 0.4);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

.case-card:hover::before {
  opacity: 1;
}

.case-tag {
  display: inline-block;
  padding: 5px 13px;
  margin-bottom: 16px;
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(182, 138, 82, 0.11);
  border: 1px solid rgba(182, 138, 82, 0.26);
  border-radius: 2px;
}

.case-card h3 {
  font-family: var(--font-heading);
  font-size: clamp(17px, 1.25vw, 21px);
  line-height: 1.35;
  color: var(--text-main);
  margin: 0 0 14px;
}

.case-card p {
  font-family: var(--font-text);
  font-size: clamp(13px, 0.88vw, 15px);
  line-height: 1.8;
  color: var(--text-muted);
  margin: 0;
}

/* Блочный, а не flex: внутри идёт связный текст со ссылками на реестр,
   и во flex-контейнере каждая ссылка превращалась в отдельный элемент —
   предложение рвалось на строки посреди фразы. Галочка вынесена в поля. */
.case-result {
  display: block;
  position: relative;
  padding-left: 27px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-text);
  font-size: 13.5px;
  line-height: 1.65;
  font-weight: 600;
  color: var(--accent);
}

.case-result svg {
  position: absolute;
  left: 0;
  top: 18px;
  width: 17px;
  height: 17px;
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
}

/* Компактный список дел (много строк) */
.case-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: caselist;
}

/* На широком экране строка текста занимала меньше половины рамки, и справа
   внутри каждой карточки зияла пустота. Раскладываем список в две колонки —
   ширина используется целиком, а строки остаются короткими. */
@media (min-width: 1400px) {
  .case-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.case-row {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 22px 26px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 4px;
  transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s ease;
}

.case-row:hover {
  border-color: rgba(182, 138, 82, 0.35);
  background: rgba(182, 138, 82, 0.05);
  transform: translateX(5px);
}

.case-row::before {
  counter-increment: caselist;
  content: counter(caselist, decimal-leading-zero);
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 15px;
  color: rgba(182, 138, 82, 0.6);
  padding-top: 2px;
  min-width: 30px;
}

/* На широком экране строка тянулась на 1400 px — около 140 знаков,
   глаз теряет начало следующей строки. Держим удобную длину строки. */
.case-row-text {
  font-family: var(--font-text);
  font-size: clamp(13.5px, 0.9vw, 15.5px);
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 74ch;
}

.case-row-text b {
  color: var(--text-main);
  font-weight: 600;
}

/* ==========================================================================
   7. КОМАНДА
   ========================================================================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.member-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.member-card:hover {
  transform: translateY(-8px);
  border-color: rgba(182, 138, 82, 0.4);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.38);
}

.member-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #262626;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(35%) contrast(1.04);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.55s ease;
}

.member-card:hover .member-photo img {
  transform: scale(1.06);
  filter: grayscale(0%) contrast(1.06);
}

.member-photo::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: linear-gradient(180deg, transparent, rgba(34, 34, 34, 0.92));
  pointer-events: none;
}

.member-body {
  padding: 26px 26px 30px;
}

.member-name {
  font-family: var(--font-heading);
  font-size: clamp(18px, 1.35vw, 23px);
  color: var(--text-main);
  margin: 0 0 8px;
}

.member-role {
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.member-text {
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   8. ГАЛЕРЕЯ ДОСТИЖЕНИЙ / СЕРТИФИКАТОВ
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  background: #262626;
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%) brightness(0.92);
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s ease;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(182, 138, 82, 0.22));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  border-color: rgba(182, 138, 82, 0.5);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
}

.gallery-item:hover img {
  transform: scale(1.07);
  filter: grayscale(0%) brightness(1);
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Логотипы партнёров */
.partners-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.partner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  transition: border-color 0.35s ease, background 0.35s ease;
}

.partner-item img {
  max-width: 100%;
  max-height: 62px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(1.7) opacity(0.5);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.partner-item:hover {
  border-color: rgba(182, 138, 82, 0.35);
  background: rgba(182, 138, 82, 0.05);
}

.partner-item:hover img {
  filter: grayscale(0%) brightness(1) opacity(1);
  transform: scale(1.05);
}

/* ==========================================================================
   9. БЛОК СТАТИСТИКИ (переиспользует стиль trust-bar с главной)
   ========================================================================== */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.stats-cell {
  padding: 34px 24px;
  text-align: center;
  background: var(--bg-primary);
  transition: background 0.35s ease;
}

.stats-cell:hover {
  background: rgba(182, 138, 82, 0.07);
}

.stats-cell .number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 10px;
}

.stats-cell .label {
  display: block;
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ==========================================================================
   10. ПРИЗЫВ К ДЕЙСТВИЮ В КОНЦЕ СТРАНИЦЫ
   ========================================================================== */

.page-cta {
  position: relative;
  padding: 86px 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(182, 138, 82, 0.15) 0%, transparent 58%),
    linear-gradient(140deg, #2e2e2e 0%, #262626 100%);
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.page-cta .container {
  position: relative;
  z-index: 2;
  max-width: 1600px;
}

.page-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 46px;
  flex-wrap: wrap;
}

.page-cta-text {
  flex: 1 1 480px;
}

.page-cta h2 {
  font-family: var(--font-heading);
  font-size: clamp(21px, 1.8vw, 28px);
  line-height: 1.25;
  color: var(--text-main);
  margin: 0 0 16px;
}

/* 640px оставляли справа от текста полосу пустоты почти в треть блока.
   Даём тексту занимать своё место, но не длиннее удобных для чтения строк. */
.page-cta p {
  font-family: var(--font-text);
  font-size: clamp(14px, 1vw, 16.5px);
  line-height: 1.8;
  color: var(--text-muted);
  margin: 0;
  max-width: 62ch;
}

.page-cta p b {
  color: var(--text-main);
}

.page-cta p .accent-text {
  color: var(--accent);
}

.page-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.page-cta-actions .btn-premium {
  text-align: center;
  white-space: nowrap;
}

.cta-messengers {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.cta-messengers a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(182, 138, 82, 0.35);
  border-radius: 50%;
  color: var(--accent);
  transition: all 0.35s ease;
}

.cta-messengers a svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.cta-messengers a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #1f1f1f;
  transform: translateY(-3px);
  text-decoration: none;
}

/* Телефон крупно */
.cta-phone {
  font-family: var(--font-heading);
  font-size: clamp(20px, 1.7vw, 27px);
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  text-align: center;
  display: block;
}

.cta-phone:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ==========================================================================
   11. ВСПОМОГАТЕЛЬНОЕ
   ========================================================================== */

.gold-divider {
  width: 100%;
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, rgba(182, 138, 82, 0.35), transparent);
}

.note-box {
  padding: 26px 30px;
  background: rgba(182, 138, 82, 0.06);
  border: 1px solid rgba(182, 138, 82, 0.2);
  border-left-width: 2px;
  border-radius: 3px;
  font-family: var(--font-text);
  font-size: clamp(13.5px, 0.9vw, 15.5px);
  line-height: 1.85;
  color: var(--text-muted);
}

.note-box b {
  color: var(--text-main);
}

/* Кнопка-призрак рядом с .btn-premium */
.btn-ghost {
  display: inline-block;
  padding: 16px 40px;
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(182, 138, 82, 0.5);
  background: transparent;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.35s ease;
}

.btn-ghost:hover {
  background: rgba(182, 138, 82, 0.12);
  border-color: var(--accent);
  color: var(--accent-hover);
  text-decoration: none;
}

/* ==========================================================================
   12. АДАПТИВ
   ========================================================================== */

/* Планшет и небольшой ноутбук: карточки дел ужимались до ~317 px и текст
   внутри ложился в три-четыре слова на строку. Ставим две колонки. */
@media (min-width: 992px) and (max-width: 1199px) {
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Дел пять, колонки две — пятая карточка оставалась одна в ряду,
   а справа зияла пустая половина. Растягиваем её на обе колонки.
   От 2000 px колонок три, последний ряд заполнен и растягивать не нужно. */
@media (min-width: 768px) and (max-width: 1999px) {
  .case-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1199px) {
  .page-hero {
    padding: 88px 0 30px;
  }

  .page-section {
    padding: 74px 0;
  }
}

@media (max-width: 991px) {
  .page-hero {
    padding: 96px 0 28px;
  }

  .page-hero::before {
    width: 260px;
    height: 260px;
    top: -80px;
    right: -110px;
  }

  .page-section {
    padding: 62px 0;
  }

  .page-section--tight {
    padding: 46px 0;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .accordion-body ul {
    columns: 1;
  }

  .accordion-trigger {
    padding: 22px 24px;
    gap: 14px;
  }

  .accordion-body {
    padding: 4px 24px 26px;
  }

  .page-cta {
    padding: 62px 0;
  }

  .page-cta-inner {
    gap: 34px;
  }

  .page-cta-actions {
    width: 100%;
  }

  .page-cta-actions .btn-premium,
  .page-cta-actions .btn-ghost {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .page-hero {
    padding: 94px 0 26px;
  }

  .breadcrumbs {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .page-eyebrow {
    font-size: 11px;
    letter-spacing: 2.4px;
    margin-bottom: 10px;
  }

  .page-eyebrow::before {
    width: 26px;
  }

  .page-section {
    padding: 52px 0;
  }

  .accordion-trigger {
    padding: 20px 18px;
    gap: 12px;
    font-size: 15px;
  }

  .accordion-num {
    min-width: 22px;
    font-size: 13px;
  }

  .accordion-icon {
    width: 30px;
    height: 30px;
  }

  .accordion-body {
    padding: 4px 18px 24px;
  }

  .case-row {
    padding: 18px 18px;
    gap: 14px;
  }

  .case-row:hover {
    transform: none;
  }

  .case-card {
    padding: 24px 22px 24px 26px;
  }

  .member-body {
    padding: 22px 20px 26px;
  }

  .stats-cell {
    padding: 26px 16px;
  }

  .note-box,
  .price-disclaimer {
    padding: 20px 20px;
  }

  /* Таблица цен превращается в карточки */
  .price-table-wrapper {
    border: 0;
    background: none;
  }

  .price-table,
  .price-table caption,
  .price-table tbody,
  .price-table tr,
  .price-table td {
    display: block;
    width: 100%;
  }

  .price-table thead {
    display: none;
  }

  .price-table caption {
    padding: 20px 22px;
    border-radius: 4px 4px 0 0;
    border: 1px solid rgba(182, 138, 82, 0.22);
  }

  .price-table tbody tr {
    margin-bottom: 12px;
    padding: 18px 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 4px;
  }

  .price-table tbody td {
    padding: 0;
    border: 0;
  }

  .price-table tbody td:last-child {
    text-align: left;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    white-space: normal;
  }

  .price-table tbody tr:hover td {
    background: none;
  }

  .price-table tbody tr.price-group {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(182, 138, 82, 0.25);
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .partners-strip {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .partner-item {
    min-height: 90px;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .page-hero {
    padding: 92px 0 24px;
  }

  .page-hero h1 {
    font-size: 24px;
  }

  .case-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .anchor-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-messengers {
    flex-wrap: wrap;
  }
}

/* Крупные экраны — держим ритм главной */
@media (min-width: 2000px) {
  .page-hero {
    padding: 120px 0 48px;
  }

  .page-section {
    padding: 120px 0;
  }

  .page-cta {
    padding: 120px 0;
  }

  .accordion-trigger {
    padding: 32px 40px;
  }

  .accordion-body {
    padding: 4px 40px 40px;
  }
}

/* ==========================================================================
   13. ССЫЛКИ НА РЕЕСТР СУДЕБНЫХ РЕШЕНИЙ ВНУТРИ СПИСКА/КАРТОЧЕК ДЕЛ
   (страница "Досвід / Опыт" — .case-row-text и .case-card p содержат
   ссылки на reyestr.court.gov.ua, стилизуем их так же, как .content-prose a)
   ========================================================================== */

.case-row-text a,
.case-card p a,
.case-result a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(182, 138, 82, 0.35);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.case-row-text a:hover,
.case-card p a:hover,
.case-result a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
  text-decoration: none;
}

/* ==========================================================================
   14. КРУПНЫЕ ЭКРАНЫ: КАРТОЧКИ НЕ ДОЛЖНЫ РАЗДУВАТЬСЯ
   На 2K/4K сетки auto-fit растягивали карточки команды почти на пол-экрана,
   фото превращалось в огромный портрет. Ограничиваем ширину и центрируем.
   ========================================================================== */

.team-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 380px));
  justify-content: start;
}

.member-photo {
  aspect-ratio: 4 / 5;
}

@media (min-width: 1600px) {
  .team-grid {
    gap: 34px;
  }
}

/* Число колонок задаём явно. auto-fit с потолком 520 px оставлял справа
   пустую четверть экрана, а без потолка резал карточки до трёхсот пикселей.
   Длину строки внутри карточки ограничиваем отдельно. */
.case-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 2000px) {
  .case-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.case-card p,
.case-result {
  max-width: 74ch;
}

.case-row-text {
  max-width: 74ch;
}

.content-prose {
  max-width: 66ch;
}

.section-head p {
  max-width: 72ch;
}

.section-head--center p {
  margin-left: auto;
  margin-right: auto;
}

/* Плитка достижений: на широких экранах не даём картинкам разрастаться */
.gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 260px));
  justify-content: start;
}

@media (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .team-grid,
  .case-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   15. ЗАЩИТА ОТ ПЕРЕПОЛНЕНИЯ
   Длинные ссылки на реестр судебных решений и номера дел не переносились
   и распирали карточку; блок кнопок в призыве мог выехать за край экрана.
   ========================================================================== */

.case-card,
.case-row,
.case-result,
.case-row-text,
.page-cta-text,
.page-cta-actions {
  min-width: 0;
}

.case-result,
.case-row-text,
.case-card p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.case-result {
  flex-wrap: wrap;
}

.page-cta-actions {
  max-width: 100%;
}

.page-cta-actions .btn-premium,
.page-cta-actions .btn-ghost,
.page-cta-actions .cta-phone {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Карта в подвале: iframe с фиксированной шириной не должен распирать блок */
.map-wrapper,
.map-wrapper iframe {
  max-width: 100%;
}

/* Длинные слова («конфіденційності») не должны распирать заголовок на узких
   экранах, а декоративное пятно в шапке — вылезать за её границы.
   max-width здесь НЕ задаём: он перебивал ограничение ширины у .page-hero-inner
   и .page-hero-lead, и текст шапки растягивался под иконки соцсетей справа. */
.page-hero h1,
.page-hero-lead,
.page-hero-inner {
  overflow-wrap: break-word;
  word-break: break-word;
}

.page-hero::before {
  right: 0;
  transform: translate(35%, -25%);
}

/* ==========================================================================
   16. ПОДГОНКА ПОД РАЗМЕР ЭКРАНА
   До 1200px карточкам разрешаем растягиваться на всю колонку (иначе
   на планшете они жались влево, а справа зияла пустота). От 1600px
   поднимаем размер текста, иначе на 2K/4K он выглядит мелким.
   ========================================================================== */

@media (max-width: 1199px) {
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .case-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (min-width: 1600px) {
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 430px));
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 300px));
    gap: 22px;
  }

  .member-text,
  .accordion-body p,
  .accordion-body ul li,
  .case-row-text,
  .case-card p,
  .price-table tbody td,
  .note-box,
  .price-disclaimer,
  .stats-cell .label,
  .anchor-chip {
    font-size: 16px;
    line-height: 1.85;
  }

  .member-name {
    font-size: 24px;
  }

  .case-card h3 {
    font-size: 22px;
  }

  .page-cta p,
  .section-head p {
    font-size: 18px;
  }

  .content-prose {
    font-size: 17px;
  }

  .accordion-trigger {
    font-size: 20px;
  }
}

@media (min-width: 2400px) {
  .member-text,
  .accordion-body p,
  .accordion-body ul li,
  .case-row-text,
  .case-card p,
  .price-table tbody td,
  .note-box,
  .price-disclaimer {
    font-size: 17.5px;
  }

  .content-prose {
    font-size: 18.5px;
  }

  .page-cta p,
  .section-head p {
    font-size: 20px;
  }

  /* подзаголовок шапки не поднимаем — он должен оставаться мельче H1 */
  .page-hero-lead {
    font-size: 17px;
  }

  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 480px));
  }
}

/* Декоративное пятно держим внутри шапки: сдвиг вправо раздувал её
   собственную ширину прокрутки. Визуально почти то же самое. */
.page-hero::before {
  right: 0;
  transform: translateY(-22%);
}

/* На самых узких экранах (320px) карточки дел не должны иметь
   минимальную ширину больше самого экрана. */
@media (max-width: 767px) {
  .case-grid,
  .team-grid,
  .anchor-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
  }
}

/* Блок призыва на широких экранах: текст был зажат в 640px, из-за чего
   между ним и кнопкой зияла пустая полоса. */
@media (min-width: 1600px) {
  .page-cta p {
    max-width: 900px;
  }
}

@media (min-width: 3000px) {
  .page-cta p {
    max-width: 1200px;
  }

  .page-hero-inner {
    max-width: 1400px;
  }

  .page-hero-lead {
    max-width: 1200px;
  }
}
