/* ═══════════════════════════════════════════════════════════
   CASE STUDIES · PRODUCTION & SUPPLY CHAIN — page-specific styles.
   Header, footer, buttons, colors, .section, .reveal, .ci-band come
   from the shared css/styles.css. This file adds: the page hero +
   burst banner (same as the Service page) and the case-study card
   grid, styled after the homepage's .case-card / .case-grid-221
   (case-study.html) family — cut-corner image, gradient category
   badge, hover lift + image zoom. All font-sizes are even numbers.
   ═══════════════════════════════════════════════════════════ */

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

/* ── PAGE HERO — same compact banner 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; }
}

/* ── SECTION on a soft "about"-style gradient (light bg, dark header) ── */
.ci-band {
  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; }
#case-hex.section { padding-top: 64px; padding-bottom: 72px; }   /* compact height */
#case-hex .section-header { border-bottom: 0; padding-bottom: 0; margin-bottom: 28px; }
#case-hex .eyebrow { color: var(--cyan-deep); }
#case-hex .section-title { color: var(--navy); }
#case-hex .section-title span { color: var(--cyan); font-weight: 400; }

/* ═══════════════ CASE-STUDY CARD GRID ═══════════════
   Same family as .case-card / .case-grid-221 (styles.css / case-study.css):
   white card, cut-corner image, gradient category badge, hover lift.
   Two flourishes layered on top for a more modern feel: a top accent bar
   that thickens on hover, and the image zooming inside its notched frame
   instead of staying static. The notch lives on the media only (never on
   a bordered element), so there's no border/clip-path corner to fight. */
.prod-case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.prod-case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--border);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.prod-case-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(35, 57, 105, .16);
  border-color: var(--cyan);
}
.prod-case-media {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--navy-deep);
  /* Cut-corner frame — same 22px notch language as the rest of the site */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}
.prod-case-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s var(--ease);
}
.prod-case-card:hover .prod-case-media img { transform: scale(1.08); }

/* Category badge — same chamfered blue-gradient tag as .case-grid-221 */
.prod-case-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  padding: 12px 26px 12px 18px;
  font-family: var(--sans-th);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .2px;
  background: linear-gradient(135deg, #1697C2 0%, #2D85C2 50%, #4FB3D4 100%);
  box-shadow: 0 6px 18px rgba(45, 133, 194, .28);
  clip-path: polygon(0 0, 100% 0, 100% 55%, calc(100% - 16px) 100%, 0 100%);
}

.prod-case-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 24px 22px;
}
/* Category pill/chip — same light-cyan chip family used on the Service page
   (#services .sol-card-tags span), matches the reference chip style */
.prod-case-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 18px;
  font-weight: 600;
  color: var(--cyan-deep);
  background: var(--cyan-soft);
  padding: 6px 14px;
  border-radius: 0;
  margin: 0 0 14px;
}
/* Real case-study headline */
.prod-case-headline {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin: 0 0 20px;
  transition: color .25s var(--ease);
}
.prod-case-card:hover .prod-case-headline { color: var(--cyan-deep); }
.prod-case-more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.prod-case-more i { font-size: 20px; color: var(--cyan); transition: transform .3s var(--ease); }
.prod-case-card:hover .prod-case-more i { transform: translateX(6px); color: var(--cyan-deep); }

/* ── Responsive ── */
@media (max-width: 960px) {
  .prod-case-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 600px) {
  .prod-case-grid { grid-template-columns: 1fr; gap: 20px; }
  .prod-case-media { height: 200px; }
}

/* ═══════════════════════════════════════════════════════════
   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; }
