/* ==========================================================================
   Case Study Detail View Styles (100% Faithful to Theme Project)
   ========================================================================== */

/* Breadcrumbs */
.breadcrumbs {
  font-size: 13px;
  line-height: 16px;
  margin-bottom: 16px;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #887a6d;
}
.breadcrumbs li+li:before {
  content: "/";
  color: #c2b9ac;
}
.breadcrumbs a {
  color: #887a6d;
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: #17100a;
}
.breadcrumbs [aria-current="page"] {
  color: #2c221a;
  font-weight: 500;
}

/* Header */
.detail-head {
  padding: 72px 0 0;
}
.detail-head__row {
  max-width: 800px;
  margin: 0 auto;
}
.detail-head--cs h1,
.detail-head--cs .h1 {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 51px;
  font-weight: 500;
  line-height: 56px;
  letter-spacing: -0.02em;
  color: #17100a;
  max-width: 800px;
  margin: 16px 0 0;
}
.detail-head--cs .detail-meta {
  color: #2c221a;
  display: grid;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, auto);
  justify-content: space-between;
  gap: 8px 40px;
  margin-top: 40px;
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}
.detail-head--cs .detail-meta > span {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.detail-head--cs .meta-label {
  color: #887a6d;
}

/* Hero Image */
.cs-hero {
  margin-top: 48px;
  max-width: 1200px;
  margin-inline: auto;
}
.cs-hero img,
.cs-hero picture {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid #ddd6cb;
  border-radius: 16px;
  width: 100%;
  height: auto;
  display: block;
}

/* Body Content */
.section--cs {
  padding: 40px 0 120px;
}
.detail-body--cs {
  max-width: 800px;
  margin: 0 auto;
}
.detail-body--cs .cs-lead {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 21px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: -0.01em;
  color: #2c221a;
  margin-top: 20px;
  max-width: 760px;
}
.detail-body--cs .cs-lead-sub {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.02em;
  color: #2c221a;
  margin-top: 28px;
  max-width: 760px;
}

/* Stat Cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 36px;
}
.stat-cards--ruled {
  border-top: 1px solid #ddd6cb;
  border-bottom: 1px solid #ddd6cb;
  margin-top: 44px;
  padding: 28px 0;
}
.stat-card {
  background: #ede8e0;
  border-radius: 12px;
  padding: 24px;
}
.stat-card__value {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 21px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: -0.01em;
  color: #2c221a;
  margin: 0;
}
.stat-card__label {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.02em;
  color: #6b5f53;
  margin: 4px 0 0;
}
.stat-cards--tight {
  gap: 8px;
}
.stat-cards--tight .stat-card__label {
  color: #52473c;
}
.stat-sub {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  color: #6b5f53;
  grid-column: 1 / -1;
  margin: -8px 0 0;
}

/* Content Blocks */
.cs-block {
  padding: 40px 0 32px;
}
.cs-block:not(:has(+ .cs-block)) {
  border-bottom: 1px solid #c2b9ac;
}
.cs-block > .kicker {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  color: #52473c;
  margin: 0;
}
.cs-block > h2,
.cs-block > .h2 {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 34px;
  color: #2c221a;
  margin: 8px 0 0;
}
.cs-block > p {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.02em;
  color: #2c221a;
  margin-top: 12px;
  margin-bottom: 0;
}
.cs-block > h2 + p,
.cs-block > .h2 + p {
  margin-top: 16px;
}
.cs-block > .stat-cards {
  margin: 24px 0 32px;
}
p.cs-note {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: #52473c;
  border-left: 2px solid #c2b9ac;
  padding-left: 12px;
  margin-top: 24px;
}
.ph-chart {
  margin-top: 24px;
  background: #f6f6ee;
  border: 1px dashed #c2b9ac;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  color: #887a6d;
}

/* FAQ Accordion */
.detail-body--cs > h2,
.detail-body--cs > .h2 {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 34px;
  color: #2c221a;
  margin: 52px 0 20px;
}
.faq-card {
  background: #ede8e0;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 12px;
}
.faq-card__title {
  margin: 0;
}
.faq-card__q {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.01em;
  color: #17100a;
  background: transparent;
  border: 0;
  border-radius: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: calc(100% + 48px);
  margin: -20px -24px;
  padding: 20px 24px;
  text-align: left;
  cursor: pointer;
}
.faq-card__q:after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #2c221a;
  border-bottom: 1.5px solid #2c221a;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.25s;
  flex: none;
  margin-right: 2px;
}
.faq-card__q[aria-expanded="true"]:after {
  transform: translateY(2px) rotate(225deg);
}
.faq-card__a {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.02em;
  color: #52473c;
  margin: 8px 0 0;
}

/* Next Case Card */
.next-case {
  background: #ede8e0;
  border-radius: 16px;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  max-width: 800px;
  margin: 48px auto 0;
  padding: 32px 36px;
  display: flex;
  box-sizing: border-box;
}
.next-case__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}
.next-case__kicker {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  color: #2c221a;
  margin: 0;
}
.next-case__title {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -0.01em;
  color: #2c221a;
  margin: 0;
}
.next-case__btn {
  align-self: flex-start;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 6px;
  background-color: #f9cc00;
  color: #17100a;
  border: 1.5px solid #f9cc00;
  text-decoration: none;
}
.next-case__btn:hover {
  background-color: #e5bb00;
  border-color: #e5bb00;
  color: #17100a;
}
.next-case__img,
picture.next-case__img {
  flex: none;
  width: 220px;
  height: 175px;
  border-radius: 10px;
  overflow: hidden;
  display: block;
}
.next-case__img img,
picture.next-case__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* Breaker at Bottom */
.breaker--light {
  background: #f6f6ee;
  color: #17100a;
  text-align: center;
  padding: 80px 0;
}
.breaker--compact h2 {
  font-family: DM Sans, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 40px;
  font-weight: 500;
  line-height: 46px;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

/* Mobile & Tablet Adjustments */
@media (max-width: 991.98px) {
  .detail-head {
    padding: 48px 0 0;
  }
  .detail-head--cs h1,
  .detail-head--cs .h1 {
    font-size: 36px;
    line-height: 42px;
  }
  .detail-head--cs .detail-meta {
    grid-template-rows: auto;
    grid-auto-flow: row;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 28px;
  }
  .cs-block {
    padding: 32px 0 24px;
  }
  .detail-body--cs > h2,
  .detail-body--cs > .h2 {
    margin-top: 40px;
  }
}
@media (max-width: 767.98px) {
  .next-case {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 24px 20px;
    gap: 20px;
  }
  .next-case__img,
  picture.next-case__img {
    width: 100%;
    height: 200px;
  }
}

/* Proportional 2K & 4K Scaling */
@media (min-width: 2560px) {
  .detail-head__row,
  .detail-body--cs,
  .next-case {
    max-width: 1040px;
  }
  .cs-hero {
    max-width: 1560px;
  }
  .detail-head--cs h1 {
    font-size: 64px;
    line-height: 72px;
  }
  .cs-block > h2 {
    font-size: 36px;
    line-height: 44px;
  }
  .detail-body--cs .cs-lead {
    font-size: 26px;
    line-height: 36px;
  }
}
@media (min-width: 3400px) {
  .detail-head__row,
  .detail-body--cs,
  .next-case {
    max-width: 1440px;
  }
  .cs-hero {
    max-width: 2160px;
  }
  .detail-head--cs h1 {
    font-size: 88px;
    line-height: 98px;
  }
  .cs-block > h2 {
    font-size: 48px;
    line-height: 58px;
  }
  .detail-body--cs .cs-lead {
    font-size: 36px;
    line-height: 48px;
  }
}
