/* ==========================================================================
   Case study detail page (case-study-detail.html) — Figma "version 1"
   Depends on: variables.css, base.css, header.css, footer.css, style.css,
   case-studies.css (.cases__grid + .case-card for "Read more case studies")
   Figma has no mobile frame for this page; mobile follows the other pages.
   ========================================================================== */

/* sections sit 60px apart here (the site default is 100px) */
.cs-page {
  gap: 60px;
}

/* ---- Centred heading used by "Our approach" and "Screens" ---- */

.cs-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.cs-head__title {
  font-family: var(--font-heading);
  font-size: 32px;
  line-height: 48px;
  font-weight: var(--fw-semibold);
  color: var(--color-secondary);
}

.cs-head__text {
  color: var(--color-zinc-800);
}

.cs-head--light .cs-head__title {
  color: var(--color-white);
}

.cs-head--light .cs-head__text {
  color: var(--color-zinc-400);
}

/* ==========================================================================
   Intro
   ========================================================================== */

.cs-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-top: 60px;
}

.cs-intro__date {
  padding: 6px 20px;
  border-radius: var(--radius-sm);
  background: var(--color-main-light);
  font-size: var(--fs-xl);
  line-height: var(--lh-xl);
  font-weight: var(--fw-medium);
  color: var(--color-zinc-600);
}

.cs-intro__row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}

.cs-intro__title {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: var(--fw-bold);
  color: var(--color-zinc-900);
}

.cs-intro__text {
  flex: 1 1 0;
  align-self: stretch;
  min-width: 0;
  padding-left: 20px;
  border-left: 2px solid var(--color-zinc-200);
  font-size: var(--fs-xl);
  line-height: var(--lh-xl);
  color: var(--color-zinc-800);
}

.cs-intro__link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding-inline: 12px;
  border: 1px solid var(--color-danger-900);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  line-height: var(--lh-xs);
  color: var(--color-black);
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.cs-intro__link:hover {
  background: var(--color-main-light);
}

.cs-intro__link img {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Showcase — the delivered site in a grey frame
   ========================================================================== */

.cs-showcase {
  margin: 0;
  padding: 48px;
  border-radius: var(--radius-xl);
  background: var(--color-zinc-200);
}

.cs-showcase img {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Our approach — dark full-width band
   ========================================================================== */

.cs-approach {
  padding-block: 40px;
  background: var(--color-zinc-900);
}

.cs-approach__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.cs-approach__steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cs-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--color-zinc-400);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
}

.cs-step__icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
}

.cs-step__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.cs-step__title {
  font-size: var(--fs-lg);
  line-height: var(--lh-lg);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  color: var(--color-white);
}

.cs-step__text {
  color: var(--color-zinc-400);
}

/* CMS editor-dan gələn bir neçə abzas */
.cs-head__text p + p,
.cs-step__text p + p {
  margin-top: 8px;
}

/* ==========================================================================
   Key pages — text beside a desktop + mobile mockup, sides alternate
   ========================================================================== */

.cs-screens {
  display: flex;
  flex-direction: column;
  gap: 100px;
}

.cs-screen {
  display: flex;
  align-items: center;
  gap: 40px;
}

.cs-screen--reverse {
  flex-direction: row-reverse;
}

.cs-screen__text {
  flex: 0 0 382px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cs-screen__title {
  font-family: var(--font-heading);
  font-size: 32px;
  line-height: 48px;
  font-weight: var(--fw-semibold);
  color: var(--color-secondary);
}

.cs-screen__lead {
  color: var(--color-zinc-800);
}

/* Figma: 186×66 arrow, 64px under the text; the export has a small bleed */
.cs-screen__arrow {
  width: 191px;
  height: 71px;
  margin: 45px 0 0 -2px;
}

.cs-screen__image {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Screens gallery
   ========================================================================== */

.cs-gallery {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.cs-gallery__image {
  width: 100%;
  height: auto;
  aspect-ratio: 1240 / 894;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   Read more case studies — divider line, heading, three cards
   ========================================================================== */

.cs-more {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.cs-more::before {
  content: "";
  height: 1px;
  background: var(--color-zinc-200);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
  .cs-intro__row {
    flex-wrap: wrap;
  }

  .cs-intro__text {
    flex-basis: 360px;
  }

  .cs-screen__text {
    flex-basis: 320px;
  }
}

@media (max-width: 992px) {
  .cs-showcase {
    padding: 24px;
  }

  /* mockup above its text */
  .cs-screen,
  .cs-screen--reverse {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .cs-screen__image {
    order: -1;
  }

  .cs-screen__text {
    flex-basis: auto;
  }

  .cs-screen__arrow {
    display: none;
  }

  .cs-screens {
    gap: 60px;
  }
}

@media (max-width: 768px) {
  .cs-page {
    gap: 40px;
  }

  .cs-head__title,
  .cs-screen__title {
    font-size: 24px;
    line-height: 36px;
  }

  .cs-head__text,
  .cs-screen__lead,
  .cs-step__text {
    font-size: var(--fs-sm);
    line-height: var(--lh-sm);
  }

  .cs-head__text br {
    display: none;
  }

  .cs-intro {
    padding-top: 32px;
    gap: 16px;
  }

  .cs-intro__date {
    padding: 4px 12px;
    font-size: var(--fs-sm);
    line-height: var(--lh-sm);
  }

  .cs-intro__row {
    flex-direction: column;
    gap: 12px;
  }

  .cs-intro__text {
    flex-basis: auto;
    padding-left: 16px;
    font-size: var(--fs-md);
    line-height: var(--lh-md);
  }

  .cs-showcase {
    padding: 12px;
    border-radius: var(--radius-lg);
  }

  .cs-approach {
    padding-block: 32px;
  }

  .cs-approach__inner {
    gap: 24px;
  }

  .cs-approach__steps {
    gap: 16px;
  }

  .cs-step {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .cs-step__icon {
    width: 40px;
    height: 40px;
  }

  .cs-step__title {
    font-size: var(--fs-md);
    line-height: var(--lh-md);
  }

  .cs-screens {
    gap: 40px;
  }

  .cs-screen {
    gap: 16px;
  }

  .cs-screen__text {
    gap: 8px;
  }

  .cs-gallery {
    gap: 24px;
  }

  .cs-gallery__image {
    border-radius: var(--radius-md);
  }

  .cs-more {
    gap: 32px;
  }
}
