/* === HERO SECTION === */

.hero-section {
    background-color: var(--color-background);
    padding: 40px 0 80px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    justify-content: space-between;
}

.hero-left {
    flex: 1 1 600px;
    min-width: 300px;
}

.hero-title {
    font-family: 'Roboto Thin', sans-serif;
    font-size: 2.8rem;
    color: var(--color-foreground);
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out forwards;
    animation-fill-mode: forwards;
}

.hero-subtitle {
    /* Добавляем стиль подзаголовка в hero-блоке главной, чтобы текст совпадал с типографикой сайта. */
    font-family: 'Raleway Regular', sans-serif;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--color-foreground);
    margin: -10px 0 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
    animation-fill-mode: forwards;
}

/* Добавляем стили для кликабельного чипа в hero-подзаголовке, чтобы подсказка выглядела как часть текста. */
.hero-inline-chip {
    /* Делаем чип flex-контейнером, чтобы текст и info-иконка оставались в одном потоковом ряду на главной при переносе строки. */
    align-items: center;
    background-color: transparent;
    border: 1px solid var(--color-primary);
    border-radius: 999px;
    color: var(--color-foreground);
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    /* Уменьшаем размер шрифта на 1px относительно подзаголовка, чтобы чип в hero-подзаголовке выглядел компактнее. */
    font-size: calc(1em - 1px);
    line-height: 1.2;
    margin: 0 4px;
    padding: 0 8px;
    vertical-align: baseline;
}

/* Добавляем inline-flex-обёртку текста чипа с иконкой, чтобы держать базовую линию и управлять выравниванием в hero/extension чипах на главной. */
.chip-inline-content {
    /* Переводим связку текста и info-иконки на центральное выравнивание, чтобы иконка не "уезжала" при двухстрочном тексте на CTA-чипе главной. */
    align-items: center;
    /* Управляем отступом между текстом и info-иконкой через gap вместо ручного margin у SVG в CTA-чипе главной. */
    gap: 0.3em;
    display: inline-flex;
    line-height: 1;
}

/* Добавляем компактный размер и отступ для info-иконки внутри чипа, чтобы SVG оставался частью текста и не доминировал визуально. */
.chip-info-icon {
    /* Фиксируем info-иконку как мини-контейнер с центрированием, чтобы геометрия SVG была стабильной в CTA-чипе на главной. */
    align-items: center;
    color: rgba(255, 255, 255, 0.72);
    display: inline-flex;
    flex: 0 0 auto;
    height: 0.95em;
    justify-content: center;
    line-height: 1;
    width: 0.95em;
}

/* Добавляем hover/focus-состояния чипа, чтобы подчеркнуть интерактивность без разрыва строки. */
.hero-inline-chip:hover,
.hero-inline-chip:focus {
    background-color: var(--color-primary);
    color: var(--color-background);
    outline: none;
}

/* Синхронизируем оттенок info-иконки с состояниями чипа, чтобы на hover/focus/active сохранялась читаемость и единая палитра темы. */
.hero-inline-chip:hover .chip-info-icon,
.hero-inline-chip:focus .chip-info-icon,
.hero-inline-chip:active .chip-info-icon {
    color: rgba(10, 10, 10, 0.78);
}

/* Добавляем скрытый по умолчанию inline-текст ремарки, чтобы показывать его по клику в hero-подзаголовке. */
.hero-inline-note {
    background-color: rgba(255, 72, 0, 0.12);
    border-radius: 8px;
    display: none;
    font-size: 0.95em;
    margin-left: 8px;
    padding: 2px 6px;
}

/* Показываем inline-ремарку после клика, чтобы сохранялся "встроенный" характер подсказки. */
.hero-inline-note.is-visible {
    display: inline-block;
}

/* Добавляем стили для расширенной панели заметки в блоке extension на главной странице. */
.extension-inline-note {
    display: none;
    margin-top: 16px;
    padding: 12px 16px;
    background-color: rgba(255, 72, 0, 0.12);
    border-radius: 8px;
}

/* Показываем панель заметки в extension после клика на чип, чтобы текст был читаемым блоком. */
.extension-inline-note.is-visible {
    display: block;
}

/* Уточняем отступы абзацев в панели extension, чтобы сохранить аккуратный вертикальный ритм. */
.extension-inline-note p {
    margin: 0 0 10px 0;
}

/* Убираем нижний отступ у последнего абзаца, чтобы панель не выглядела разорванной. */
.extension-inline-note p:last-child {
    margin-bottom: 0;
}

.hero-subtext p {
    font-family: 'Raleway Regular', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
    animation-fill-mode: forwards;
}

.hero-subtext p:nth-child(1) { animation-delay: 0.5s; }
.hero-subtext p:nth-child(2) { animation-delay: 0.8s; }
.hero-subtext p:nth-child(3) { animation-delay: 1.1s; }
.hero-subtext p:nth-child(4) { animation-delay: 1.4s; }

.cta-button {
    /* Оставляем на front-page.php только локальный вертикальный отступ CTA, а shell/hover теперь приходят из глобального .cta-button в global.css. */
    margin-top: 30px;
}

.highlight {
    color: var(--color-primary);
}

/* === RIGHT BLOCK: SVG Ommaje === */

.hero-right {
    flex: 1 1 300px;
    text-align: right;
    padding-right: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.hero-ommaje-svg {
    max-width: 100%;
    height: auto;
    margin-top: 200px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSVG 1.4s ease-out 1.6s forwards;
    animation-fill-mode: forwards;
}

/* === ANIMATIONS === */

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInSVG {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === ADAPTIVE === */

@media (max-width: 768px) {
    /* Уменьшаем нижний отступ hero на мобильных, чтобы интервал до SVG выглядел компактнее. */
    .hero-section {
        padding-bottom: 50px;
    }

    .hero-grid {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-right {
        justify-content: flex-start;
        text-align: left;
        padding-right: 0;
        margin-top: 30px;
    }

    .hero-ommaje-svg {
        max-width: 400px;
        margin-top: 20px;
    }

    /* Снижаем верхний отступ блока расширения на мобильных, чтобы вертикальный ритм совпал с hero. */
    .dst-extension-block {
        padding-top: 60px;
    }
}

/* === Extension SECTION === */
.dst-extension-block {
    background-color: var(--color-background);
    color: var(--color-foreground);
    padding: 80px 20px;
}

.extension-container {
    max-width: 1200px;
    margin: 0 auto;
}

.extension-title {
    font-family: 'Roboto Thin', sans-serif;
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: left;
    color: var(--color-foreground);
}

.extension-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.extension-card {
    border-left: 4px solid var(--color-primary);
    padding: 20px 25px;
    background-color: rgba(255, 255, 255, 0.02);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.extension-card:hover {
    transform: translateY(-4px);
    background-color: rgba(255, 255, 255, 0.04);
}

.extension-card h3 {
    font-family: 'Roboto Regular', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--color-primary);
}

.extension-card p {
    font-family: 'Raleway Regular', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

/* Добавляем небольшой верхний отступ для кнопки в карточках extension, чтобы визуально отделить ее от текста на главной странице. */
.extension-inline-chip {
    margin-top: 4px;
}

/* === HOW WE WORK – Карточки с номерами === */
.how-we-work {
  background-color: var(--color-background);
  padding: 100px 0;
}

.how-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.how-we-work-title {
  font-family: 'Roboto Thin', sans-serif;
  font-size: 2.4rem;
  margin-bottom: 60px;
  text-align: center;
  color: var(--color-foreground);
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
}

/* Уточняем сетку карточек на планшетах, чтобы удержать две колонки для секции How We Work. */
@media (min-width: 768px) and (max-width: 1023px) {
  .how-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

/* Фиксируем 2x2 раскладку на десктопе для секции How We Work. */
@media (min-width: 1024px) {
  .how-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

.how-step {
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  border-radius: 12px;
  padding: 0; /* Move spacing to card faces so the flip layout can stack front/back content. */
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  perspective: 1000px; /* Add perspective to enable 3D flip depth for the How We Work cards. */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden; /* Clip card faces to the rounded corners during flips. */
}

.how-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.how-step:focus-visible {
  outline: 2px solid var(--color-accent); /* Add visible focus styles for keyboard navigation on cards. */
  outline-offset: 4px; /* Offset outline to keep it visible around the card radius. */
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d; /* Preserve 3D children so front/back faces can flip. */
  transform: rotateY(180deg); /* Показываем обложку (back face) по умолчанию, чтобы карточка стартовала "рубашкой" к пользователю. */
  transition: transform 0.6s ease; /* Animate flips for cards unless reduced motion is enabled. */
}

.card-face {
  padding: 30px 25px 30px 50px; /* Match the original card padding on both faces. */
  backface-visibility: hidden; /* Hide the reverse face when rotated. */
}

.card-front {
  position: relative; /* Let the front face define the card height for How We Work content. */
  transform: rotateY(0deg); /* Keep the front content visible by default. */
}

.card-back {
  position: absolute; /* Keep the back face layered for flips while front sets height. */
  inset: 0; /* Stretch the back face to the card bounds during flips. */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center; /* Center the cover-state text on the back face. */
  transform: rotateY(180deg); /* Rotate the back face so it shows after flip. */
}

.card-label {
  font-family: 'Roboto Regular', sans-serif;
  font-size: 1.2rem;
  margin: 0 0 12px;
  color: var(--color-primary); /* Mirror headline styling for the back label. */
}

.card-cta {
  font-family: 'Raleway Regular', sans-serif;
  font-size: 0.95rem;
  margin: 0;
  color: var(--color-foreground);
  opacity: 0.7; /* Tone down the CTA to keep the label primary. */
}

.how-step.is-flipped .card-inner {
  transform: rotateY(0deg); /* Разворачиваем лицевую сторону при активации карточки. */
}

.step-number {
  position: absolute;
  top: 10px;
  left: 17px;
  font-family: 'Roboto Thin', sans-serif;
  font-size: 1.5rem;
  color: var(--color-accent);
  opacity: 0.4;
}

.how-step h3 {
  font-family: 'Roboto Regular', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--color-primary);
}

.how-step p {
  font-family: 'Raleway Regular', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-foreground);
}

@media (prefers-reduced-motion: reduce) {
  .card-inner {
    transition: none; /* Disable flip animation for reduced-motion users. */
    transform: none; /* Keep the inner wrapper flat without 3D rotation. */
  }

  .card-face {
    transition: none; /* Remove transitions so card content switches instantly. */
  }

  .card-front,
  .card-back {
    transform: none; /* Remove 3D rotation for both faces in reduced motion. */
  }

  .card-front {
    opacity: 0; /* Скрываем лицевую сторону по умолчанию при reduced motion, чтобы обложка была видна. */
  }

  .card-back {
    opacity: 1; /* Показываем обложку по умолчанию без анимации. */
  }

  .how-step.is-flipped .card-front {
    opacity: 1; /* Показываем лицевую сторону при активации карточки. */
  }

  .how-step.is-flipped .card-back {
    opacity: 0; /* Скрываем обложку после активации карточки. */
  }
}

/* === WHAT WE DO SECTION === */
.what-we-do {
background-color: #141914;
padding: 100px 0;
}

.what-we-do .container {
max-width: 1000px;
margin: 0 auto;
padding: 0 20px;
}

.what-we-do h2 {
font-family: 'Roboto Thin', sans-serif;
font-size: 2.4rem;
color: var(--color-foreground);
margin-bottom: 40px;
text-align: center;
}

/* Align typography for What we do body copy so the new list and panels stay consistent. */
.what-we-do p {
font-family: 'Raleway Regular', sans-serif;
font-size: 1.05rem;
line-height: 1.6;
color: var(--color-foreground);
margin-bottom: 20px;
}

/* Highlight the new What we do subheading as a lead-in to the capability list. */
.whatwedo-subheading {
  font-family: 'Raleway Regular', sans-serif;
  font-size: 1.2rem;
  color: var(--color-foreground);
  text-align: center;
  margin: 0 0 30px;
}

@media (max-width: 768px) {
.what-we-do h2 {
font-size: 2rem;
}
  /* Scale the What we do subheading for smaller screens. */
  .whatwedo-subheading {
    font-size: 1.1rem;
  }
}
/* Define the compact capability list layout for the new What we do section content. */
.whatwedo-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
  display: grid;
  gap: 14px;
}

/* Turn each capability line into a boxed element to match the hoverable card styling. */
.whatwedo-item {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 14px 18px;
  background-color: rgba(255, 255, 255, 0.02);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Highlight the capability labels inside the boxed items without changing copy. */
.whatwedo-item-label {
  color: var(--color-primary);
  font-weight: 600;
  margin-right: 6px;
}

/* Emphasize the capability labels while keeping the list compact. */
.whatwedo-list strong {
  color: var(--color-primary);
  font-weight: 600;
}

/* Shared scenario/chapter control pattern for Services + Front Page + Why: What we do keeps local spacing while the button visuals now come from global base classes. */
.whatwedo-scenario-buttons {
  margin-bottom: 24px;
}

/* Style the expandable What we do panels as soft explanation blocks, not cards. */
.whatwedo-panel {
  background-color: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  display: none;
}

/* Keep the panel group aligned with the section width after moving it below the grid. */
.whatwedo-panels {
  margin-top: 12px;
}

/* Reveal the active What we do panel when the inline note is toggled. */
.whatwedo-panel.is-visible {
  display: block;
}

/* Add consistent spacing for the audit CTA inside the What we do panels. */
.whatwedo-audit-cta {
  margin-top: 12px;
}

@media (min-width: 1024px) {
  /* Create a two-column desktop layout for the What we do list and actions while keeping mobile flow. */
  .whatwedo-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 56px;
    align-items: start;
    max-width: 1120px;
    margin: 0 auto;
  }

  /* Align desktop column text to the left to balance the two-column layout. */
  .whatwedo-capabilities,
  .whatwedo-actions {
    text-align: left;
  }

  /* Vertically center the scenario buttons against the taller left column on desktop. */
  .whatwedo-actions {
    align-self: center;
    justify-self: end;
  }

  /* Align the scenario button stack to the left while keeping it anchored to the right column. */
  .whatwedo-actions .scenario-buttons-base {
    justify-content: flex-start;
    margin-bottom: 0;
  }

  /* Limit the panel width to the same content max-width when it sits below both columns. */
  .whatwedo-panels {
    max-width: 1120px;
    margin: 12px auto 0;
  }
}

@media (hover: hover) and (pointer: fine) {
  /* Add a lift-on-hover effect to capability boxes on desktop-style devices. */
  .whatwedo-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  }
}

@media (max-width: 768px) {
  .what-we-do {
    padding-bottom: 40px !important; /* подними при необходимости до 100–120px */
  }
}

/* === CASES === */
.dst-cases {
  padding: 100px 20px;
  background-color: var(--color-background);
}

.cases-title {
  font-family: 'Roboto Thin', sans-serif;
  font-size: 2.4rem;
  margin-bottom: 60px;
  text-align: center;
  color: var(--color-foreground);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }
}

.case-card {
  background-color: rgba(255, 255, 255, 0.03); /* тёмная карточка с прозрачностью */
  border-left: 3px solid var(--color-primary);
  padding: 30px;
  border-radius: 12px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.case-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.05);
}

.case-card h3 {
  font-family: 'Roboto Regular', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--color-primary);
}

.case-card p {
  font-family: 'Raleway Regular', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-foreground);
}

.case-link {
  display: inline-block;
  margin-top: 15px;
  color: var(--color-primary);
  font-weight: bold;
  text-decoration: none;
}

.case-link:hover {
  color: var(--color-accent);
}

.more-cases {
  text-align: center;
  margin-top: 60px;
}
	  
/* === TEAM === */
.dst-team {
  padding: 100px 20px;
  background-color: var(--color-background);
}

.team-title {
  font-family: 'Roboto Thin', sans-serif;
  font-size: 2.4rem;
  color: var(--color-foreground);
  margin-bottom: 16px; /* Adjust spacing to fit the new team note beneath the heading on the front page. */
  text-align: center;
}

/* Bordered note under the Team heading to emphasize the small, highly involved team on the front page. */
.team-note {
  /* Оставляем только уникальные отступы для team-note, а базовые рамки и ширину задаёт note-box. */
  margin: 16px auto 24px;
  padding: 18px 20px;
}

/* Emphasize highlighted phrase inside the team note without affecting global strong styles. */
.team-note strong {
  font-weight: 700;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 40px;
  justify-content: center;
}

.team-member {
  background-color: rgba(255, 255, 255, 0.03);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.team-member:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Внутренние элементы — анимируем поочерёдно */
.team-avatar-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px auto;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Staggered delay по каждому элементу */
.team-grid .team-member:nth-child(1) .team-avatar-wrapper,
.team-grid .team-member:nth-child(1) h3,
.team-grid .team-member:nth-child(1) p {
  animation-delay: 0.2s;
}
.team-grid .team-member:nth-child(2) .team-avatar-wrapper,
.team-grid .team-member:nth-child(2) h3,
.team-grid .team-member:nth-child(2) p {
  animation-delay: 0.4s;
}
.team-grid .team-member:nth-child(3) .team-avatar-wrapper,
.team-grid .team-member:nth-child(3) h3,
.team-grid .team-member:nth-child(3) p {
  animation-delay: 0.6s;
}

/* Framed expertise note placed after the Team section on the front page to answer scope concerns and route to Why Us. */
.expertise-note {
  /* Сохраняем уникальную компоновку expertise-note, базовые рамки и ширину задаёт note-box. */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Reset paragraph spacing inside the expertise note so vertical rhythm is controlled by gap. */
.expertise-note p {
  margin: 0;
}

/* Keep the CTA aligned with the framed note spacing on the front page. */
.expertise-note .cta-button {
  margin-top: 0;
  display: inline-block;
}

@supports not (gap: 1rem) {
  /* Provide a fallback spacing model for the expertise note when flex gap is unavailable. */
  .expertise-note p + p,
  .expertise-note p + .cta-button {
    margin-top: 16px;
  }
}

/* Ключевые кадры */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
/* === КАК РАСТЕМ === */
.dst-growth {
  /* Переносим горизонтальные отступы в локальный .container, чтобы секция growth следовала общей сетке соседних блоков front-page.php. */
  padding: 100px 0;
  background-color: var(--color-background);
}

.dst-growth .container {
  /* Добавляем scoped-контейнер внутри .dst-growth, чтобы выровнять сертификаты и контент по той же дизайн-сетке, что и соседние секции главной. */
  max-width: 1000px;
  margin: 0 auto;
  padding-inline: 20px;
}

.growth-title {
  font-family: 'Roboto Thin', sans-serif;
  font-size: 2.4rem;
  color: var(--color-foreground);
  margin-bottom: 60px;
  text-align: center;
}

.growth-content {
  max-width: 800px;
  margin: 0 auto 40px;
  font-family: 'Raleway Regular', sans-serif;
  color: var(--color-foreground);
  font-size: 1.05rem;
  line-height: 1.7;
}

.growth-content strong {
  color: var(--color-primary);
}

.growth-books {
  margin-bottom: 60px;
}

.subblock-title {
  font-family: 'Roboto Regular', sans-serif;
  font-size: 1.4rem;
  color: var(--color-primary);
  margin-bottom: 20px;
  text-align: center;
}

.book-list {
  list-style: none;
  padding: 20px 30px;
  max-width: 600px;
  margin: 0 auto;
  cursor: default;

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.02);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.book-list:hover {
  background-color: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 15px rgba(255, 72, 0, 0.1);
}

.book-list li {
  margin-bottom: 12px;
  font-family: 'Raleway Regular', sans-serif;
  color: var(--color-foreground);
  font-size: 1rem;
  padding-left: 1.8em; /* Увеличиваем отступ слева под SVG-маркер списка для секции "How we grow / What we read" на front-page.php. */
  position: relative;
  transition: color 0.3s ease;
}

.book-list li::before {
  content: ""; /* Заменяем текстовый маркер на SVG-иконку списка для секции "How we grow / What we read" на front-page.php. */
  position: absolute;
  left: 0;
  width: 1.1em; /* Задаем ширину маркера, чтобы SVG совпадал с прежним размером иконки в секции "How we grow / What we read" на front-page.php. */
  height: 1.1em; /* Задаем высоту маркера, чтобы SVG совпадал с прежним размером иконки в секции "How we grow / What we read" на front-page.php. */
  top: 0.35em; /* Опускаем SVG-маркер, чтобы он выравнивался по центру строки списка в секции "How we grow / What we read" на front-page.php. */
  display: inline-block; /* Включаем блочный контекст для корректного отображения SVG-маркера в секции "How we grow / What we read" на front-page.php. */
  background-image: url("../images/decoration/layers.svg"); /* Подключаем SVG-маркер вместо текста в списке секции "How we grow / What we read" на front-page.php. */
  background-repeat: no-repeat; /* Запрещаем повтор SVG-маркера в списке секции "How we grow / What we read" на front-page.php. */
  background-size: contain; /* Масштабируем SVG-маркер без обрезки для списка секции "How we grow / What we read" на front-page.php. */
}

/* Мерцание при наведении на конкретный элемент */
.book-list li:hover {
  animation: flicker 1.2s infinite;
  color: var(--color-primary);
}

/* Meta-note */
.book-list .meta-note {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Ключевые кадры — мерцание */
@keyframes flicker {
  0%, 100% { opacity: 1; }
  40% { opacity: 0.85; }
  60% { opacity: 0.6; }
  80% { opacity: 0.9; }
}

.growth-certificates {
  margin-top: 60px;
}

/* Awards note: keep the note readable and aligned with front-page section spacing. */
.awards-note {
  margin-top: 32px;
  /* Делаем блок awards-note flex-контейнером, чтобы вертикальные интервалы и центрирование не зависели от inline-flow. */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  /* Снимаем любые фиксированные ограничения по высоте awards-note, чтобы рамка охватывала текст и CTA на мобильных. */
  height: auto;
  max-height: none;
  overflow: visible;
  /* Базовые рамки, выравнивание и padding для awards-note задаёт note-box. */
}

/* Обнуляем margin у абзацев в awards-note, чтобы вертикальный ритм контролировался через gap. */
.awards-note p {
  margin: 0;
}

.awards-note .cta-button {
  /* Убираем верхний margin у CTA в awards-note, чтобы расстояние контролировалось через gap. */
  margin-top: 0;
  /* Keep the CTA inline-block so it centers within the awards note on the front page. */
  display: inline-block;
}

@supports not (gap: 1rem) {
  /* Fallback для awards-note на главной: задаём отступы между абзацами и CTA, когда flex-gap не поддерживается. */
  .awards-note p + p,
  .awards-note p + .cta-button {
    margin-top: 16px;
  }
}

@media (max-width: 768px) {
  .awards-note {
    /* Сохраняем симметричный нижний padding awards-note на мобильных без раздувания отступа. */
    padding-bottom: 20px;
  }
}

@media (min-width: 1024px) {
  .awards-note {
    /* Убираем минимальную высоту awards-note на десктопе, чтобы отступ от кнопки до рамки был симметричен верхнему. */
    min-height: unset;
  }
}

.cert-grid {
  display: grid;
  /* Делаем 2x2 сетку сертификатов на десктопе, чтобы убрать пустоты в блоке Certificates & practice. */
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  justify-items: center;
  align-items: center;
}

/* Фиксируем единую геометрию карточки сертификата в колонке, чтобы img и picture занимали одинаковую ширину на front-page и в details-сетке. */
.cert-grid > * {
  width: 100%;
  max-width: 360px;
}

/* Нормализуем поведение picture в карточке сертификата: контейнер тянется на всю ширину grid-item и не даёт перекосов по боковым отступам. */
.cert-grid picture {
  display: block;
  width: 100%;
}

.cert-grid img {
  /* Привязываем изображение к ширине grid-item, чтобы карточки в обеих сетках оставались симметричными слева/справа. */
  width: 100%;
  max-width: 100%;
  display: block;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

@media (min-width: 1025px) {
  .cert-grid > * {
    /* Закрепляем desktop-ширину карточки через max-width у grid-item, чтобы picture и img масштабировались синхронно в каждой колонке. */
    max-width: 320px;
  }
}

.cert-grid img:hover {
  transform: scale(1.03);
}

/* Блок переключателя сертификатов: выравниваем пояснение и раскрывающийся список на главной странице. */
.certificates-toggle {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Пояснительный текст о RU-сертификатах держим читаемым и в общем ритме секции. */
.certificates-helper {
  max-width: 640px;
  margin: 0;
  text-align: center;
  opacity: 0.8;
}

/* Готовим контейнер details, чтобы сетка раскрытых сертификатов занимала полную ширину секции. */
.certificates-details {
  /* Центрируем кнопку summary без применения CTA-класса, сохраняя контент раскрытия на всю ширину. */
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Стилизуем summary под компактный переключатель (без CTA-класса), чтобы он оставался частью UI главной. */
.certificates-summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Убираем маркер summary во всех браузерах, чтобы оставить только текст. */
.certificates-summary::-webkit-details-marker {
  display: none;
}

/* Убираем маркер summary для современных браузеров, поддерживающих ::marker. */
.certificates-summary::marker {
  display: none;
}

/* Добавляем hover и focus-visible, чтобы мышиный клик не оставлял "залипшее" состояние после закрытия details на главной. */
.certificates-summary:hover,
.certificates-summary:focus-visible {
  background-color: var(--color-accent);
  color: var(--color-background);
  outline: none;
}

/* Добавляем отступ между summary и раскрытой сеткой сертификатов. */
.certificates-details .cert-grid {
  margin-top: 20px;
}

@media (max-width: 600px) {
  .cert-grid {
    grid-template-columns: 1fr;
  }
}
/* === Niches === */
/* === Подзаголовок под заголовком секции === */
.niches-subtitle {
  font-family: 'Roboto Regular', sans-serif; /* Подзаголовочный шрифт */
  font-size: 1.2rem;
  margin-bottom: 20px; /* Отступ снизу до следующего элемента */
  color: var(--color-foreground); /* Цвет текста из палитры DST */
  text-align: center; /* Центрирование текста */
}

/* === Кнопка (ранее использовалась для показа списка ниш) === */
.niche-button {
  background-color: transparent; /* Прозрачный фон */
  border: 1px solid var(--color-accent); /* Акцентная рамка */
  color: var(--color-accent); /* Цвет текста соответствует акценту */
  padding: 8px 16px; /* Внутренние отступы */
  border-radius: 20px; /* Скругление углов */
  cursor: pointer; /* Курсор в виде руки при наведении */
  transition: background-color 0.3s ease, color 0.3s ease; /* Плавность при наведении */
}

/* === Стили для hover-состояния кнопки === */
.niche-button:hover {
  background-color: var(--color-accent); /* Заливка акцентом */
  color: var(--color-background); /* Текст контрастный по отношению к фону */
}

/* === Блок текста со списком ниш, скрыт по умолчанию === */
.niche-list {
  max-height: 0; /* Скрываем блок, но не через display, чтобы анимация сработала */
  opacity: 0; /* Прозрачность = невидим */
  overflow: hidden; /* Скрываем внутренний текст */
  pointer-events: none; /* Элемент не кликабелен */
  transform: translateY(10px); /* Чуть смещён вниз для эффекта появления */
  transition: 
    opacity 0.5s ease,
    max-height 0.5s ease,
    transform 0.5s ease; /* Плавная анимация всех трёх свойств */
  
  margin-top: 20px;
  font-family: 'Raleway Regular', sans-serif; /* Основной текст */
  font-size: 0.95rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-foreground); /* Цвет текста */
  line-height: 1.6;
  background: rgba(255,255,255,0.05); /* Светлый прозрачный фон */
  border: 1px solid var(--color-accent); /* Акцентная рамка */
  border-radius: 12px;
  padding: 20px;
}

#niche-pie-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* === Когда добавлен класс .visible — блок раскрывается === */
.niche-list.visible {
  max-height: 1000px; /* Достаточно большое значение, чтобы влез весь контент */
  opacity: 1; /* Становится видимым */
  pointer-events: auto; /* Снова кликабелен */
  transform: translateY(0); /* Возвращается на место */
}


/* === SVG-элемент круговой диаграммы === */
.niche-pie {
  width: 260px;
  height: 260px;
  display: block;
  margin: 0 auto 20px;
  animation: pulse 2.8s infinite ease-in-out; /* Постоянная пульсация */
  transition: transform 0.4s ease; /* Увеличение при наведении */
}

/* === Эффект при наведении на диаграмму === */
.niche-pie:hover {
  transform: scale(1.04); /* Немного увеличивается */
}

.niche-pie-hint {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translate(122px, -8px) rotate(180deg);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.niche-pie-hint-icon {
  width: 30px;
  height: 30px;
  fill: #ff4800;
  filter: drop-shadow(0 0 6px rgba(255, 72, 0, 0.45));
  transform-origin: 50% 50%;
  animation: hint-bob 2s ease-in-out infinite;
}

/* === Анимация пульсации круга === */
@keyframes pulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px var(--color-accent));
  }
  50% {
    transform: scale(1.015);
    filter: drop-shadow(0 0 8px var(--color-accent)); /* Свечение */
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px var(--color-accent));
  }
}

@keyframes hint-bob {
  0% {
    transform: translate(-3px, 2px) rotate(-18deg) scale(1);
  }
  50% {
    transform: translate(1px, -6px) rotate(-22deg) scale(1.08);
  }
  100% {
    transform: translate(-3px, 2px) rotate(-18deg) scale(1);
  }
}

/* === Заголовок секции === */
.niches-title {
  font-family: 'Roboto Thin', sans-serif; /* Тонкий заголовок */
  font-size: 2.4rem;
  text-align: center;
}

/* === Легенда под диаграммой (ul список) === */
.niche-legend {
  list-style: none; /* Убираем маркеры */
  padding: 0;
  margin: 20px auto;
  text-align: center;
}

/* === Элемент легенды (li) === */
.niche-legend li {
  margin: 6px 0;
  font-family: 'Raleway Regular', sans-serif;
  font-size: 0.95rem;
  color: var(--color-foreground);
  animation: legend-flash 2s infinite; /* Мерцание цвета */
}

/* === Маленькие цветные кружки в легенде === */
.color-box {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  border: 1px solid #0e140e; /* Тёмно-зелёный контур */
}

/* === Анимация мерцания цветов у легенды === */
@keyframes legend-flash {
  0%   { color: #ffffff; }
  33%  { color: #ff4800; } /* Оранжевый DST */
  66%  { color: #ffb4b0; } /* Светло-розовый DST */
  100% { color: #ffffff; }
}

/* === Анимация плавного появления блока со списком ниш === */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .niche-list {
    padding-left: 16px;
    padding-right: 16px;
  }

  .niche-pie-hint {
    top: 12px;
    transform: translate(122px, -8px) rotate(180deg);
  }

  .niche-pie-hint-icon {
    width: 26px;
    height: 26px;
  }
}

/* === TESTIMONIALS === */
.dst-testimonials {
  padding: 100px 20px 20px; /* Уменьшен нижний паддинг */
  background-color: var(--color-background);
}

.testimonial-title {
  font-family: 'Roboto Thin', sans-serif;
  font-size: 2.4rem;
  color: var(--color-foreground);
  margin-bottom: 60px;
  text-align: center;
}

.testimonial-card {
  background-color: rgba(255,255,255,0.02);
  border-left: 3px solid var(--color-primary);
  padding: 20px 25px;
  border-radius: 10px;
  margin-bottom: 40px;
  font-family: 'Raleway Regular', sans-serif;
  color: var(--color-foreground);
  position: relative;
}

.quote-preview p {
  margin-bottom: 10px;
}

.quote-full {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.readmore-toggle {
  display: none;
}

.readmore-toggle:checked ~ .quote-full {
  max-height: 2000px;
  margin-top: 10px;
}

.readmore-label {
  display: block;
  margin-top: 10px;
  text-align: right;
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: underline;
  color: var(--color-primary);
  transition: color 0.3s ease;
}

.readmore-label:hover {
  color: var(--color-accent);
}

/* Перевели подпись toggle в testimonials на английский, чтобы UI был в едином языке на главной. */
.readmore-label::after {
  content: "Read more";
}

/* Перевели активное состояние toggle на английский для консистентной локали интерфейса. */
.readmore-toggle:checked ~ .readmore-label::after {
  content: "Hide";
}

/* === CTA + Цены === */
.dst-pricing {
  padding: 100px 20px;
  background-color: var(--color-background);
}

.pricing-title {
  font-family: 'Roboto Thin', sans-serif;
  font-size: 2.4rem;
  color: var(--color-foreground);
  margin-bottom: 40px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.pricing-item {
  background-color: rgba(255, 255, 255, 0.02);
  padding: 30px;
  border-radius: 12px;
  border-left: 3px solid var(--color-primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.pricing-item h3 {
  font-family: 'Roboto Regular', sans-serif;
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.price {
  font-size: 1.2rem;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.desc {
  font-size: 1rem;
  color: var(--color-foreground);
  line-height: 1.6;
}

.pricing-cta,
.pricing-footnote {
  font-family: 'Raleway Regular', sans-serif;
  font-size: 1.05rem;
  color: var(--color-foreground);
  max-width: 800px;
  margin: 0 auto 25px;
  line-height: 1.7;
}

.pricing-footnote em {
  color: var(--color-accent);
  font-style: italic;
}

.inline-link {
  color: var(--color-primary);
  text-decoration: underline;
}

.inline-link:hover {
  color: var(--color-accent);
}

.cta-center {
  text-align: center;
  margin-top: 30px;
}

/* Удаляем дублирующий CTA-блок для нижних секций front-page.php: единая база и hover уже централизованы в assets/css/global.css, чтобы исключить расхождение состояний. */

/* === ВСПОМОГАТЕЛЬНЫЕ УТИЛИТЫ === */
.text-center {
  text-align: center;
}
/* === SVG DECORATIONS === */
.front-page-decor-scope {
  /* Added a wrapper to position and clip the SVG decoration layer within the front-page content. */
  position: relative;
  overflow: hidden;
  overflow: clip;
}

.svg-decor-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

body, html {
  overflow-x: hidden; /* на всякий случай */
  position: relative; /* ключевая строка */
}

.decor {
  position: absolute;
  opacity: 0.1;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.decor:hover {
  opacity: 0.25;
  transform: scale(1.3);
}
