/* ============= СТОРІНКА "ПРО НАС" =================== */

.about-page {
  padding-bottom: 60px;
}

/* Відступ між секціями */
.about-block + .about-block {
  margin-top: 60px;
}

/* ===================  HERO ================= */

.about-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.about-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.85) 40%,
    rgba(0, 0, 0, 0.2) 70%,
    transparent
  );
  z-index: 1;
}

.about-hero .container {
  position: relative;
  z-index: 2;
}

.about-hero__content {
  max-width: 720px;
  color: #fff;
}

.about-hero__content h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.3;
  margin-bottom: 20px;
}

.about-hero__text {
  font-size: clamp(16px, 3vw, 20px);
  line-height: 1.6;
  margin-bottom: 20px;
}

.about-hero__text:last-child {
  margin-bottom: 0;
}

/* =========================================================
   СТАТИСТИКА
========================================================= */

.about-stats {
  padding: 100px 0;
  background: #f9f9f9;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.stat-number {
  display: block;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: #7c0000;
  margin-bottom: 10px;
}

.stats-grid p {
  font-size: clamp(16px, 3vw, 20px);
}

/* ========   БЛОКИ ========================= */

.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1px, 1vw, 32px);
}

.about-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

/* ============== MEDIA БЛОК (фон)=================== */

.about-media {
  position: relative;
  min-height: clamp(350px, 40vw, 600px);
  padding: clamp(30px, 5vw, 60px);
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Overlay */
.about-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

/* =========================================================
   ТЕКСТОВИЙ КОНТЕНТ
========================================================= */

.about-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.about-content h2 {
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 20px;
}

.about-content p {
  font-size: clamp(16px, 3vw, 20px);
  line-height: 1.6;
}

.about-content p + p {
  margin-top: clamp(2px, 1vw, 15px);
}

/* Центрований контент */
.about-content--center {
  text-align: center;
  margin: 0 auto;
}

.price-lead {
  margin-bottom: 32px;
}

/* =========================================================
   ТЕКСТОВІ БЛОКИ БЕЗ ФОНУ
========================================================= */

.about-text {
  display: flex;
  align-items: center;
  min-height: clamp(350px, 40vh, 600px);
}

.about-text .about-content {
  color: #000;
}

.text-dark h2,
.text-dark p {
  color: #000;
}

.custom-padding {
  padding-left: clamp(20px, 5vw, 40px);
}

/* =========================================================
   СПИСОК
========================================================= */

.about-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.about-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  font-size: clamp(16px, 3vw, 20px);
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background-color: #7c0000;
  border-radius: 50%;
}

.page-id-12 .hero__btn {
  padding: 12px clamp(14px, 5vw, 40px);
}
/* =========================================================
   КОЛЬОРИ ФОНІВ - ВИПРАВЛЕНО ШЛЯХИ
========================================================= */

.bg-2 {
  background-image: url("../img/about/bg-2.jpg");
}
.bg-3 {
  background-image: url("../img/about/bg-3.jpg");
}
.bg-4 {
  background-image: url("../img/about/bg-4.jpg");
}
.bg-5 {
  background-image: url("../img/about/bg-5.jpg");
}
.bg-6 {
  background-image: url("../img/about/bg-6.jpg");
}
.bg-7 {
  background-image: url("../img/about/bg-7.jpg");
}
.bg-8 {
  background-image: url("../img/about/bg-8.jpg");
}

.bg-red {
  background-color: #7c0000;
  background-image: none;
  color: #fff;
}
.bg-6 .about-content {
  color: #fff;
}

/* =========================================================
   АДАПТИВ
========================================================= */
@media (max-width: 767px) {
  /* ================= Статистика ================= */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .about-stats {
    padding: 50px 0;
  }
  .stat-number {
    font-size: clamp(24px, 6vw, 32px);
    margin-bottom: 5px;
  }

  /* ================= Hero секція ================= */
  .about-hero {
    min-height: 60vh;
  }
  .about-hero__bg {
    object-position: center center;
  }
  .about-hero::before {
    background: linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.3) 100%
    );
  }
  .about-hero__content {
    text-align: center;
    max-width: 100%;
    padding: 0 15px;
  }
  .about-hero__content h1 {
    font-size: clamp(32px, 8vw, 48px);
  }
  .about-hero__text {
    font-size: clamp(16px, 4vw, 20px);
  }

  /* ================= Основні блоки (Виправлено) ================= */

  /* Змінюємо сітку на колонку для ОБОХ типів розділення */
  .about-split,
  .about-two-cols {
    display: flex;
    flex-direction: column;
    gap: 0; /* Прибираємо проміжок, якщо фони мають зливатися */
  }

  /* Зображення завжди йдуть першими (зверху) */
  .about-split .about-media,
  .about-two-cols .about-media {
    order: 1;
    width: 100%;
    min-height: 250px; /* Фіксована висота лише для картинок */
    padding: 20px;
  }

  /* Текст завжди йде другим (знизу) */
  .about-split .about-text,
  .about-two-cols .about-text {
    order: 2;
    width: 100%;
    min-height: auto; /* Дозволяємо тексту визначати висоту */
    padding: 40px 15px; /* Даємо повітря тексту замість фіксованої висоти */
  }

  /* Скидаємо специфічний відступ зліва для мобільних */
  .custom-padding {
    padding-left: 15px;
  }

  /* Зменшуємо відступи між секціями */
  .about-block + .about-block {
    margin-top: 40px;
  }

  /* ================= Специфічні блоки ================= */

  /* Ховаємо bg-3 на мобілках */
  .about-block .bg-3 {
    display: none;
  }

  /* bg-red (Швидке оформлення) - робимо його просто текстовим блоком */
  .about-block .bg-red {
    order: 1;
    width: 100%;
    min-height: auto;
    padding: 40px 15px;
    text-align: center; /* На мобільному часто краще центрувати такі банери */
  }

  /* CTA блок (останній bg-6) */
  .about-block:last-child .about-media {
    min-height: auto;
    padding: 50px 15px;
  }

  /* ================= Типографіка ================= */
  .about-content h2 {
    font-size: clamp(24px, 6vw, 28px);
    margin-bottom: 15px;
  }
  .about-content p,
  .about-list li {
    font-size: 16px; /* Не робіть текст меншим за 16px на мобільному для зручності читання */
  }
  .about-list li {
    padding-left: 18px;
    margin-bottom: 8px;
  }
  .about-list li::before {
    width: 5px;
    height: 5px;
    top: 0.4em;
  }
}

/* Для дуже маленьких екранів (можна спростити) */
@media (max-width: 480px) {
  .about-split .about-media,
  .about-two-cols .about-media {
    min-height: 200px; /* Трохи менші картинки для вузьких екранів */
  }
  .about-split .about-text,
  .about-two-cols .about-text,
  .about-block .bg-red {
    padding: 30px 15px;
  }
}
