/* ============================================
   DGTL Depot — Case Study Page Components
   Shared by all /work/[slug]/ detail pages
   ============================================ */

html { scroll-padding-top: 100px; }

/* ============ HERO ============ */
.dd-cs-hero {
  position: relative;
  padding: 160px 24px 80px;
  background:
    radial-gradient(ellipse 60% 80% at 20% 30%, rgba(45,52,214,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 60%, rgba(123,47,190,0.20) 0%, transparent 60%),
    var(--dd-bg);
  overflow: hidden;
}
.dd-cs-hero__inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.dd-cs-hero__overline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--dd-cyan); margin-bottom: 18px;
}
.dd-cs-hero__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 5vw, 60px); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.02em;
  color: var(--dd-white); margin-bottom: 18px;
}
.dd-cs-hero__location {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 500; color: var(--dd-text-muted);
  margin-bottom: 24px; display: inline-flex; align-items: center; gap: 8px;
}
.dd-cs-hero__location::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--dd-cyan); box-shadow: 0 0 12px var(--dd-cyan);
}
.dd-cs-hero__summary {
  font-size: 18px; color: var(--dd-text-light); line-height: 1.6;
  margin-bottom: 28px; max-width: 480px;
}
.dd-cs-hero__tags {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px;
}
.dd-cs-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 6px 14px; border-radius: 100px;
  border: 1px solid var(--dd-border); color: var(--dd-text-light);
}
.dd-cs-tag--cyan { border-color: rgba(48,168,236,0.45); color: var(--dd-cyan); }
.dd-cs-tag--purple { border-color: rgba(123,47,190,0.45); color: var(--dd-purple-light); }
.dd-cs-tag--blue { border-color: rgba(74,80,224,0.45); color: var(--dd-blue-light); }
.dd-cs-tag--cyan-light { border-color: rgba(56,241,246,0.45); color: var(--dd-cyan-light); }

.dd-cs-stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--dd-border);
  border-radius: 12px; overflow: hidden; max-width: 440px;
}
.dd-cs-stat {
  background: var(--dd-card); padding: 20px 16px; text-align: center;
}
.dd-cs-stat__value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px; font-weight: 700; color: var(--dd-white);
  line-height: 1; margin-bottom: 6px;
}
.dd-cs-stat__value .up { color: #68D391; }
.dd-cs-stat__value--gradient {
  background: var(--dd-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dd-cs-stat__label {
  font-size: 11px; color: var(--dd-text-muted);
  letter-spacing: 0.04em;
}

/* Hero device showcase (browser frame with screenshot) */
.dd-cs-device {
  background: var(--dd-card); border-radius: 12px;
  border: 1px solid var(--dd-border); overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(74,80,224,0.18);
}
.dd-cs-device__bar {
  height: 36px; background: rgba(8,8,15,0.6); display: flex;
  align-items: center; padding: 0 14px; gap: 6px;
  border-bottom: 1px solid var(--dd-border);
}
.dd-cs-device__dot { width: 10px; height: 10px; border-radius: 50%; }
.dd-cs-device__dot--r { background: rgba(229,62,62,0.7); }
.dd-cs-device__dot--y { background: rgba(236,201,75,0.7); }
.dd-cs-device__dot--g { background: rgba(56,161,105,0.7); }
.dd-cs-device__url {
  margin-left: 10px; font-family: 'Inter', sans-serif;
  font-size: 11px; color: var(--dd-text-muted);
  background: rgba(8,8,15,0.5); padding: 4px 12px; border-radius: 4px;
}
.dd-cs-device__screen { display: block; width: 100%; height: auto; }

/* ============ SCROLL FRAME (clips long page screenshots) ============ */
/* Default = device/browser-frame body height; --card override is shorter for grid cards. */
.dd-cs-scroll-frame {
  position: relative;
  width: 100%;
  height: 460px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--dd-bg);
  scrollbar-width: thin;
  scrollbar-color: var(--dd-border) transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.dd-cs-scroll-frame--card { height: 300px; }
.dd-cs-scroll-frame > img { display: block; width: 100%; height: auto; }
.dd-cs-scroll-frame::-webkit-scrollbar { width: 8px; }
.dd-cs-scroll-frame::-webkit-scrollbar-track { background: transparent; }
.dd-cs-scroll-frame::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18); border-radius: 4px;
}
.dd-cs-scroll-frame::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.32); }
@media (max-width: 960px) {
  .dd-cs-scroll-frame { height: 420px; }
  .dd-cs-scroll-frame--card { height: 320px; }
}
@media (max-width: 600px) {
  .dd-cs-scroll-frame { height: 380px; }
  .dd-cs-scroll-frame--card { height: 300px; }
}

/* ============ SECTION SHELL ============ */
.dd-cs-section { padding: 100px 24px; position: relative; }
.dd-cs-section:nth-of-type(even) { background: rgba(22,22,40,0.4); }
.dd-cs-section__inner { max-width: 1200px; margin: 0 auto; }
.dd-cs-section__header { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.dd-cs-section__overline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--dd-cyan); margin-bottom: 16px;
  display: inline-block;
}
.dd-cs-section__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4vw, 44px); font-weight: 700;
  line-height: 1.1; letter-spacing: -0.02em;
  color: var(--dd-white); margin-bottom: 16px;
}
.dd-cs-section__title-accent {
  background: var(--dd-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dd-cs-section__subtitle {
  font-size: 17px; color: var(--dd-text); line-height: 1.6;
}

/* ============ OVERVIEW ============ */
.dd-cs-overview__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.dd-cs-overview__copy h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; color: var(--dd-white); margin-bottom: 16px;
}
.dd-cs-overview__copy p {
  font-size: 16px; color: var(--dd-text); line-height: 1.7;
  margin-bottom: 16px;
}
.dd-cs-overview__challenges {
  display: flex; flex-direction: column; gap: 12px; margin-top: 24px;
}
.dd-cs-challenge {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; background: rgba(229,62,62,0.06);
  border: 1px solid rgba(229,62,62,0.18); border-radius: 8px;
}
.dd-cs-challenge__icon {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(229,62,62,0.2); color: #FC8181;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.dd-cs-challenge__text { font-size: 14px; color: var(--dd-text-light); line-height: 1.5; }

/* ============ IMAGE GRIDS ============ */
.dd-cs-grid {
  display: grid; gap: 24px;
}
.dd-cs-grid--2 { grid-template-columns: repeat(2, 1fr); }
.dd-cs-grid--3 { grid-template-columns: repeat(3, 1fr); }
.dd-cs-grid--4 { grid-template-columns: repeat(4, 1fr); }

.dd-cs-card {
  background: var(--dd-card); border-radius: 12px;
  border: 1px solid var(--dd-border); overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease;
}
.dd-cs-card:hover {
  transform: translateY(-4px);
  border-color: rgba(48,168,236,0.4);
}
.dd-cs-card__img {
  display: block; width: 100%; height: auto;
  background: var(--dd-bg);
}
.dd-cs-card__caption {
  padding: 14px 18px; font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-weight: 500; color: var(--dd-text-light);
  letter-spacing: 0.02em;
}

/* ============ BEFORE/AFTER ============ */
.dd-cs-ba {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 24px; align-items: stretch; margin-bottom: 32px;
}
.dd-cs-ba__col { display: flex; flex-direction: column; gap: 14px; }
.dd-cs-ba__label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 8px 14px;
  border-radius: 6px; align-self: flex-start;
}
.dd-cs-ba__label--before {
  color: #FC8181; background: rgba(229,62,62,0.08);
  border: 1px solid rgba(229,62,62,0.25);
}
.dd-cs-ba__label--after {
  color: #68D391; background: rgba(56,161,105,0.08);
  border: 1px solid rgba(56,161,105,0.25);
}
.dd-cs-ba__device {
  background: var(--dd-card); border-radius: 10px;
  border: 1px solid var(--dd-border); overflow: hidden;
  flex: 1; display: flex; flex-direction: column;
}
.dd-cs-ba__device--before { border-color: rgba(229,62,62,0.22); }
.dd-cs-ba__device--after { border-color: rgba(56,161,105,0.22); }
.dd-cs-ba__device img {
  display: block; width: 100%; height: auto;
  background: var(--dd-bg); flex: 1; object-fit: cover; object-position: top;
}
.dd-cs-ba__divider {
  display: flex; align-items: center; justify-content: center;
  padding: 0 8px;
}
.dd-cs-ba__arrow {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--dd-gradient); display: flex;
  align-items: center; justify-content: center;
  color: var(--dd-white); font-size: 18px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(48,168,236,0.3);
}
.dd-cs-ba__scores {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--dd-border);
  border-radius: 8px; overflow: hidden;
}
.dd-cs-ba__score {
  background: var(--dd-card); padding: 12px 8px; text-align: center;
}
.dd-cs-ba__score-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700; line-height: 1;
}
.dd-cs-ba__score-val--low { color: #FC8181; }
.dd-cs-ba__score-val--mid { color: #ECC94B; }
.dd-cs-ba__score-val--high { color: #68D391; }
.dd-cs-ba__score-label {
  font-size: 10px; color: var(--dd-text-muted);
  letter-spacing: 0.04em; margin-top: 4px;
}

/* ============ PHONE FRAME (for chat widget) ============ */
.dd-cs-phone-wrap {
  display: flex; justify-content: center; align-items: center;
  padding: 40px 0;
}
.dd-cs-phone {
  width: 280px;
  height: 580px;
  background: #000;
  border-radius: 36px;
  border: 3px solid var(--dd-border);
  overflow: hidden;
  padding: 0;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 60px rgba(123,47,190,0.15);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.dd-cs-phone__notch {
  position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%); width: 80px; height: 18px;
  background: #000; border-radius: 12px; z-index: 2;
  border: 1px solid rgba(255,255,255,0.06);
}
.dd-cs-phone__screen {
  display: block; width: 100%; height: auto;
}

/* ============ CHAT WIDGET CAROUSEL ============ */
.dd-cs-carousel {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
}
.dd-cs-carousel__stage {
  display: grid;
  width: 100%;
  align-items: end;
}
.dd-cs-carousel__slide {
  grid-area: 1 / 1;
  display: block;
  width: 100%; height: auto;
  border-radius: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease;
  align-self: end;
}
.dd-cs-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
}
.dd-cs-carousel__arrow {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--dd-border);
  color: var(--dd-text);
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.dd-cs-carousel__arrow:hover {
  background: rgba(123,47,190,0.18);
  border-color: rgba(123,47,190,0.55);
  color: var(--dd-white);
  transform: translateY(-1px);
}
.dd-cs-carousel__arrow:focus-visible {
  outline: 2px solid var(--dd-purple);
  outline-offset: 2px;
}
.dd-cs-carousel__dots {
  position: absolute;
  left: 50%; bottom: -28px;
  transform: translateX(-50%);
  display: flex; gap: 8px;
}
.dd-cs-carousel__dot {
  width: 8px; height: 8px;
  padding: 0; border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.dd-cs-carousel__dot.is-active {
  background: var(--dd-gradient);
  transform: scale(1.15);
}
@media (max-width: 640px) {
  .dd-cs-carousel { gap: 8px; }
  .dd-cs-carousel__arrow { width: 36px; height: 36px; }
}

/* ============ NEXT CTA ============ */
.dd-cs-next {
  padding: 100px 24px;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(123,47,190,0.18) 0%, transparent 70%), var(--dd-bg);
  text-align: center;
}
.dd-cs-next__inner { max-width: 720px; margin: 0 auto; }
.dd-cs-next__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4vw, 44px); font-weight: 700;
  line-height: 1.1; letter-spacing: -0.02em;
  color: var(--dd-white); margin-bottom: 18px;
}
.dd-cs-next__title-accent {
  background: var(--dd-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dd-cs-next__subtitle {
  font-size: 17px; color: var(--dd-text);
  line-height: 1.6; margin-bottom: 32px;
}
.dd-cs-next__ctas {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}

/* ============ WORK CARD (shared by homepage, niche pages, /work index) ============ */
.dd-work-empty { padding: 60px 24px; text-align: center; color: var(--dd-text-muted); font-size: 15px; }
.dd-work-card {
  background: var(--dd-card);
  border: 1px solid var(--dd-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), border-color 0.4s ease, box-shadow 0.4s ease;
}
.dd-work-card:hover {
  transform: translateY(-6px);
  border-color: rgba(48,168,236,0.4);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(48,168,236,0.15);
}
.dd-work-card__hero {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--dd-bg);
}
.dd-work-card__hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
/* Center-anchor square logo thumbnails (Hyperwolf, URB, Panasun, VetComm, MD Blend, etc.) so the mark stays in frame */
.dd-work-card__hero img[src*="HW%20SQUARE"],
.dd-work-card__hero img[src*="HW SQUARE"],
.dd-work-card__hero img[src*="urb_logo_thumbnail"],
.dd-work-card__hero img[src*="panasun_solar_logo_thumbnail"],
.dd-work-card__hero img[src*="vetcomm_logo_thumnail"],
.dd-work-card__hero img[src*="MD_Blend_logl_thumbnail"] {
  object-position: center;
}
.dd-work-card__featured {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--dd-gradient);
  color: var(--dd-white);
  z-index: 2;
}
.dd-work-card__body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.dd-work-card__location {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dd-text-muted);
}
.dd-work-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--dd-white);
  line-height: 1.2;
}
.dd-work-card__summary {
  font-size: 14px;
  color: var(--dd-text);
  line-height: 1.6;
  flex: 1;
}
.dd-work-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.dd-work-card__stats {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 1px;
  background: var(--dd-border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
}
.dd-work-card__stat {
  background: rgba(8,8,15,0.4);
  padding: 10px;
  text-align: center;
}
.dd-work-card__stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--dd-white);
  line-height: 1;
}
.dd-work-card__stat-val .up { color: #68D391; }
.dd-work-card__stat-val--gradient {
  background: var(--dd-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dd-work-card__stat-label {
  font-size: 9px;
  color: var(--dd-text-muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .dd-cs-hero { padding: 130px 24px 60px; }
  .dd-cs-hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .dd-cs-overview__grid { grid-template-columns: 1fr; gap: 36px; }
  .dd-cs-grid--3 { grid-template-columns: 1fr; }
  .dd-cs-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .dd-cs-ba { grid-template-columns: 1fr; gap: 16px; }
  .dd-cs-ba__divider { padding: 8px 0; }
  .dd-cs-ba__arrow { transform: rotate(90deg); }
  .dd-cs-section { padding: 72px 24px; }
}
@media (max-width: 600px) {
  .dd-cs-grid--2 { grid-template-columns: 1fr; }
  .dd-cs-grid--4 { grid-template-columns: 1fr; }
  .dd-cs-stats { grid-template-columns: 1fr 1fr; max-width: none; }
  .dd-cs-ba__scores { grid-template-columns: repeat(2, 1fr); }
}

/* ============ EMAIL SCROLL PHONE (stacked images in a single scroll container) ============ */
.dd-cs-email-phone {
  background: #0a0a14;
  border-radius: 28px;
  border: 3px solid var(--dd-border);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 60px rgba(123,47,190,0.15);
  position: relative;
  width: 320px;
  max-width: 100%;
  margin: 0 auto;
}
.dd-cs-email-phone__scroll {
  height: 640px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: var(--dd-border) transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.dd-cs-email-phone__scroll img { display: block; width: 100%; height: auto; }
.dd-cs-email-phone__scroll::-webkit-scrollbar { width: 6px; }
.dd-cs-email-phone__scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 4px; }
.dd-cs-email-phone__caption {
  padding: 12px 14px;
  background: rgba(8,8,15,0.6);
  border-top: 1px solid rgba(255,255,255,0.06);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; font-weight: 500;
  color: var(--dd-text-light);
  text-align: center;
  letter-spacing: 0.02em;
}
@media (max-width: 600px) {
  .dd-cs-email-phone { width: 280px; }
  .dd-cs-email-phone__scroll { height: 540px; }
}

/* ============ VIDEO CARD (autoplay muted loop) ============ */
.dd-cs-video-card {
  background: var(--dd-card);
  border-radius: 12px;
  border: 1px solid var(--dd-border);
  overflow: hidden;
  position: relative;
  aspect-ratio: 9 / 16;
  display: flex;
  flex-direction: column;
}
.dd-cs-video-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.dd-cs-video-card__caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--dd-text-light);
  background: linear-gradient(to top, rgba(8,8,15,0.85) 0%, transparent 100%);
  letter-spacing: 0.02em;
  z-index: 2;
}
/* Smaller video card variant — for tucked-in sections like social 3D content */
.dd-cs-video-card--sm {
  max-width: 240px;
  margin: 0 auto;
}

/* ============ AUTO-SIZED CARD (no scroll-frame, image at natural height) ============ */
/* Use for dashboard screenshots that already fit naturally. Pair with .dd-cs-grid--align-end so card bottoms align across a row. */
.dd-cs-card--auto {
  display: flex;
  flex-direction: column;
}
.dd-cs-card--auto > img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--dd-bg);
}
.dd-cs-card--auto .dd-cs-card__caption {
  margin-top: auto;
}
.dd-cs-grid--align-end { align-items: end; }

/* Email design grid — always 2-up until very small mobile */
.dd-cs-email-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  justify-items: center;
}
@media (max-width: 700px) {
  .dd-cs-email-grid { grid-template-columns: 1fr; }
}

/* ============ TECH STACK COLUMN VIZ (Start / Now or Start / Past / Now) ============ */
.dd-cs-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  background: var(--dd-card);
  border: 1px solid var(--dd-border);
  border-radius: 16px;
  overflow: hidden;
}
.dd-cs-stack--3col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dd-cs-stack__col {
  padding: 36px 28px;
  border-right: 1px solid var(--dd-border);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.dd-cs-stack__col:last-child { border-right: none; }
.dd-cs-stack__col--now {
  background: linear-gradient(180deg, rgba(48,168,236,0.08), rgba(123,47,190,0.10));
}
.dd-cs-stack__phase {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dd-text-muted);
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--dd-border);
}
.dd-cs-stack__col--now .dd-cs-stack__phase { color: var(--dd-cyan); }
.dd-cs-stack__group h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--dd-white);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--dd-border);
}
.dd-cs-stack__group ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dd-cs-stack__group li {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--dd-text-light);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.dd-cs-stack__group li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--dd-text-muted);
}
.dd-cs-stack__col--now .dd-cs-stack__group li::before {
  background: var(--dd-cyan);
}
.dd-cs-stack__savings {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #68D391;
  margin-top: 6px;
  display: inline-block;
}
@media (max-width: 800px) {
  .dd-cs-stack { grid-template-columns: 1fr; }
  .dd-cs-stack__col { border-right: none; border-bottom: 1px solid var(--dd-border); }
  .dd-cs-stack__col:last-child { border-bottom: none; }
}

/* ============ MATCHED-HEIGHT CARD PAIR (e.g. wide + tall image at same height) ============ */
.dd-cs-card--matched .dd-cs-card__scroll {
  height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--dd-bg);
  scrollbar-width: thin;
  scrollbar-color: var(--dd-border) transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.dd-cs-card--matched .dd-cs-card__scroll > img {
  display: block;
  width: 100%;
  height: auto;
}
.dd-cs-card--matched .dd-cs-card__scroll::-webkit-scrollbar { width: 6px; }
.dd-cs-card--matched .dd-cs-card__scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.20); border-radius: 4px;
}
@media (max-width: 700px) {
  .dd-cs-card--matched .dd-cs-card__scroll { height: 320px; }
}

/* ============ CAMPAIGN GRID — mobile carousel ============ */
/* Desktop: keep whatever grid the section uses. Mobile: horizontal snap carousel. */
@media (max-width: 700px) {
  .dd-cs-campaign-grid {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 85% !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding: 12px;
    gap: 16px !important;
    padding: 8px 12px 24px;
    margin: 0 -12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .dd-cs-campaign-grid > * {
    scroll-snap-align: center;
    min-width: 0;
  }
  /* In matched-card mode on mobile, shrink scroll height so the card isn't oversized */
  .dd-cs-campaign-grid .dd-cs-card--matched .dd-cs-card__scroll { height: 280px; }
}
