/* Figma 1821:6543 — «Шаблон страницы кейса» desktop 1440 */

.page-case-detail .main {
  padding-top: var(--header-height);
  background-color: #f5f6f7;
}

.page-case-detail .site-header:not(:hover):not(.is-mega-open):not(.is-mega-closing):not(.is-menu-open) .site-header__bar,
.page-case-detail .site-header.site-header--always-light:not(:hover):not(.is-mega-open):not(.is-mega-closing):not(.is-menu-open) .site-header__bar {
  background-color: #ffffff;
  border-bottom-color: transparent;
}

.case-detail {
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 40px 80px;
}

.case-detail__wrapper {
  position: relative;
}

/* Breadcrumbs */
.case-detail__breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 133%;
  color: #8a8e92;
}

.case-detail__breadcrumbs a {
  color: #8a8e92;
  text-decoration: none;
  transition: color 0.2s ease;
}

.case-detail__breadcrumbs a:hover {
  color: #0c3eb3;
}

.case-detail__breadcrumbs-sep {
  width: 4px;
  height: 4px;
  background-color: #8a8e92;
  flex-shrink: 0;
}

.case-detail__breadcrumbs-current {
  color: #212123;
}

/* White content card */
.case-detail__card {
  box-sizing: border-box;
  width: 100%;
  max-width: 748px;
  margin: 0 auto;
  padding: 30px 40px;
  background-color: #ffffff;
  border-radius: 4px;
}

/* Title */
.case-detail__title {
  margin: 0 0 20px;
  font-family: var(--font-heading);
  font-size: 50px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #212123;
}

/* Hero image */
.case-detail__hero-image {
  margin: 0 0 30px;
}

.case-detail__hero-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Meta block (Заказчик / Дата / Отрасль) */
.case-detail__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(217, 217, 217, 0.5);
}

.case-detail__meta-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-detail__meta-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: #8a8e92;
}

.case-detail__meta-value {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  color: #212123;
}

/* Divider lines between sections */
.case-detail__divider {
  margin: 40px 0;
  border: none;
  border-top: 1px solid #d9d9d9;
}

/* Sections */
.case-detail__section {
  margin: 0;
}

.case-detail__section-title {
  margin: 0 0 20px;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #212123;
}

/* Body text */
.case-detail__text {
  margin: 0 0 20px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
  color: #212123;
}

.case-detail__text:last-child {
  margin-bottom: 0;
}

/* Timeline text with paragraph spacing */
.case-detail__text--timeline p {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
  color: #212123;
}

.case-detail__text--timeline p:last-child {
  margin-bottom: 0;
}

/* List block */
.case-detail__list-block {
  margin-bottom: 20px;
}

.case-detail__list-block .case-detail__text {
  margin-bottom: 15px;
}

/* Bullet list with blue dots */
.case-detail__bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-detail__bullet-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
  color: #212123;
}

.case-detail__bullet-list li:last-child {
  margin-bottom: 0;
}

.case-detail__bullet-list li::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: #0c3eb3;
}

/* Figures (images with captions) */
.case-detail__figure {
  margin: 20px 0;
}

.case-detail__figure:last-child {
  margin-bottom: 0;
}

.case-detail__figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.case-detail__caption {
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: #5f6062;
}

/* Figures grid (2 per row) */
.case-detail__figures-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 20px 0;
}

.case-detail__figure--half {
  margin: 0;
}

.case-detail__figure--half img {
  width: 100%;
  height: auto;
}

/* Review section */
.case-detail__review {
  padding-left: 20px;
  border-left: 2px solid #0c3eb3;
}

.case-detail__review-quote {
  margin: 0 0 30px;
  padding: 0;
}

.case-detail__review-quote p {
  margin: 0 0 15px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
  color: #212123;
}

.case-detail__review-quote p:last-child {
  margin-bottom: 0;
}

.case-detail__review-author {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}

.case-detail__review-name {
  font-family: 'Inter Tight', var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  color: #5f6062;
}

.case-detail__review-role {
  font-family: 'Inter Tight', var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: #8a8e92;
}

.case-detail__review-letter {
  display: inline-block;
  font-family: 'Inter Tight', var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  color: #0c3eb3;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.case-detail__review-letter:hover {
  color: #00175e;
}

/* Контент из админки (Подробно) */
.case-detail__section .case-detail__figure + .case-detail__figure,
.case-detail__section .case-detail__text + .case-detail__figure {
  margin-top: 20px;
}

.case-detail__section figcaption,
.case-detail__section .case-detail__caption {
  margin-top: 8px;
}

.case-detail__content--rich {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.case-detail__content--rich > :first-child {
  margin-top: 0;
}

.case-detail__content--rich > :last-child {
  margin-bottom: 0;
}

.case-detail__content--rich p,
.case-detail__content--rich .case-detail__text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
  color: #212123;
}

.case-detail__content--rich h2,
.case-detail__content--rich h3,
.case-detail__content--rich .case-detail__section-title {
  margin: 25px 0 10px;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #212123;
}

.case-detail__content--rich ul,
.case-detail__content--rich ol,
.case-detail__content--rich .case-detail__bullet-list {
  margin: 0;
  padding-left: 24px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.4;
  color: #212123;
}

.case-detail__content--rich li + li {
  margin-top: 8px;
}

.case-detail__content--rich figure,
.case-detail__content--rich .case-detail__figure {
  margin: 10px 0 0;
}

.case-detail__content--rich img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 2px;
}

.case-detail__content--rich table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

.case-detail__content--rich blockquote,
.case-detail__content--rich .case-detail__review-quote {
  margin: 0;
  padding-left: 20px;
  border-left: 2px solid #0c3eb3;
}

/* —— Responsive 1024 (Figma 1969:29025) —— */
@media (max-width: 1024px) {
  .case-detail {
    padding: 20px 40px 80px;
  }

  .case-detail__card {
    max-width: 944px;
    padding: 30px;
  }

  .case-detail__hero-image img {
    height: 401px;
    object-fit: cover;
  }

  .case-detail__bullet-list li::before {
    width: 5px;
    height: 5px;
    top: 8px;
  }
}

/* —— Responsive 375 (Figma 1969:29065) —— */
@media (max-width: 687px) {
  .case-detail {
    padding: 20px 0 0;
  }

  .case-detail__wrapper {
    padding: 0;
  }

  .case-detail__breadcrumbs {
    padding: 0 15px;
    font-size: 12px;
    margin-bottom: 16px;
  }

  .case-detail__card {
    max-width: 100%;
    padding: 0 15px 80px;
    background-color: transparent;
    border-radius: 0;
  }

  .case-detail__title {
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -0.03em;
  }

  .case-detail__hero-image img {
    height: 210px;
    object-fit: cover;
  }

  .case-detail__meta {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .case-detail__meta-item {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }

  .case-detail__meta-label {
    flex: none;
    width: auto;
  }

  .case-detail__meta-value {
    font-size: 14px;
  }

  .case-detail__divider {
    margin: 20px 0;
  }

  .case-detail__section-title {
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  .case-detail__text,
  .case-detail__bullet-list li,
  .case-detail__review-quote p,
  .case-detail__text--timeline p {
    font-size: 14px;
    line-height: 1.4;
  }

  .case-detail__bullet-list li::before {
    width: 5px;
    height: 5px;
    top: 6px;
  }

  .case-detail__caption {
    font-size: 12px;
  }

  .case-detail__figures-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .case-detail__review-quote p {
    font-size: 14px;
  }

  .case-detail__review-name {
    font-size: 14px;
  }

  .case-detail__review-role {
    font-size: 14px;
  }

  .case-detail__review-letter {
    font-size: 14px;
  }
}
