/* ==========================
   ГЛАВНЫЙ КОНТЕЙНЕР
========================== */
.case-wrap {
  position: relative;
  background: rgba(255, 255, 255, 0.85); /* мягкий белый */
  padding: 60px 0 80px;
  background: #ffffff;
  font-family: 'Poppins', sans-serif;
  color: #0b0b0b;
  z-index: 1;
  margin-top: 0px;
}

/* ==========================
   HERO + BADGE
========================== */
.hero-badge-wrap {
  position: relative;
  margin: 0;
  padding: 0;
}

.hero-section {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.case-badge {
  position: absolute;
  top: calc(100% - 27px);
  right: 0;
  width: 300px;
  height: 300px;
  z-index: 2; /* поверх case-wrap, но ниже hero-текста */
  pointer-events: none; /* не мешает кликам */
  opacity: 0.5; /* лёгкая прозрачность для фона */
}

.case-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================
   ПОЛНЫЙ ЗАГОЛОВОК КЕЙСА
========================== */
/* Заголовок использует тот же контейнер, что и .case-grid */
.case-full-title {
  width: min(1200px, 92%);
  margin: 45px auto 6px;
  padding-left: 0;     /* убираем добавку */
  text-align: left;
  position: relative;
  left: -35px;         /* ⬅️ сдвигаем влево на те же 25px, что padding у .case-aside */
}

/* Сам текст ограничиваем по ширине, но левый край остаётся ровно на краю .case-grid */
.case-full-title h1 {
  max-width: 900px;
  font-size: 42px;
  font-weight: 600;
  color: #005385;
  line-height: 1.3;
  margin: 0;
}

@media (max-width: 768px) {
  .case-full-title {
    left: -15px;       /* на мобильных padding у aside меньше */
    margin: 20px auto 6px;
  }
  .case-full-title h1 {
    font-size: 26px;
    max-width: 100%;
  }
}

/* ==========================
   СЕТКА
========================== */
.case-grid {
  width: min(1200px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  z-index: 3;
}

/* ==========================
   ЛЕВАЯ КОЛОНКА
========================== */
.case-aside {
  background-color: rgba(227,245,249,1);
  padding: 15px 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-aside .aside-title {
  font-size: 24px;
  font-weight: 600;
  color: #005385;
  margin-bottom: 8px;
}

.case-aside h4 {
  font-size: 15px;
  font-weight: 700;
  color: #005385;
  margin-bottom: 4px;
}

.case-aside p,
.case-aside li {
  font-size: 15px;
  color: #333;
  line-height: 1.5;
  margin: 0 0 8px;
}

.case-aside ul {
  margin: 0;
  padding-left: 18px;
}

.aside-image {
  text-align: center;
  margin-top: 0px;
}
.aside-image img {
  width: 80%;
  max-width: 160px;
  margin-bottom: 6px;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.aside-download {
  text-align: center;
}
.aside-download .btn-outline {
  display: inline-block;
  background: #fff;
  color: #005385;
  padding: 10px 22px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid #005385;
  text-decoration: none;
  transition: 0.3s;
}
.aside-download .btn-outline:hover {
  background: #005385;
  color: #fff;
}

.aside-related {
  margin-top: 20px;
}
.aside-related h4 {
  color: #005385;
  font-weight: 700;
}
.aside-related a {
  color: #005385;
  text-decoration: none;
}
.aside-related a:hover {
  text-decoration: underline;
}

/* ==========================
   ПРАВАЯ КОЛОНКА
========================== */

.case-body {
  position: relative;
  z-index: 4; /* текст и контент выше бейджа */
  background: transparent; /* текст без подложки, бейдж виден */
  padding-top: 15px; /* 🔹 регулирует выравнивание */
}

.case-body h2 {
  font-size: 22px;
  color: #005385;
  margin-top: 25px;
  margin-bottom: 10px;
  font-weight: 600;
}

.case-body p,
.case-body li {
  font-size: 16px;
  color: #333;
  line-height: 1.6;
  margin: 0 0 10px 0; /* единый ритм текста */
}

/* ==========================
   СПИСКИ И ВЫРАВНИВАНИЕ ТЕКСТА
========================== */

.case-section ul.case-list {
  list-style: disc;
  margin: 0;
  padding-left: 1.5em; /* базовое смещение для маркеров */
}

.case-section ul.case-list li {
  margin-bottom: 15px;
  padding-left: 0;
}

/* Элементы без маркеров */
.case-section ul.case-list li.no-bullet {
  list-style: none;
  padding-left: 0;
  text-indent: -1.5em; /* выравниваем по точкам */
  margin-left: 1.5em;  /* и оставляем общий визуальный ритм */
}

/* Абзацы без списка — чуть левее, чем буллеты */
.case-section p {
  margin-left: 0.0em;      /* было 1.5em — теперь чуть левее */
  padding-left: 0;         /* убираем лишнее выравнивание */
  text-indent: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

/* ==========================
   ЦВЕТНЫЕ ВЫДЕЛЕНИЯ
========================== */
.highlight-blue { 
  color: #005385; 
  font-weight: 600; 
}
.highlight-red  { 
  color: #FF4040; 
  font-weight: 400; 
  letter-spacing: 0.1px; 
}

/* ==========================
   БЛОК РЕЗУЛЬТАТОВ
========================== */
.case-results-highlight {
  background-color: rgba(227,245,249,1);
  padding: 30px;
  border-radius: 4px;
  margin-top: 40px;
}
.case-results-highlight h2 {
  color: #005385;
  margin-top: 0;
}
.case-results-highlight ul.case-list {
  margin: 0;
  padding: 0;
  padding-left: 1.8em; /* 🔹 немного смещаем точки вправо */
}
.case-results-highlight ul.case-list li {
  margin-bottom: 8px;
  font-size: 16px;
}

/* ==========================
   КАРТИНКИ В ТЕКСТОВЫХ РАЗДЕЛАХ
========================== */
.case-image {
  text-align: center;
  margin: 25px 0;
}

.case-image img {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 680px;    /* ограничивает ширину на десктопах */
  min-width: 300px;    /* не даёт сжиматься ниже этой точки */
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: zoom-in;
}

/* лёгкое увеличение при наведении */
.case-image img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* адаптив под узкие экраны */
@media (max-width: 768px) {
  .case-image img {
    max-width: 90%;
    min-width: 260px;
  }
}

/* ==========================
   LIGHTBOX (JS-вариант)
========================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 9999;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 32px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}
.lightbox-close:hover {
  color: #ccc;
}

/* ==========================
   ЦИТАТНЫЙ БЛОК (в правой колонке, с "плавающей" белой карточкой)
========================== */

/* =========  Общая геометрия цитатного блока  ========= */
/* Блок A: контейнер, который «приклеен» к низу двухколоночного блока
   и сверху/снизу задаёт отступы для карточки Г (30/20) */
.case-quote-area {
  position: relative;
  /* отступ от двух колонок сверху — можешь подрегулировать при желании */
  margin-top: 40px;

  /* ключ: высота A формируется содержимым карточки Г + верх/низ */
  padding-top: 30px;  /* верх карточки Г на 30px от верха A */
  padding-bottom: 20px; /* низ карточки Г на 20px от низа A */
}

/* Блок Б (верхняя белая подложка = 1/3 высоты A) */
.case-quote-area .quote-top {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0; right: 0;
  height: 33.333%;
  background: #ffffff;
}

/* Блок В (нижняя голубая подложка = 2/3 высоты A) */
.case-quote-area .quote-bottom {
  position: absolute;
  z-index: 0;
  bottom: 0;
  left: 0; right: 0;
  height: 66.666%;
  background: rgba(227,245,249,1);
  border-radius: 8px; /* визуально мягче */
}

/* Внутренняя обёртка для выравнивания ширины относительно двух колонок сверху
   Ширина совпадает с контейнером .case-grid (min(1200px, 92%)), но мы делаем карточку
   на 20px уже с каждой стороны (см. ниже .quote-card) */
.case-quote-area .quote-card-wrap {
  width: min(1200px, 92%);
  margin: 0 auto;
  position: relative; /* чтобы z-индекс карточки работал поверх подложек */
  z-index: 1;
}

/* Блок Г (карточка цитаты): лежит поверх Б/В, с тенями, текст слева */
.case-quote-area .quote-card {
  /* на 20px уже с каждой стороны, чем две колонки выше */
  width: calc(100% - 80px);
  margin: 0 auto;

  background: #fff;
  border-radius: 48px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.25);
  padding: 36px 50px;
  box-sizing: border-box;
  text-align: left;
  margin-bottom: 40px;        /* ↑ увеличен нижний отступ от Блока А */
}

/* Текст цитаты */
.case-quote-area .quote-card blockquote { 
  margin: 0;
  font-style: normal;
  color: #333;
  line-height: 1.6;
}
.case-quote-area .quote-card p { 
  margin: 0 0 12px 0;
  font-size: 16px;
}
.case-quote-area .quote-card footer {
  margin-top: 18px;
  font-weight: 500;
  color: #005385;
  font-style: normal;
  text-align: right;          /* выравнивание по правому краю */
}

/* Блок Д (футноут): белая полоса под A, ограничена шириной «как у колонок» */
.case-quote-foot {
  background: #fff;
  padding: 16px 0 0; /* небольшой «воздух» над футноутом */
}
.case-quote-foot__inner {
  width: min(1200px, 92%);
  margin: 0 auto;
  color: #444;
  font-size: 13px;  /* на 2пт меньше, чем основной */
  line-height: 1.5;
  font-style: italic;
  text-align: left;
}

/* ===== Адаптив: уменьшаем «наплыв» и паддинги на мобильных ===== */
@media (max-width: 900px) {
  .case-quote-area {
    margin-top: 30px;
    padding-top: 24px;
    padding-bottom: 18px;
  }
  .case-quote-area .quote-card {
    width: calc(100% - 24px); /* по 12px отступа с краёв для узких экранов */
    padding: 24px 20px;
  }
  .case-quote-foot__inner {
    width: 92%;
  }
}

/* ==========================
   КНОПКИ
========================== */
.case-nav {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-outline {
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
  padding: 10px 16px;
  transition: .2s;
  font-size: 16px;
}

.btn-primary {
  background: #005385;
  color: #fff;
  border: 2px solid #005385;
}
.btn-primary:hover {
  background: #fff;
  color: #005385;
}
.btn-outline {
  background: #fff;
  color: #005385;
  border: 2px solid #005385;
}
.btn-outline:hover {
  background: #005385;
  color: #fff;
}

/* ==========================
   АДАПТИВ
========================== */
@media (max-width: 900px) {
  .case-grid {
    grid-template-columns: 1fr;
  }
  .case-quote-block {
    padding: 30px 20px;
  }
  .case-badge {
    display: none !important;
  }
}