/* ═══════════════════════════════════════════════════════════
   CASE STUDIES / กรณีศึกษา PAGE — page-specific styles only.
   Header, footer, buttons, colors, .section, .section-header,
   .view-all, .reveal and the whole .cases-grid.results-grid /
   .case-card component all come from the shared css/styles.css
   (same file the homepage's "Selected Work" section uses), so the
   case cards stay pixel-identical to the homepage without duplicating
   them here. Only the page hero + burst banner (ported from the
   Service page) live here.
   ═══════════════════════════════════════════════════════════ */

/* Keep the current nav item ("กรณีศึกษา") visibly active while on this page */
.nav-item.current > .nav-link { color: var(--navy); }
.nav-item.current > .nav-link::after { transform: scaleX(1); }

/* ── PAGE HERO — compact page-header banner (same as the Service page) ── */
.page-hero {
  position: relative;
  height: 380px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.page-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg,
    rgba(34,149,196,.92) 0%,
    rgba(34,149,196,.62) 32%,
    rgba(34,149,196,.18) 62%,
    rgba(34,149,196,0) 85%);
}
.page-hero-content {
  position: relative;
  z-index: 1;
  padding: 0 64px 48px;
  width: 100%;
}
.page-hero-title {
  font-family: var(--display);
  font-size: clamp(32px, 4.2vw,52px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0;
}

@media (max-width: 960px) {
  .page-hero { height: 320px; }
  .page-hero-content { padding: 0 32px 32px; }
}
@media (max-width: 600px) {
  .page-hero { height: 260px; }
  .page-hero-content { padding: 0 24px 24px; }
}

/* ── BURST BANNER — 'Our success story' + scattered hexagons.
   Matches case-study-factory.html: diagonal cyan gradient band with
   6 scattered clip-path hexagons in blue/white tints, replacing the
   earlier solid-fill + circuit-texture treatment. ── */
.burst-banner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(120deg, #1E86B4 0%, #2295C4 55%, #23a0cf 100%);
  padding: 56px 64px;
  display: flex;
  justify-content: center;
}
.burst-banner-inner { position: relative; z-index: 2; max-width: 1000px; text-align: center; }
.burst-banner-text {
  margin: 0;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.2;
}
.burst-banner-sub {
  margin: 12px 0 0;
  color: rgba(255,255,255,.92);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.66;
}
/* Scattered hexagons — CSS clip-path hexagons in blue/white tints */
.bb-hex {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
}
.bb-hex-1 { width: 120px; height: 120px; left: 4%;  top: -28px;  background: rgba(255,255,255,.14); transform: rotate(8deg); }
.bb-hex-2 { width: 74px;  height: 74px;  left: 15%; bottom: -22px; background: rgba(21,36,74,.22); }
.bb-hex-3 { width: 168px; height: 168px; right: 6%;  top: -46px;  background: rgba(255,255,255,.10); transform: rotate(-6deg); }
.bb-hex-4 { width: 92px;  height: 92px;  right: 18%; bottom: -30px; background: rgba(21,36,74,.18); transform: rotate(10deg); }
.bb-hex-5 { width: 54px;  height: 54px;  left: 42%; top: -18px;   background: rgba(255,255,255,.16); }
.bb-hex-6 { width: 64px;  height: 64px;  right: 34%; bottom: -20px; background: rgba(255,255,255,.12); transform: rotate(-12deg); }

@media (max-width: 960px) {
  .burst-banner { padding: 44px 32px; }
  .bb-hex-3 { width: 120px; height: 120px; }
  .bb-hex-1 { width: 96px; height: 96px; }
}
@media (max-width: 600px) {
  .burst-banner { padding: 36px 24px; }
  .bb-hex-5, .bb-hex-6 { display: none; }
  .burst-banner-sub { font-size: 18px; }
}

/* ═══════════════════════════════════════════════════════════
   PAGE-REVIEW REFINEMENTS
   ═══════════════════════════════════════════════════════════ */

/* #7 — Breadcrumb bar: shared component now lives in css/styles.css
   (.hero-crumb-bar) so its position is pixel-identical across all pages. */

/* #3 — Background gradient + hexagon, matching about.html's .about-hero
   treatment exactly: cyan-tinted radial ellipse near the top-left, a
   fainter navy one near the bottom-right, over the plain paper color —
   with the hexagon graphic bleeding in from the right (same asset,
   same size/position/opacity as about.html), independent of the
   gradient's corner. */
.ci-band {
  position: relative;
  background:
    radial-gradient(ellipse 55% 60% at 14% 18%, rgba(45, 133, 194, .14) 0%, transparent 65%),
    radial-gradient(ellipse 50% 55% at 92% 82%, rgba(35, 57, 105, .10) 0%, transparent 65%),
    var(--paper);
  color: var(--navy);
  overflow: hidden;
}
.ci-band::before { display: none; }          /* drop the dark-band diagonal sheen */
.ci-band::after  { display: none; }           /* removed the large hexagon element behind the page */

/* #1 — 5 cards, 2 columns (2 + 2 + 1). Each card stacks image on TOP with the
   text body BELOW it. Reuses the homepage's .case-card component
   (see css/styles.css) — plain white card, no border/shadow/accent line. */
.case-grid-221 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* 3 cards top row, 2 cards bottom row */
  align-items: start;                       /* cards size to their content — no loose empty space */
  column-gap: 32px;
  row-gap: 64px;
}
.case-grid-221 .case-card {
  flex-direction: column;
  align-items: stretch;
}
.case-grid-221 .case-img {
  flex: none;
  height: 220px;
  margin-bottom: 0;              /* the cyan category bar sits directly under it */
}
.case-grid-221 .case-body {
  flex: 1 1 auto;
  padding: 0 4px 4px;
}
.case-grid-221 .case-body p { margin-bottom: 14px; }
/* Pull the "อ่านเพิ่มเติม" button right up under the description — zero
   out both the footer-row's own margin-top and .case-more's 16px
   margin-top (from the shared .case-more rule in styles.css), so the
   paragraph's own margin-bottom (14px) is the only gap left. */
.case-grid-221 .case-footer-row { margin-top: 0; }
.case-grid-221 .case-more { margin-top: 0; }

@media (max-width: 1000px) {
  .case-grid-221 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .case-grid-221 { grid-template-columns: 1fr; gap: 26px; }
  .case-grid-221 .case-img { height: 200px; }
}

/* #2 — English category bar: cyan→navy gradient, a full-width block placed
   directly BELOW each card image (one per topic). */
.case-dept-bar {
  display: block;
  padding: 12px 18px;
  margin-bottom: 18px;          /* gap before the Thai title/body */
  background: linear-gradient(120deg, #2295C4 0%, #2D85C2 52%, #16406E 100%);
  color: #fff;
  font-family: var(--sans-en);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.25;
}
@media (max-width: 640px) {
  .case-dept-bar { font-size: 18px; padding: 10px 16px; }
}

/* ═══════════════════════════════════════════════════════════
   20260717 client feedback (sheet):
   20260721 แก้: กลับไปใช้ฟอนต์เดิม Noto Sans Thai แบบหน้า home (TH Sarabun New ใช้เฉพาะหน้า article-detail)
   ② เพิ่มขนาดฟอนต์พื้นฐานทั้งหน้าให้ใหญ่ขึ้น (16px → 18px)
   ═══════════════════════════════════════════════════════════ */
:root {
  --sans-th: 'Noto Sans Thai', system-ui, sans-serif;
  --sans-en: 'Noto Sans Thai', system-ui, sans-serif;
  --sans-jp: 'Noto Sans Thai', 'Noto Sans JP', sans-serif;
  --serif-jp: 'Noto Sans Thai', 'Noto Sans JP', sans-serif;
  --display: 'Noto Sans Thai', sans-serif;
}
body { font-size: 18px; }
