/* ============================================================
   Case History Page Styles
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   HERO
   ──────────────────────────────────────────────────────────── */

.cs-hero {
  background:
    linear-gradient(160deg, rgba(212,212,212,0.62) 0%, rgba(235,235,235,0.56) 75%),
    url('../../background.jpg') left center / cover;
  padding-bottom: var(--space-2xl);
}

/* Breadcrumb inherits the gradient — no seam */
.cs-hero .breadcrumb {
  background: transparent;
  padding-top: var(--space-xs);
  padding-bottom: var(--space-md);
}

/* Two-column grid: title+tagline left, meta right */
.cs-hero__layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2xl);
  align-items: center;
}

.cs-hero__left {
  min-width: 0;
}

.cs-hero__eyebrow {
  font-family: var(--font-heading);
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-red-dark);
  margin-bottom: var(--space-sm);
}

.cs-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 2.9vw, 2.7rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-black);
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

/* ── Tagline (subtitle below H1) ── */

.cs-hero__tagline {
  font-size: var(--font-size-lg);
  color: var(--color-grey-dark);
  line-height: 1.55;
  margin-top: var(--space-md);
  margin-bottom: 0;
}

/* ── Right column: vertically stacked meta items ── */

.cs-hero__right {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  border-left: 1px solid #c4c4c4;
  padding-left: var(--space-2xl);
  flex-shrink: 0;
  align-self: stretch;
  justify-content: center;
}

.cs-hero__meta-item {
  display: flex;
  flex-direction: column;
}

.cs-hero__meta-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-red-dark);
}

.cs-hero__meta-value {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-black);
  margin-top: 2px;
  white-space: nowrap;
}

/* ────────────────────────────────────────────────────────────
   TWO-COLUMN LAYOUT
   ──────────────────────────────────────────────────────────── */

.cs-layout {
  background-color: var(--color-white);
  padding: var(--space-2xl) 0;
}

.cs-layout__grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: var(--space-2xl);
  align-items: start;
}

/* ────────────────────────────────────────────────────────────
   BODY (PROSE)
   ──────────────────────────────────────────────────────────── */

.cs-body h2,
.cs-body h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-red-dark);
  text-transform: uppercase;
  letter-spacing: 0.055em;
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: var(--space-xl) 0 var(--space-sm);
}

.cs-body h2::before,
.cs-body h3::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-red-dark);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.cs-body h2:first-child,
.cs-body h3:first-child {
  margin-top: 0;
}

.cs-body p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--color-grey-dark);
  margin-bottom: var(--space-md);
}

.cs-body strong {
  color: var(--color-black);
}

.cs-body ul,
.cs-body ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.cs-body li {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-grey-dark);
  margin-bottom: var(--space-xs);
}

/* Pull quote blockquote */
.cs-body blockquote {
  border-left: 4px solid var(--color-red-dark);
  background: var(--color-bg-secondary);
  margin: var(--space-xl) var(--space-lg) var(--space-xl) var(--space-2xl);
  padding: var(--space-md) var(--space-xl);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.cs-body blockquote p {
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--color-black);
  line-height: 1.6;
  margin-bottom: 0;
}

.cs-body blockquote cite {
  display: block;
  font-size: var(--font-size-sm);
  font-style: normal;
  color: var(--color-grey);
  margin-top: var(--space-sm);
}

/* Inline images — no figcaption */
.cs-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: var(--space-xl) auto var(--space-xs);
  border-radius: var(--radius-sm);
}

/* Figures with captions */
.cs-body figure {
  margin: var(--space-xl) 0;
  text-align: center;
}

.cs-body figure img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  margin: 0 auto;
}

.cs-body figcaption {
  font-size: var(--font-size-sm);
  font-style: italic;
  color: var(--color-grey);
  margin-top: var(--space-xs);
  line-height: 1.4;
}

/* ────────────────────────────────────────────────────────────
   SIDEBAR
   ──────────────────────────────────────────────────────────── */

.cs-sidebar {
  position: sticky;
  top: calc(60px + var(--space-lg)); /* below sticky header */
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.cs-sb-section {
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-grey-light);
}

.cs-sb-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cs-sb-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-red-dark);
  margin-bottom: var(--space-sm);
}

/* Product chip */
.cs-sb-chip {
  display: inline-block;
  background: #fdf0f0;
  border: 1px solid #d0a0a0;
  color: var(--color-red-dark);
  font-size: var(--font-size-sm);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.cs-sb-chip:hover {
  background: #f8dede;
  border-color: var(--color-red-dark);
  text-decoration: none;
}

.cs-sb-pdf-link {
  font-size: var(--font-size-sm);
  color: var(--color-grey);
  display: block;
  transition: color var(--transition-fast);
}

.cs-sb-pdf-link:hover {
  color: var(--color-red-dark);
  text-decoration: none;
}

.cs-sb-product-link {
  font-size: var(--font-size-sm);
  color: var(--color-red-dark);
  display: block;
  transition: color var(--transition-fast);
}

.cs-sb-product-link:hover {
  color: var(--color-red);
  text-decoration: none;
}

/* Comparison boxes */
.cs-sb-note {
  font-size: 0.6875rem;
  color: var(--color-grey);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.cs-sb-compare {
  display: flex;
  gap: var(--space-sm);
}

.cs-sb-compare-box {
  flex: 1;
  background: var(--color-white);
  border: 1px solid var(--color-grey-light);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  text-align: center;
}

.cs-sb-compare-box__num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-black);
  line-height: 1;
  display: block;
}

.cs-sb-compare-box__lab {
  font-size: 0.6rem;
  color: var(--color-grey);
  margin-top: 3px;
  line-height: 1.35;
  display: block;
}

/* Single big stat */
.cs-sb-big-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-red-dark);
  line-height: 1;
}

.cs-sb-big-unit {
  font-size: var(--font-size-sm);
  color: var(--color-grey-dark);
  margin-top: 2px;
}

.cs-sb-big-desc {
  font-size: 0.6875rem;
  color: var(--color-grey);
  line-height: 1.4;
  margin-top: var(--space-xs);
}

/* Application tags */
.cs-sb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cs-sb-tag {
  font-size: 0.6875rem;
  color: var(--color-grey-dark);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-grey-light);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

/* Sidebar note (warranty, certification, etc.) */
.cs-sb-callout {
  background: var(--color-white);
  border: 1px solid var(--color-grey-light);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
}

.cs-sb-callout__head {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-red-dark);
  display: block;
  margin-bottom: 4px;
}

.cs-sb-callout p {
  font-size: 0.75rem;
  color: var(--color-grey-dark);
  line-height: 1.5;
  margin: 0;
}

/* ────────────────────────────────────────────────────────────
   FOOTER NAV
   ──────────────────────────────────────────────────────────── */

.cs-footer-nav {
  background-color: var(--color-bg-secondary);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-grey-light);
}

.cs-footer-nav__container {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Ghost button variant for footer nav */
.btn--ghost {
  background: var(--color-white);
  color: var(--color-grey-dark);
  border: 1.5px solid var(--color-grey-light);
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.btn--ghost:hover {
  border-color: var(--color-red-dark);
  color: var(--color-red-dark);
  background: var(--color-white);
  transform: none;
  box-shadow: none;
}

.cs-footer-nav__container .btn--secondary {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

/* ────────────────────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .cs-layout__grid {
    grid-template-columns: 1fr;
  }

  .cs-sidebar {
    position: static;
    padding: var(--space-lg);
  }

  .cs-sb-compare {
    max-width: 260px;
  }
}

@media (max-width: 768px) {
  .cs-hero__layout {
    grid-template-columns: 1fr;
  }

  .cs-hero__right {
    border-left: none;
    border-top: 1px solid #c4c4c4;
    padding-left: 0;
    padding-top: var(--space-lg);
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-lg);
  }

  .cs-hero__meta-item {
    min-width: 140px;
  }
}

@media (max-width: 640px) {
  .cs-hero__title {
    font-size: 1.6rem;
  }

  .cs-hero__tagline {
    font-size: var(--font-size-md);
  }
}

/* ────────────────────────────────────────────────────────────
   DESIGN BASIS / PERFORMANCE TABLE
   ──────────────────────────────────────────────────────────── */

.cs-design-table-wrap {
  overflow-x: auto;
  margin: var(--space-lg) 0 var(--space-xl);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-grey-light);
}

.cs-design-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  min-width: 580px;
}

.cs-design-table caption {
  font-family: var(--font-heading);
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--color-black);
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-grey-light);
  caption-side: top;
}

.cs-design-table thead th {
  background: var(--color-red-dark);
  color: var(--color-white);
  padding: 7px 10px;
  font-weight: 600;
  font-size: 0.8125rem;
  text-align: left;
}

.cs-design-table td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--color-grey-light);
  color: var(--color-grey-dark);
  line-height: 1.4;
  vertical-align: middle;
}

/* First column of each pair = parameter label */
.cs-design-table td:nth-child(1),
.cs-design-table td:nth-child(3) {
  color: var(--color-black);
  font-weight: 500;
}

/* Value columns — slightly muted weight */
.cs-design-table td:nth-child(2),
.cs-design-table td:nth-child(4) {
  white-space: nowrap;
}

/* Section header rows (30,000 scfm / 45,000 scfm) */
.cs-design-table .cs-dt-section td {
  background: #f5efef;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-red-dark);
  padding: 7px 10px;
  border-top: 2px solid var(--color-red-dark);
  letter-spacing: 0.02em;
}

.cs-design-table tbody:first-of-type .cs-dt-section td {
  border-top: 1px solid var(--color-grey-light);
}

/* ────────────────────────────────────────────────────────────
   INLINE MEDIA GRIDS
   ──────────────────────────────────────────────────────────── */

.cs-media-grid {
  display: grid;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}

.cs-media-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.cs-media-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Override .cs-body figure rules with higher specificity */
.cs-body .cs-media-grid figure {
  margin: 0;
  text-align: left;
  overflow: hidden;
  border-radius: var(--radius-sm);
  aspect-ratio: 1;
}

.cs-body .cs-media-grid--2 figure {
  aspect-ratio: 4/3;
}

/* Override .cs-body figure img { height: auto } */
.cs-body .cs-media-grid figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
}

@media (max-width: 640px) {
  .cs-media-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .cs-media-grid--2 {
    grid-template-columns: 1fr;
  }
}
