/* =====================================================
   CASE STUDIES PAGE (case-studies.html)
   Loads after: styles.css, about.css
   Use with <body class="page-case-studies">.

   Partner cards: ONE border around the whole card (the logo panel
   and the text body share it — they are NOT bordered separately),
   and the "Case Study" button straddles the card's bottom border.
===================================================== */

/* Whole card = single bordered container. overflow:visible so the
   button can sit half outside the bottom border. Extra bottom padding
   leaves room above the border for the last line of text. */
.page-case-studies .au-diff-card {
  position: relative;
  overflow: visible;
  border: 3px solid var(--teal);
  border-radius: 20px;
  padding: 16px 16px 52px;
  background: transparent;
}

/* Logo panel: white rounded panel inside the card, no border of its own.
   A fixed height + consistent inner padding, combined with object-fit:contain
   on the image, gives every logo the same footprint and the same breathing
   room from the pill edge — regardless of the logo's own aspect ratio. */
.page-case-studies .au-diff-card-img {
  border-radius: 90px;
  overflow: hidden;
  background: #fff;
  height: 92px;
  width: 350px;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 34px;
}

.page-case-studies .au-diff-card-img img {
  border: none;
  border-radius: 0;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: 0;
}

/* Body: no separate border — the card border already wraps it. */
.page-case-studies .au-diff-card-body {
  border: none;
  border-radius: 0;
  padding: 18px 8px 0;
}

/* Button straddles the bottom border, centred on the card. */
.page-case-studies .au-diff-card .au-actions {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  margin: 0;
  width: max-content;
  max-width: calc(100% - 24px);
}
.page-case-studies .au-diff-card .au-actions .btn {
  background: var(--light-cyan);
  color: #0b5757;
  border: 2px solid var(--teal);
  font-weight: 600;
  white-space: nowrap;
  min-width: 350px;
  height: 70px;
}
.page-case-studies .au-diff-card .au-actions .btn:hover {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

/* On narrow screens keep the long labels readable inside the pill. */
@media (max-width: 480px) {
  .page-case-studies .au-diff-card .au-actions .btn {
    font-size: 16px;
    padding: 10px 20px;
    white-space: normal;
    text-align: center;
  }
}

/* =====================================================
   INDIVIDUAL CASE STUDY (detail) PAGE
   Reuses site-wide two-column, heading and button styles;
   adds a hero logo panel, pull-quote boxes and an image row.
===================================================== */

/* Hero logo in a white, teal-bordered rounded panel. */
.cs-logo-panel {
  width: min(480px, 100%);
  margin: 8px auto 0;
  background: #fff;
  border: 3px solid var(--teal);
  border-radius: 20px;
  padding: 32px 44px;
}
/* Uniform logo size across every case-study page: render each (content-
   trimmed) logo at the same height and let the width follow, centred, so
   they all read as the same size regardless of aspect ratio. */
.cs-logo-panel img {
  width: auto;
  height: clamp(64px, 6.4vw, 90px);
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* Main partnership/impact section: text on the left (wider), two images
   stacked on the right in a narrower column, sitting close together. */
.cs-main {
  align-items: flex-start;
  gap: 48px;
}
.cs-main .au-col-img {
  flex: 0 0 34%;
}
/* Smaller, tighter section heading to match the design. */
.cs-main .section-heading {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.2;
}
.cs-img-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cs-img-stack .au-side-img {
  min-height: 0;
  aspect-ratio: 4 / 3.1;
}

/* Attribution line under a section heading (e.g. name + role). */
.cs-attrib {
  font-family: var(--font-sans);
  font-size: 18px;
  font-style: italic;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
  margin: -6px 0 22px;
}

/* Flowing body copy blocks. */
.cs-prose p {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--white);
  margin: 0 0 18px;
}
.cs-prose p:last-child { margin-bottom: 0; }
.cs-prose .cs-strong { font-weight: 600; }
/* Extra paragraph-sized gap after a quote, used to space a text column out
   evenly so it fills the height of a taller image column beside it. */
.cs-prose .cs-inline-quote.cs-para-gap { margin-bottom: 86px; }

/* Inline pull-quote inside flowing prose (teal, italic). */
.cs-prose .cs-inline-quote {
  color: var(--sky);
  font-style: italic;
  font-weight: 600;
}
.cs-subheading {
  font-family: var(--font-poppins);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 18px;
}

/* Full-width pull-quote box (teal border, centred). */
.cs-quote {
  border: 3px solid var(--teal);
  border-radius: 18px;
  padding: clamp(24px, 4vw, 44px);
  max-width: 1000px;
  margin: 44px auto;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}
.cs-quote-text {
  font-family: var(--font-sans);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 600;
  font-style: italic;
  line-height: 1.6;
  color: var(--white);
  margin: 0 0 14px;
}
.cs-quote-author {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}
.cs-quote-role {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 2px;
}

/* Row of three supporting images. */
.cs-img-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 44px 0;
}
.cs-img-row img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid var(--teal);
  display: block;
}

.cs-img-row--four {
  grid-template-columns: repeat(4, 1fr);
}

/* Case study image carousel (crossfade slides + dots below the image) */
.cs-carousel { width: 100%; }
.cs-carousel-viewport {
  position: relative;
  width: 100%;
  min-height: 410px;
  border-radius: 16px;
}
.cs-carousel-viewport .cs-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid var(--teal);
  opacity: 0;
  transition: opacity 0.6s ease;
  display: block;
}
.cs-carousel-viewport .cs-slide.is-active { opacity: 1; }
.cs-carousel-dots {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.cs-carousel-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: #fff;
  opacity: 0.5;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cs-carousel-dot:hover { opacity: 0.8; }
.cs-carousel-dot.active { opacity: 1; transform: scale(1.1); }

@media (prefers-reduced-motion: reduce) {
  .cs-carousel-viewport .cs-slide { transition: none; }
}

/* Case study multi-image row carousel (sliding track + dots) */
.cs-row-carousel { width: 100%; }
.cs-row-viewport { overflow: hidden; }
.cs-row-track { display: flex; gap: 20px; }
.cs-row-slide { flex: 0 0 auto; }
.cs-row-slide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid var(--teal);
  display: block;
}
.cs-row-dots {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 16px;
}
.cs-row-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: #fff;
  opacity: 0.45;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cs-row-dot:hover { opacity: 0.75; }
.cs-row-dot.active { opacity: 1; transform: scale(1.1); }

/* Centered two-card grid for "Read our other Case Studies" on individual pages.
   Keeps each card the same width as in the 3-column grid, but centers the pair. */
.au-diff-grid--pair {
  grid-template-columns: repeat(2, calc((100% - 40px) / 3));
  justify-content: center;
}

@media (max-width: 768px) {
  .cs-img-row { grid-template-columns: 1fr; }
  .cs-img-row--four { grid-template-columns: repeat(2, 1fr); }
  .au-diff-grid--pair {
    grid-template-columns: minmax(0, 360px);
  }
}

/* =====================================================
   CASE STUDY BODY PANEL (light panel, dark text — per client PDF)
   The whole case study body sits inside a light, teal-bordered
   rounded panel. The logo panel straddles the panel's top edge,
   and teal <hr class="cs-divider"> lines separate the sections.
===================================================== */
.cs-panel {
  position: relative;
  width: 100%;
  margin: 124px auto 0;
  background: #dbe1ea;
  border: 2px solid var(--teal);
  border-radius: 30px;
  padding: 104px clamp(26px, 5vw, 72px) clamp(40px, 5vw, 64px);
}

/* Logo panel straddles the top border of the panel. */
.cs-panel .cs-logo-panel {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: min(325px, 84%);
  padding: 22px 36px;
  border-radius: 120px;
}

/* Centred title + subtitle block at the top of the panel. */
.cs-panel-title {
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  font-style: italic;
  line-height: 1.2;
  color: #5D6A87;
  text-align: center;
  margin: 0 0 12px;
}
.cs-panel-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(18px, 1.9vw, 24px);
  font-weight: 600;
  font-style: italic;
  line-height: 1.35;
  color: #5D6A87;
  text-align: center;
  margin: 0;
}

/* Teal divider between blocks inside the panel. */
.cs-divider {
  border: none;
  border-top: 2px solid var(--teal);
  margin: 32px 0;
}

/* ── Dark-on-light text treatment inside the panel ── */
.cs-panel .cs-prose p { color: #45596d; }
.cs-panel .cs-strong,
.cs-panel .cs-prose .cs-strong { color: #5D6A87; font-weight: 700; }
.cs-panel .cs-inline-quote,
.cs-panel .cs-prose .cs-inline-quote {
  color: #5D6A87;
  font-weight: 700;
  font-style: italic;
}
.cs-panel .section-heading {
  color: #5D6A87;
  font-size: clamp(24px, 2.5vw, 31px);
  line-height: 1.25;
  font-style: italic;
  text-align: left;
}
.cs-panel .cs-main .section-heading {
  font-size: clamp(24px, 2.5vw, 31px);
}
.cs-panel .cs-subheading { color: #5D6A87; font-style: italic; }
.cs-panel .cs-attrib { color: #55697d; }
.cs-panel .au-bullet-list li,
.cs-panel .au-bullet-list li span { color: #45596d; }
/* Simple teal bullet dots inside the light panel (matches the PDF). */
.cs-panel .au-bullet-list li { grid-template-columns: 18px 1fr; column-gap: 12px; }
.cs-panel .au-bullet-list li::before {
  content: "\f111";
  color: var(--teal);
  font-size: 9px;
  margin-top: 8px;
}
.cs-panel .au-bullet-list li::after { content: none; }

/* Pull-quote boxes inside the panel (teal border, light fill). */
.cs-panel .cs-quote { background: rgba(255, 255, 255, 0.5); }
.cs-panel .cs-quote-text { color: #2e4257; }
.cs-panel .cs-quote-author { color: #2e4257; }
.cs-panel .cs-quote-role { color: #45596d; }

/* ── Client refinements on the case-study detail pages ── */

/* Vertically distribute a text column so its paragraphs fill the row
   height evenly next to a taller image. */
.cs-main .au-col-text.cs-even-text { align-self: stretch; display: flex; flex-direction: column; }
.cs-main .au-col-text.cs-even-text .cs-prose {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

/* Spread a stacked image column evenly so the images line up with the
   height of the text beside them. */
.cs-main .au-col-img.cs-img-even { align-self: stretch; }
.cs-main .au-col-img.cs-img-even .cs-img-stack {
  height: 100%;
  justify-content: space-between;
}

/* Center a full-width section (heading + prose) inside the panel. */
.cs-panel .cs-section-center,
.cs-panel .cs-section-center.section-heading { text-align: center; }

/* Vertically center a two-column row and crop its image to a balanced
   height so the text sits centered against it. */
.cs-main.cs-row-middle { align-items: center; }
.cs-main.cs-row-middle .au-side-img { min-height: 320px; max-height: 360px; }

/* Crop a side image to the exact height of the text column beside it. The image
   is taken out of the flow (absolute) so it never drives the row height — the
   text column defines the height and the image fills it with object-fit:cover,
   cropping whether it is naturally taller or shorter than the text. Desktop only
   — on mobile the columns stack and the image keeps its normal height. */
@media (min-width: 1025px) {
  .cs-main.cs-row-crop { align-items: stretch; }
  .cs-main.cs-row-crop .au-col-img { position: relative; overflow: hidden; }
  .cs-main.cs-row-crop .au-side-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
  }
}

@media (max-width: 768px) {
  .cs-panel { padding-top: 88px; }
  .cs-panel .cs-logo-panel { width: min(340px, 84%); padding: 16px 28px; }
}
