/* ============================================================
   SHARED CASE STUDY STYLES
   Used by: eqcapture.html, search.html, wayfair.html
============================================================ */

/* ---- FULL-BLEED ---- */
.cs-bleed {
  margin-left: calc(-1 * clamp(20px, 5vw, 32px));
  margin-right: calc(-1 * clamp(20px, 5vw, 32px));
}
@media (min-width: 600px) {
  .cs-bleed {
    margin-left: calc(-1 * clamp(32px, 8vw, 64px));
    margin-right: calc(-1 * clamp(32px, 8vw, 64px));
  }
}
@media (min-width: 1200px) {
  .cs-bleed {
    margin-left: calc(-1 * clamp(80px, 12vw, 200px));
    margin-right: calc(-1 * clamp(80px, 12vw, 200px));
  }
}

/* Re-adds padding inside full-bleed sections */
.cs-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: clamp(20px, 5vw, 32px);
  padding-right: clamp(20px, 5vw, 32px);
}
@media (min-width: 600px) {
  .cs-inner {
    padding-left: clamp(32px, 8vw, 64px);
    padding-right: clamp(32px, 8vw, 64px);
  }
}
@media (min-width: 1200px) {
  .cs-inner {
    padding-left: clamp(80px, 12vw, 200px);
    padding-right: clamp(80px, 12vw, 200px);
  }
}

/* Narrow text column */
.cs-text {
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
}

/* Section spacing */
.cs-section {
  margin-top: 72px;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

/* Eyebrow label */
.cs-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-link);
  margin-bottom: 10px;
}

/* Section headings */
.cs-h2 {
  font-size: clamp(1.2rem, 2.8vw, 1.65rem);
  font-weight: 700;
  color: var(--color-text-main);
  margin: 6px 0 18px;
  line-height: 1.3;
}

/* Body text */
.cs-p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-main);
  margin: 0 0 14px;
}

/* ---- HERO (base) ---- */
.cs-hero {
  position: relative;
  padding: 96px 0 88px;
  margin-top: -8px;
  min-height: 380px;
  box-sizing: border-box;
}

.cs-hero .cs-inner {
  position: relative;
  z-index: 2;
}

/* Hero image + fade (used by eqcapture + wayfair) */
.cs-hero-img-wrap {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 62%;
  overflow: hidden;
  pointer-events: none;
}

.cs-hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.cs-hero-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cs-hero-content {
  max-width: 700px;
}

.cs-hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
}

.cs-hero-h {
  display: block;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 28px;
}

.cs-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
}

.cs-meta-row strong {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}

@media (max-width: 600px) {
  .cs-hero { padding: 56px 0 52px; }
  .cs-meta-row { gap: 6px 16px; }
}

/* ---- ROLE BAR ---- */
.cs-role-bar {
  background: var(--color-grey-light);
}

.cs-role-bar .cs-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 32px;
  padding-top: 32px;
  padding-bottom: 32px;
}

.cs-role-col-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-link);
  margin-bottom: 6px;
}

.cs-role-col-val {
  font-size: 0.875rem;
  color: var(--color-text-main);
  line-height: 1.55;
}

@media (max-width: 600px) {
  .cs-role-bar .cs-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ---- IMAGES ---- */
.cs-img {
  width: 100%;
  display: block;
  border-radius: 12px;
  cursor: zoom-in;
}

.cs-img-wrap {
  margin: 32px 0 0;
}

/* ---- 2-COLUMN IMAGE GRID ---- */
.cs-img-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0 0;
  align-items: start;
}

.cs-img-2col .img-box {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.cs-img-2col .img-box img {
  width: 100%;
  display: block;
  border-radius: 0;
}

@media (max-width: 600px) {
  .cs-img-2col { grid-template-columns: 1fr; }
}

/* ---- CAPTION ---- */
.cs-caption {
  font-size: 0.78rem;
  color: var(--color-text);
  font-style: italic;
  text-align: center;
  margin: 8px 0 0;
  line-height: 1.45;
}

/* ---- PULL QUOTE ---- */
.cs-pullquote {
  border-left: 3px solid var(--color-link);
  padding: 10px 20px;
  margin: 28px 0;
  font-size: 1.02rem;
  font-style: italic;
  font-weight: 500;
  color: var(--color-text-main);
  line-height: 1.55;
}

/* ---- DECISION CARDS (eqcapture + wayfair) ---- */
.cs-decision-card {
  background: var(--color-grey-light);
  border-radius: var(--radius-card);
  padding: 28px 32px 32px;
  margin-bottom: 0;
}

.cs-decision-num {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--color-link);
  opacity: 0.35;
  line-height: 1;
  margin-bottom: 6px;
}

.cs-decision-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin: 0 0 12px;
}

.cs-decision-block {
  margin-bottom: 56px;
}

.cs-decision-block:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .cs-decision-card {
    padding: 20px 20px 24px;
  }
}

/* ---- PATTERN GRID (search + wayfair) ---- */
.cs-pattern-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 32px 0 0;
}

.cs-pattern-grid figure {
  margin: 0;
}

.cs-pattern-grid img {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.cs-pattern-grid figcaption {
  font-size: 0.75rem;
  color: var(--color-text);
  font-style: italic;
  text-align: center;
  margin-top: 6px;
}

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

/* ---- LIGHTBOX ---- */
.lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lb-overlay.is-open {
  display: flex;
}

.lb-overlay img,
.lb-overlay video {
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
  cursor: default;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}

/* ---- LIGHTBOX MEDIA WRAP + NAV ARROWS ---- */
.lb-media-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none !important;
  box-shadow: none !important;
  border: none;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  color: rgba(255,255,255,0.55);
  font-size: 2.8rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  user-select: none;
  z-index: 1;
}
.lb-arrow:hover,
.lb-arrow:focus { background: none !important; box-shadow: none !important; color: #fff; outline: none; }
.lb-arrow-prev { right: calc(100% + 40px); }
.lb-arrow-next { left: calc(100% + 40px); }
.lb-overlay.has-nav .lb-arrow { display: flex; }

/* ---- IMPACT STRIP (base) ---- */
.cs-impact {
  padding: 64px 0;
  margin-top: 72px;
}

.cs-impact .cs-inner {
  display: grid;
  gap: 32px;
  text-align: center;
}

.cs-impact-num {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 10px;
}

.cs-impact-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
}

.cs-impact-label strong {
  display: block;
  color: #fff;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.88rem;
}

/* ---- REFLECTION ---- */
.cs-reflection {
  background: var(--color-grey-light);
  padding: 56px 0 64px;
  margin-top: 0;
}

/* ---- BACK LINK ---- */
.cs-back-wrap {
  text-align: center;
  padding: 48px 0 72px;
}

.cs-back-link {
  color: var(--color-link);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s cubic-bezier(.37,1.13,.62,.96);
}

.cs-back-link:hover {
  transform: translateX(-3px);
}
