/* ==========================================================================
   หมาน168 (mhan168) — PROTOTYPE-FAITHFUL UI COMPONENTS (P01, P02, P03)
   ========================================================================== */

/* 0. Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--pha-red);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  font-family: var(--font-heading);
  font-weight: 700;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 14px;
  color: #FFFFFF;
}

/* Authentic 2-Row Woven Pha Khao Ma Checkered Stripe (Matches Prototype 01 & 02) */
.pha-woven-bar,
.site-header::before,
.site-footer::before {
  content: '';
  display: block;
  width: 100%;
  height: 10px;
  background-color: #1A1238;
  background-image:
    repeating-linear-gradient(
      90deg,
      #E82722 0 12px,
      #F7B11A 12px 24px,
      #7CD61D 24px 36px,
      #00B5CC 36px 48px,
      #D81CE0 48px 60px,
      #FFFDF7 60px 66px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(26, 18, 56, 0.42) 0 6px,
      transparent 6px 12px
    );
  background-size: 100% 5px, 100% 5px;
  background-position: 0 0, 0 5px;
  background-repeat: repeat-x;
}

/* 1. Warm Cream Sticky Header (Prototype 01, 02, 03) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 248, 235, 0.98);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light-strong);
  box-shadow: 0 4px 20px rgba(23, 15, 53, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo img {
  height: 60px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  color: var(--text-on-light);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2.5px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-link[aria-current="page"] {
  color: var(--pha-red);
  border-bottom-color: var(--pha-red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mobile-toggle {
  display: none;
  background: #FFFFFF;
  border: 1.5px solid var(--bg-indigo);
  color: var(--bg-indigo);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-drawer {
  background: var(--surface-cream);
  border-top: 1px solid var(--border-light-strong);
  padding: 16px 20px 22px;
  display: grid;
  gap: 8px;
  box-shadow: 0 18px 36px rgba(23, 15, 53, 0.16);
}

.mobile-drawer[hidden] {
  display: none !important;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-light-strong);
  background: #FFFFFF;
  color: var(--text-on-light);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.96rem;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  border-color: var(--pha-red);
  background: rgba(232, 39, 34, 0.08);
  color: var(--pha-red);
}

/* Festive Pill Buttons (Matches Prototype 01, 02, 03) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 22px;
  border-radius: var(--radius-btn);
  font-family: var(--font-heading);
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-align: center;
  white-space: nowrap;
  max-width: 100%;
}

.btn-primary,
.section-night .btn-primary,
.cover-hero .btn-primary,
.site-footer .btn-primary {
  background: var(--grad-cta-fest);
  color: #FFFFFF;
  box-shadow: var(--shadow-cta-glow);
}

.btn-primary:hover,
.section-night .btn-primary:hover,
.cover-hero .btn-primary:hover,
.site-footer .btn-primary:hover {
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(232, 39, 34, 0.45);
}

.btn-outline-indigo {
  background: #FFFFFF;
  color: var(--bg-indigo);
  border-color: var(--bg-indigo);
}

.btn-outline-indigo:hover {
  color: var(--pha-red);
  border-color: var(--pha-red);
  transform: translateY(-2px);
}

.btn-outline-gold,
.cover-hero .btn-outline-gold,
.section-night .btn-outline-gold,
.site-footer .btn-outline-gold {
  background: rgba(36, 23, 74, 0.72);
  color: #FFFDF7;
  border-color: rgba(247, 177, 26, 0.7);
}

.btn-outline-gold:hover,
.cover-hero .btn-outline-gold:hover,
.section-night .btn-outline-gold:hover,
.site-footer .btn-outline-gold:hover {
  color: #170F35;
  background: var(--pha-gold);
  border-color: var(--pha-gold);
  transform: translateY(-2px);
}

/* 2. FULL-BLEED 100VW TEMPLE FAIR STAGE COVER HERO */
.cover-hero {
  position: relative;
  width: 100%;
  min-height: clamp(470px, 48vw, 570px);
  display: flex;
  align-items: center;
  background-color: var(--bg-indigo);
  color: #FFFDF7;
  overflow: hidden;
}

.cover-hero--compact {
  min-height: clamp(390px, 38vw, 470px);
}

.cover-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  z-index: 1;
}

.cover-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(23, 15, 53, 0.94) 0%, rgba(23, 15, 53, 0.78) 44%, rgba(23, 15, 53, 0.14) 100%),
    linear-gradient(180deg, rgba(23, 15, 53, 0.12) 0%, rgba(23, 15, 53, 0.84) 100%);
}

.cover-hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: clamp(42px, 5.2vw, 68px) var(--gutter) clamp(88px, 8vw, 114px);
}

.cover-copy {
  max-width: 630px;
}

.cover-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: rgba(247, 177, 26, 0.18);
  border: 1.5px solid var(--pha-gold);
  color: var(--pha-gold-bright);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.cover-kicker .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pha-gold-bright);
}

.cover-copy h1 {
  color: #FFFFFF;
  margin-bottom: 14px;
  text-shadow: 0 4px 20px rgba(10, 5, 28, 0.65);
}

.cover-copy h1 span {
  color: var(--pha-gold);
}

.cover-lead {
  color: #EAE4FA;
  font-size: 1.02rem;
  margin-bottom: 18px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* Breadcrumbs */
.breadcrumb-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #D9D2EE;
  margin-bottom: 12px;
}

.breadcrumb-bar a {
  color: var(--pha-gold);
  font-weight: 600;
}

.breadcrumb-bar .sep {
  color: #9A8EC2;
}

/* 3A. PROTOTYPE 01 EXACT NOTCHED CARNIVAL TICKET KPI DOCK (Homepage) */
.floating-dock-wrap {
  position: relative;
  z-index: 6;
  margin-top: -54px;
  margin-bottom: 12px;
}

.floating-kpi-dock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ticket-kpi {
  background: #211442;
  border-radius: 14px;
  box-shadow: var(--shadow-night-dock);
  overflow: hidden;
  color: #FFFFFF;
  position: relative;
  text-align: center;
}

/* Authentic Carnival Ticket Side Notches matching Prototype 01 */
.ticket-kpi::before,
.ticket-kpi::after {
  content: '';
  position: absolute;
  bottom: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface-cream);
  z-index: 3;
}

.ticket-kpi::before { left: -7px; }
.ticket-kpi::after { right: -7px; }

.ticket-kpi-head {
  padding: 7px 12px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.ticket-kpi--red .ticket-kpi-head { background: #E82722; }
.ticket-kpi--lime .ticket-kpi-head { background: #7CD61D; color: #162E00; }
.ticket-kpi--cyan .ticket-kpi-head { background: #00B5CC; color: #05262B; }
.ticket-kpi--magenta .ticket-kpi-head { background: #D81CE0; }

.ticket-kpi-body {
  padding: 16px 14px 18px;
}

.kpi-val {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.15;
  margin-bottom: 3px;
}

.kpi-val span {
  color: var(--pha-gold);
  font-size: 1.15rem;
}

.kpi-sub {
  font-size: 0.8rem;
  color: #D9D2EE !important;
  margin: 0;
  line-height: 1.4;
}

/* 3B. PROTOTYPE 02 EXACT CATEGORY KPI CARDS (Thin 4px Colored Top Border, No Notches) */
.cat-kpi-card {
  background: #211442;
  border-radius: 14px;
  border-top: 5px solid var(--pha-red);
  box-shadow: var(--shadow-night-dock);
  padding: 18px 14px;
  text-align: center;
  color: #FFFFFF;
}

.cat-kpi-card--red { border-top-color: #E82722; }
.cat-kpi-card--lime { border-top-color: #7CD61D; }
.cat-kpi-card--cyan { border-top-color: #00B5CC; }
.cat-kpi-card--magenta { border-top-color: #D81CE0; }

/* 3C. PROTOTYPE 03 EXACT FLOATING 01 • 02 • 03 SUMMARY CARD (Article Page) */
.floating-summary-card {
  max-width: 960px;
  margin: 0 auto;
  background: #211442;
  border-radius: 18px;
  box-shadow: var(--shadow-night-dock);
  overflow: hidden;
  color: #FFFFFF;
}

.floating-summary-card::before {
  content: '';
  display: block;
  height: 6px;
  background: linear-gradient(90deg, #E82722 0 20%, #F7B11A 20% 40%, #7CD61D 40% 60%, #00B5CC 60% 80%, #D81CE0 80% 100%);
}

.summary-3-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 24px 28px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-item .num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--pha-gold);
  line-height: 1;
}

.summary-item strong {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  color: #FFFFFF;
}

.summary-item p {
  font-size: 0.85rem;
  color: #D9D2EE !important;
  margin: 0;
  line-height: 1.5;
}

/* 4. Section Headers (Centered by default to match Prototype 01 & 02!) */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: clamp(24px, 3vw, 34px);
}

.section-header--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pha-red);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.section-night .section-eyebrow {
  color: var(--pha-gold);
}

.section-desc {
  max-width: 620px;
  margin: 0;
  font-size: 0.95rem;
}

/* 5A. PROTOTYPE 01 EXACT HORIZONTAL-ICON 6 CARNIVAL PAVILION CARDS (Homepage) */
.pavilion-6-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pavilion-card {
  background: #FFFFFF;
  border: 1.5px solid var(--pavilion-border, #F4B3B1);
  border-top: 10px solid var(--pavilion-accent, #E82722);
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-fest-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  min-width: 0;
}

.pavilion-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(23, 15, 53, 0.13);
}

.pavilion-card--red { --pavilion-accent: #E82722; --pavilion-border: #F5B4B2; }
.pavilion-card--magenta { --pavilion-accent: #D81CE0; --pavilion-border: #ECB4EE; }
.pavilion-card--lime { --pavilion-accent: #7CD61D; --pavilion-border: #C4EC9A; }
.pavilion-card--cyan { --pavilion-accent: #00B5CC; --pavilion-border: #9EE2EB; }
.pavilion-card--gold { --pavilion-accent: #F7B11A; --pavilion-border: #F4D795; }
.pavilion-card--indigo { --pavilion-accent: #C98A1A; --pavilion-border: #E5C88F; }

.pavilion-card-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.pavilion-card-copy h3 {
  font-size: 1.2rem;
  color: var(--text-on-light);
}

.pavilion-card-copy h3 a {
  color: var(--text-on-light);
}

.pavilion-card-copy h3 a:hover {
  color: var(--pavilion-accent);
}

.pavilion-card-copy p {
  font-size: 0.87rem;
  line-height: 1.48;
  margin: 0;
}

.pavilion-link {
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--pha-red);
  white-space: nowrap;
  margin-top: 4px;
}

.section-night .pavilion-link {
  color: var(--pha-gold);
}

.pavilion-icon-wrap {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 5B. PROTOTYPE 02 EXACT CATEGORY SPEC CARDS & CENTERED PILL FILTER BAR */
.filter-bar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.pill-group-boxed {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-light-strong);
  border-radius: var(--radius-pill);
  padding: 5px;
  box-shadow: 0 4px 14px rgba(23, 15, 53, 0.05);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  background: transparent;
  color: var(--text-on-light);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  padding: 7px 18px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pill-btn:hover {
  color: var(--pha-red);
}

.pill-btn.active {
  background: var(--bg-indigo);
  color: #FFFFFF;
}

/* Planner Solid Colorful Pills (Matching Prototype 01: Gold / Lime / Magenta!) */
.section-night .pill-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.22);
}

.section-night .pill-btn[data-mhan-booth="slots"].active {
  background: #F7B11A;
  color: #170F35;
  border-color: #F7B11A;
}

.section-night .pill-btn[data-mhan-booth="casino"].active {
  background: #7CD61D;
  color: #132A00;
  border-color: #7CD61D;
}

.section-night .pill-btn[data-mhan-booth="sports"].active {
  background: #D81CE0;
  color: #FFFFFF;
  border-color: #D81CE0;
}

.section-night .pill-btn[data-mhan-channel].active {
  background: #00B5CC;
  color: #05262B;
  border-color: #00B5CC;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.content-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light-strong);
  border-top: 6px solid #E82722;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-fest-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  min-width: 0;
}

.content-card:nth-child(6n+2) { border-top-color: #7CD61D; }
.content-card:nth-child(6n+3) { border-top-color: #00B5CC; }
.content-card:nth-child(6n+4) { border-top-color: #D81CE0; }
.content-card:nth-child(6n+5) { border-top-color: #F7B11A; }
.content-card:nth-child(6n+6) { border-top-color: #3D2B8C; }

.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(23, 15, 53, 0.12);
}

.content-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: right center;
}

.content-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.content-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  background: rgba(232, 39, 34, 0.1);
  color: #C71F1B;
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  width: fit-content;
}

.content-card:nth-child(6n+2) .content-card-tag { background: rgba(124, 214, 29, 0.16); color: #2B6D00; }
.content-card:nth-child(6n+3) .content-card-tag { background: rgba(0, 181, 204, 0.14); color: #006E7D; }
.content-card:nth-child(6n+4) .content-card-tag { background: rgba(216, 28, 224, 0.13); color: #960B9C; }
.content-card:nth-child(6n+5) .content-card-tag { background: rgba(247, 177, 26, 0.2); color: #8C5A00; }
.content-card:nth-child(6n+6) .content-card-tag { background: rgba(61, 43, 140, 0.12); color: #311E7D; }

.spec-metric-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface-paper);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bg-indigo);
  width: fit-content;
}

.content-card h3 a {
  color: var(--text-on-light);
}

.content-card h3 a:hover {
  color: var(--pha-red);
}

.content-card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.84rem;
}

/* 6. PROTOTYPE 01 EXACT INTERACTIVE CARNIVAL PLANNER CARD (Deep Indigo Band) */
.lab-shell {
  background: #25194C;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: clamp(24px, 3.4vw, 38px);
  display: grid;
  grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
  gap: 30px;
  align-items: center;
  box-shadow: var(--shadow-night-dock);
}

.lab-controls {
  display: grid;
  gap: 16px;
}

.lab-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.lab-range {
  width: 100%;
  accent-color: var(--pha-gold);
  height: 10px;
  cursor: pointer;
}

.lab-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lab-stat-box {
  background: var(--bg-plum-deep);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid var(--pha-gold);
  border-radius: 10px;
  padding: 10px 14px;
}

.lab-stat-box:nth-child(2) { border-left-color: var(--pha-lime); }
.lab-stat-box:nth-child(3) { border-left-color: var(--pha-cyan); }
.lab-stat-box:nth-child(4) { border-left-color: var(--pha-magenta); }

.lab-stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted-dark);
  margin-bottom: 2px;
}

.lab-stat-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
}

.lab-visual {
  border-radius: 16px;
  overflow: hidden;
}

/* 7. STUDIO PARTNERS & PROTOTYPE-EXACT COMPARISON TABLES */
.brand-logo-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
  align-items: center;
}

.brand-logo-tile {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.brand-logo-tile img {
  height: 36px;
  width: auto;
  max-width: 98px;
  object-fit: contain;
}

.brand-logo-tile span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-on-light);
}

.mhan-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid var(--border-light-strong);
  background: #FFFFFF;
  box-shadow: var(--shadow-fest-card);
  margin: 18px 0;
}

.mhan-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
  text-align: left;
}

/* Prototype 01 Multi-Color Column Headers (Gold | Indigo | Cyan | Magenta) */
.mhan-table--multicolor thead th:nth-child(1) { background: #F7B11A; color: #170F35; }
.mhan-table--multicolor thead th:nth-child(2) { background: #211442; color: #FFFFFF; }
.mhan-table--multicolor thead th:nth-child(3) { background: #00B5CC; color: #05262B; }
.mhan-table--multicolor thead th:nth-child(4) { background: #D81CE0; color: #FFFFFF; }

/* Prototype 02 Indigo Header Table (Category Pages) */
.mhan-table thead th {
  background: #211442;
  color: #FFFDF7;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 13px 16px;
}

/* Prototype 03 Indigo + Gold Header Table (Article Pages) */
.mhan-table--editorial thead th:first-child { background: #211442; color: #FFFFFF; }
.mhan-table--editorial thead th:not(:first-child) { background: #F7B11A; color: #170F35; }

.mhan-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-on-light);
  font-size: 0.9rem;
}

.mhan-table tbody tr:nth-child(even) {
  background: #FFF9EC;
}

.mono-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--surface-paper);
  border: 1px solid var(--border-light-strong);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--bg-indigo);
}

/* 8. PROTOTYPE 02 EXACT 1-6-8 SOLID COLOR-BLOCKED PROTOCOL BADGES & BANNER GUIDES */
.protocol-solid-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.protocol-solid-card {
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.protocol-solid-card--red { background: #E82722; color: #FFFFFF; }
.protocol-solid-card--lime { background: #8CE01A; color: #132800; }
.protocol-solid-card--gold { background: #F7B11A; color: #170F35; }

.protocol-solid-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.protocol-solid-num {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}

.protocol-solid-card h3 {
  font-size: 1.08rem;
  color: inherit !important;
  margin: 0;
}

.protocol-solid-card p {
  font-size: 0.86rem;
  color: inherit !important;
  opacity: 0.92;
  margin: 0;
}

/* Prototype 02 Illustrated Guide Banner Cards */
.guide-banner-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 158px;
  display: flex;
  align-items: flex-end;
  padding: 20px 22px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-night-dock);
  transition: transform 0.18s ease;
}

.guide-banner-card:hover {
  transform: translateY(-3px);
}

.guide-banner-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  z-index: 1;
}

.guide-banner-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(23, 15, 53, 0.92) 0%, rgba(23, 15, 53, 0.65) 60%, rgba(23, 15, 53, 0.25) 100%);
}

.guide-banner-body {
  position: relative;
  z-index: 3;
  max-width: 78%;
}

.guide-banner-body h3 {
  color: #FFFFFF;
  font-size: 1.12rem;
  margin: 4px 0 4px;
}

.guide-banner-body p {
  font-size: 0.84rem;
  color: #E2DCF6 !important;
  margin: 0;
}

/* Prototype 03 White Related Article Cards on Dark Indigo Band */
.related-white-card {
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-night-dock);
  transition: transform 0.18s ease;
  min-width: 0;
}

.related-white-card:hover {
  transform: translateY(-3px);
}

.related-white-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: right center;
}

.related-white-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.related-gold-pill {
  display: inline-block;
  width: fit-content;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #F7B11A;
  color: #170F35;
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 700;
}

.related-white-body h3 {
  font-size: 1.04rem;
  color: var(--text-on-light) !important;
}

.related-white-body h3 a {
  color: var(--text-on-light) !important;
}

.related-white-body h3 a:hover {
  color: var(--pha-red) !important;
}

.related-white-body p {
  font-size: 0.85rem;
  color: var(--text-muted-light) !important;
  margin: 0;
}

/* 9. PROTOTYPE 03 ARTICLE 2-COLUMN LAYOUT (Sticky Left Sidebar + Pha Khao Ma Corner Ribbon) */
.article-two-col {
  display: grid;
  grid-template-columns: minmax(260px, 310px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.article-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.toc-box {
  background: #FFFFFF;
  border: 1px solid var(--border-light-strong);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-fest-card);
}

.toc-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--bg-indigo);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  border-left: 2px solid var(--border-light-strong);
  display: grid;
  gap: 6px;
}

.toc-link {
  display: block;
  padding: 5px 0 5px 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted-light);
  border-left: 3px solid transparent;
  margin-left: -2.5px;
}

.toc-link.active,
.toc-link:hover {
  color: var(--pha-red);
  border-left-color: var(--pha-red);
  font-weight: 700;
}

/* Prototype 03 Sidebar CTA Card with Diagonal Pha Khao Ma Corner Ribbon */
.sidebar-cta-box {
  background: #1C133D;
  color: #FFFFFF;
  border-radius: 18px;
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  box-shadow: var(--shadow-night-dock);
}

.sidebar-cta-box::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 68px;
  height: 68px;
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  background-image:
    repeating-linear-gradient(45deg, #E82722 0 10px, #F7B11A 10px 20px, #7CD61D 20px 30px, #00B5CC 30px 40px, #D81CE0 40px 50px);
}

.sidebar-cta-box h3 {
  color: #FFFFFF;
  font-size: 1.12rem;
  padding-right: 30px;
}

.sidebar-cta-box p {
  color: #D9D2EE !important;
  font-size: 0.86rem;
  margin: 0;
}

.article-prose {
  min-width: 0;
}

.article-prose h2 {
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--pha-gold);
  color: var(--text-on-light);
}

.article-prose section:nth-child(even) h2 {
  border-left-color: var(--pha-cyan);
}

.article-prose section:first-child h2 {
  margin-top: 0;
}

.article-prose h3 {
  margin: 18px 0 8px;
  color: var(--text-on-light);
}

.article-prose ul,
.article-prose ol {
  margin: 0 0 16px 22px;
  color: var(--text-muted-light);
}

.article-prose li {
  margin-bottom: 8px;
}

.callout-box {
  background: var(--surface-paper);
  border-left: 4px solid var(--pha-gold);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 18px 0;
  color: var(--text-on-light);
  font-size: 0.93rem;
}

/* 10. PROTOTYPE-STYLE FAQ & DEEP INDIGO FOOTER WITH SHIELD LOGO BADGE */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.faq-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light-strong);
  border-left: 5px solid #E82722;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-fest-card);
}

.faq-card:nth-child(2) { border-left-color: #7CD61D; }
.faq-card:nth-child(3) { border-left-color: #00B5CC; }
.faq-card:nth-child(4) { border-left-color: #D81CE0; }

.faq-card h3 {
  font-size: 1.02rem;
  color: var(--text-on-light);
  margin-bottom: 6px;
}

.faq-card p {
  font-size: 0.9rem;
  margin: 0;
}

.site-footer {
  background: var(--bg-indigo);
  color: #FFFDF7;
  padding: 0 0 32px;
}

.site-footer::before {
  margin-bottom: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

/* Prototype 01 Warm Cream Shield Badge for Logo in Dark Indigo Footer */
.footer-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FCF8EB;
  padding: 12px 20px 16px;
  border-radius: 14px 14px 36px 36px;
  border: 2.5px solid var(--pha-gold);
  margin-bottom: 14px;
}

.footer-logo-badge img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.footer-desc {
  color: #D9D2EE;
  font-size: 0.89rem;
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #D9D2EE;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--pha-gold);
}

.footer-disclaimer {
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--bg-plum);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #CFC6EA;
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #B9AFDA;
  font-size: 0.8rem;
}
