/* =========================================================
   DESIGN INTUIT — NESTORA CASE STUDY
   Uses the same structure as Patient App
   ========================================================= */


/* ---------------------------------------------------------
   GENERAL
   --------------------------------------------------------- */

.nestora-case-study {
  overflow: hidden;
}

.nestora-case-study .nestora-section {
  border-top: 1px solid var(--line);
}

.nestora-case-study .nestora-section-heading {
  max-width: 850px;
  margin-bottom: 56px;
}

.nestora-case-study .nestora-section-heading h2 {
  max-width: 820px;
  margin: 12px 0 18px;
}

.nestora-case-study .nestora-section-heading .cs-lead {
  max-width: 720px;
  margin: 0;
}


/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */

.nestora-case-study .nestora-accent {
  color: var(--primary-orange);
}

.nestora-case-study .cs-subtitle {
  max-width: 760px;
}

.nestora-case-study .cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}


/* ---------------------------------------------------------
   PROJECT OVERVIEW
   Same structure as Patient App
   --------------------------------------------------------- */

.nestora-project-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);

  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.nestora-project-meta > div {
  padding: 26px 28px;
  border-right: 1px solid var(--line);
}

.nestora-project-meta > div:first-child {
  padding-left: 0;
}

.nestora-project-meta > div:last-child {
  border-right: 0;
  padding-right: 0;
}

.nestora-project-meta span {
  display: block;

  margin-bottom: 9px;

  font-size: 12px;
  color: var(--muted);

  text-transform: uppercase;
  letter-spacing: .06em;
}

.nestora-project-meta strong {
  display: block;

  font-size: 15px;
  line-height: 1.45;
  font-weight: 500;

  color: var(--primary-black);
}


/* ---------------------------------------------------------
   DESIGN SOLUTIONS
   Uses same structure as Patient App solutions
   --------------------------------------------------------- */

.nestora-solution-block {
  display: grid !important;

  grid-template-columns:
    minmax(280px, .72fr)
    minmax(0, .9fr) !important;

  gap: clamp(40px, 7vw, 100px);

  align-items: start;

  margin: 0 !important;
  padding: 80px 0 !important;

  border-top: 1px solid var(--line);
}

.nestora-solution-block:first-of-type {
  padding-top: 0 !important;
  border-top: 0;
}

.nestora-solution-reverse {
  grid-template-columns:
    minmax(0, .8fr)
    minmax(280px, .72fr) !important;
}

.nestora-solution-reverse .cs-block-text {
  order: 2;
}

.nestora-solution-reverse .cs-block-media {
  order: 1;
}

.nestora-solution-block .cs-block-text {
  max-width: 500px;
}

.nestora-solution-block .cs-block-num {
  display: block;
  margin-bottom: 18px;
}

.nestora-solution-block h3 {
  margin: 0 0 20px;

  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.2;
}

.nestora-solution-block p {
  margin: 0;

  color: var(--primary-black);
  line-height: 1.7;
}

.nestora-solution-block .cs-block-media {
  min-width: 0;

  overflow: hidden;

  border-radius: 16px;

  background: var(--surface);
}

.nestora-solution-block .cs-block-media img {
  display: block; 
  height: auto;

  margin: auto;
}


/* ---------------------------------------------------------
   OUTCOME
   Reuses Patient App impact-grid
   --------------------------------------------------------- */

.nestora-outcome {
  border-bottom: 1px solid var(--line);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

  .nestora-project-meta {
    grid-template-columns: repeat(2, 1fr);
  }

  .nestora-project-meta > div:nth-child(2) {
    border-right: 0;
  }

  .nestora-project-meta > div:nth-child(3),
  .nestora-project-meta > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

  .nestora-case-study .nestora-section-heading {
    margin-bottom: 40px;
  }


  /* Project overview */

  .nestora-project-meta {
    grid-template-columns: 1fr;
  }

  .nestora-project-meta > div,
  .nestora-project-meta > div:first-child,
  .nestora-project-meta > div:last-child {
    padding: 22px 0;

    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nestora-project-meta > div:last-child {
    border-bottom: 0;
  }


  /* Solutions */

  .nestora-solution-block,
  .nestora-solution-reverse {
    grid-template-columns: 1fr !important;

    gap: 32px;

    padding: 56px 0 !important;
  }

  .nestora-solution-reverse .cs-block-text,
  .nestora-solution-reverse .cs-block-media {
    order: initial;
  }

  .nestora-solution-block .cs-block-text {
    max-width: none;
  }

}