/*
Theme Name: NIF2027
Theme URI: https://nif2027.com
Author: MTSC
Description: Custom theme for the NAWEM International Forum on Inclusive Growth 2027 (NIF2027), Borneo Convention Centre Kuching, 27–28 January 2027. Built from the approved design mockup. Fixed-section homepage template (NIF Home) driven by ACF fields, with the approved design copy as fallbacks so the site renders complete even before fields are filled.
Version: 1.0.23
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nif2027
*/

/* ---------------------------------------------------------------------------
   Tokens
--------------------------------------------------------------------------- */
:root {
  --nif-blue: #2E3192;
  --nif-blue-hover: #413AA8;
  --nif-blue-deep: #1B1D5E;
  --nif-red: #E31B23;
  --nif-red-dark: #B8121A;
  --nif-red-light: #F04349;
  --nif-pink: #F9BFC1;
  --nif-bg: #F6F6F7;
  --nif-surface: #FFFFFF;
  --nif-border: #E2E3E6;
  --nif-text: #464B57;
  --nif-muted: #666B76;
  --nif-faint: #8B8F99;
  --nif-badge-bg: #EAEBEE;
  --nif-notice-bg: #EFF0F2;
  --font-sans: 'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Spectral', Georgia, serif;
}

/* ---------------------------------------------------------------------------
   Base
--------------------------------------------------------------------------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--nif-bg);
  color: var(--nif-blue);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--nif-red); text-decoration: none; }
a:hover { color: var(--nif-red-dark); text-decoration: underline; }
::selection { background: var(--nif-blue); color: #fff; }

img { max-width: 100%; height: auto; }

.nif-container {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

/* ---------------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------------- */
.nif-btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.nif-btn:hover { text-decoration: none; }

.nif-btn--red { background: var(--nif-red); color: #fff; }
.nif-btn--red:hover { background: var(--nif-red-dark); color: #fff; }

.nif-btn--lg { font-size: 16px; padding: 15px 34px; }

.nif-btn--ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.nif-btn--ghost:hover { border-color: #fff; color: #fff; }

.nif-btn--blue { background: var(--nif-blue); color: #fff; }
.nif-btn--blue:hover { background: var(--nif-blue-hover); color: #fff; }

/* Hero variant of the red button uses the lighter hover from the mockup */
.nif-hero .nif-btn--red:hover,
.nif-cta .nif-btn--white:hover { filter: none; }
.nif-hero .nif-btn--red:hover { background: var(--nif-red-light); }

.nif-btn--white { background: #fff; color: var(--nif-red); font-weight: 800; }
.nif-btn--white:hover { background: #FCEDEE; color: var(--nif-red); }

/* ---------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */
.nif-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 246, 247, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--nif-border);
}
.admin-bar .nif-header { top: 32px; }

.nif-header__inner {
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nif-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}
.nif-brand:hover { text-decoration: none; color: inherit; }

/* Full lockup (mark + wordmark) rendered from the client's logo; the mark alone on phones */
.nif-brand__logo {
  display: block;
  height: 64px;
  width: auto;
  flex: none;
  object-fit: contain;
}
.nif-brand__logo--mark { display: none; width: 44px; height: 44px; }
.nif-brand__logo--custom { max-width: 280px; }

.nif-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.nif-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
}
.nif-nav__list a { color: var(--nif-blue); }
.nif-nav__list a:hover { color: var(--nif-red); text-decoration: none; }
.nif-nav__list .current-menu-item > a,
.nif-nav__list .current_page_item > a { color: var(--nif-blue); }

.nif-nav__list .is-soon > span { color: #9CA0A9; cursor: default; }

.nif-soon-badge {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--nif-badge-bg);
  color: var(--nif-faint);
  padding: 2px 6px;
  border-radius: 3px;
  vertical-align: 2px;
}

/* ---------------------------------------------------------------------------
   Decorative circles (hero / CTA bands)
--------------------------------------------------------------------------- */
.nif-deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.nif-deco span { position: absolute; border-radius: 50%; }
.nif-deco .c1 { top: -120px; right: -80px; width: 420px; height: 420px; border: 1.5px solid rgba(255, 255, 255, 0.14); }
.nif-deco .c2 { top: 40px; right: 160px; width: 300px; height: 300px; border: 1.5px solid rgba(255, 255, 255, 0.10); }
.nif-deco .c3 { bottom: -140px; right: 60px; width: 340px; height: 340px; border: 1.5px solid rgba(200, 16, 46, 0.45); }
.nif-deco .c4 { top: 140px; right: 120px; width: 56px; height: 56px; background: var(--nif-red); }

/* ---------------------------------------------------------------------------
   Home: hero
--------------------------------------------------------------------------- */
.nif-hero {
  /* #343891 is the flat blue baked into nif-motif-blue.jpg (what the band has
     always shown), so the positioned motif below meets the band seamlessly. */
  background: #343891;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* The Sarawak motif replaces the outline circles on blue bands */
.nif-hero .nif-deco,
.nif-page-hero .nif-deco { display: none; }

.nif-hero__inner {
  padding-top: 84px;
  padding-bottom: 64px;
  position: relative;
}

/*
 * Sarawak motif: a positioned element (not a cover background) so its flower
 * centre sits behind the video tile's centre on desktop, with the spiral arms
 * peeking out around the tile. 900px wide keeps the source's 1414:2000 ratio;
 * right:-175px lands the flower centre 295px in from the container edge, the
 * centre of a 542px tile behind 24px padding. Text sits on flat blue.
 */
.nif-hero__inner::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -175px;
  width: 900px;
  height: 1273px;
  transform: translateY(-55%);
  background: url('assets/img/nif-motif-blue.jpg') no-repeat center / contain;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 30%);
  mask-image: linear-gradient(to right, transparent, #000 30%);
}
.nif-hero__copy,
.nif-hero__media { position: relative; z-index: 1; }

/* Two columns when a video tile is present */
.nif-hero__inner--video {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.nif-hero__inner--video .nif-hero__heading { font-size: 48px; }
.nif-hero__inner--video .nif-hero__quote { font-size: 19px; }

/* Video tile: poster + control bar beneath it (nothing overlays the frame).
   Clicking anywhere on the tile opens the modal player (assets/js/hero-video.js) */
.nif-video {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--nif-blue-deep);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.nif-video__play {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: #fff;
  text-align: left;
}
.nif-video__play:focus-visible { outline: 3px solid var(--nif-pink); outline-offset: -3px; }
.nif-video__frame-wrap {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.nif-video__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.nif-video__play:hover .nif-video__poster { transform: scale(1.03); }
.nif-video__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--nif-blue-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.nif-video__btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--nif-red);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background 0.2s ease;
}
.nif-video__btn svg { margin-left: 3px; }
.nif-video__play:hover .nif-video__btn { background: var(--nif-red-light); transform: scale(1.06); }
.nif-video__label {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nif-video__hint {
  margin-left: auto;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}
.nif-video__fallback {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

/* Modal player (built by hero-video.js) */
.nif-video-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 22, 70, 0.94);
  animation: nif-fade 0.2s ease;
}
@keyframes nif-fade { from { opacity: 0; } to { opacity: 1; } }
.nif-video-modal__dialog {
  position: relative;
  width: min(1120px, 100%);
}
.nif-video-modal__frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}
.nif-video-modal__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.nif-video-modal__close {
  position: absolute;
  right: 0;
  top: -52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.nif-video-modal__close:hover { background: var(--nif-red); border-color: var(--nif-red); }
.nif-video-modal__close:focus-visible { outline: 3px solid var(--nif-pink); outline-offset: 2px; }
.nif-video-modal__close svg { width: 14px; height: 14px; }
body.nif-video-modal-open { overflow: hidden; }

.nif-hero__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nif-pink);
}
.nif-hero__kicker .dot { color: rgba(255, 255, 255, 0.35); }

.nif-hero__heading {
  font-size: 58px;
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 22px 0 0;
  max-width: 800px;
  text-wrap: balance;
  color: #fff;
}

.nif-hero__quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  margin: 24px 0 0;
}

.nif-hero__subline {
  margin: 18px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.nif-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* Countdown band */
.nif-hero__band {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  background: rgba(0, 0, 0, 0.18);
}

.nif-countdown {
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 40px;
}

.nif-countdown__label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.nif-countdown__units { display: flex; flex-wrap: wrap; gap: 32px; }

.nif-countdown__units > div { display: flex; align-items: baseline; gap: 8px; }

.nif-countdown__units span {
  font-size: 32px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.nif-countdown__units small {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------------------------------------------------------------------------
   Home: shared section furniture
--------------------------------------------------------------------------- */
.nif-section { padding-top: 96px; }
.nif-section--first { padding-top: 88px; }

.nif-kicker {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nif-red);
  margin: 0;
}

.nif-h2 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 14px 0 0;
  text-wrap: balance;
  color: var(--nif-blue);
}

.nif-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
}
.nif-section__note { font-size: 14px; color: var(--nif-muted); }

/* ---------------------------------------------------------------------------
   Home: about the forum (conference abstract) — editorial two-column
--------------------------------------------------------------------------- */
.nif-about__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.nif-about__p {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--nif-text);
  margin: 0 0 18px;
}
.nif-about__p:last-child { margin-bottom: 0; }
/* Client-requested emphasis: bold plus the brand red (dark variant keeps 4.5:1 on the grey ground) */
.nif-about__p strong { font-weight: 600; color: var(--nif-red-dark); }
.nif-about__p--lead strong { font-weight: 700; color: var(--nif-red-dark); }

.nif-about__p--lead {
  font-size: 18.5px;
  line-height: 1.65;
  font-weight: 500;
  color: var(--nif-blue);
}

/* ---------------------------------------------------------------------------
   Home: why attend
--------------------------------------------------------------------------- */
.nif-why__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

.nif-why__text {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--nif-text);
  margin: 20px 0 0;
}

.nif-why__stats { display: flex; flex-wrap: wrap; gap: 24px 36px; margin-top: 36px; }
.nif-why__stats > div { text-align: center; }
.nif-why__stat-value { font-size: 40px; font-weight: 900; color: var(--nif-blue); font-variant-numeric: tabular-nums; }
.nif-why__stat-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nif-muted);
  margin-top: 4px;
}

.nif-why__media { position: relative; }
.nif-why__media img,
.nif-why__media .nif-img-placeholder {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.nif-why__badge {
  position: absolute;
  left: -18px;
  bottom: -18px;
  background: var(--nif-red);
  color: #fff;
  padding: 14px 20px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nif-img-placeholder {
  background: repeating-linear-gradient(45deg, #ECEDEF, #ECEDEF 12px, #E4E5E8 12px, #E4E5E8 24px);
  border: 1px dashed #C4C7CD;
  color: var(--nif-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 12px;
}

/* ---------------------------------------------------------------------------
   Home: who should attend
--------------------------------------------------------------------------- */
.nif-who__head { max-width: 760px; }
.nif-who__intro { font-size: 17px; line-height: 1.65; color: var(--nif-text); margin: 20px 0 0; }

/* 6-track grid. Default: every card spans 2 (three per row). Modifiers rebalance
   the last rows so no card is left alone: 8 → 3/3/2, 7 → 3/2/2, 5 → 3/2, 4 → 2/2. */
.nif-who__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.nif-who__card { grid-column: span 2; }
.nif-who__grid--n8 .nif-who__card:nth-child(n+7),
.nif-who__grid--n7 .nif-who__card:nth-child(n+4),
.nif-who__grid--n5 .nif-who__card:nth-child(n+4),
.nif-who__grid--n4 .nif-who__card { grid-column: span 3; }

.nif-who__card {
  background: var(--nif-surface);
  border: 1px solid var(--nif-border);
  border-radius: 6px;
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.nif-who__card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(27, 29, 94, 0.35); border-color: #D2D4DA; }
.nif-who__card::before { content: ""; display: block; width: 34px; height: 3px; background: var(--nif-red); border-radius: 2px; }
.nif-who__index { position: absolute; top: 22px; right: 24px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; color: var(--nif-faint); font-variant-numeric: tabular-nums; }
.nif-who__title { font-size: 18.5px; font-weight: 800; line-height: 1.25; margin: 4px 0 0; color: var(--nif-blue); text-wrap: balance; }
.nif-who__text { font-size: 15px; line-height: 1.65; color: var(--nif-text); margin: 0; }
.nif-who__text strong { font-weight: 600; color: var(--nif-blue); }

/* Closing statement band */
.nif-who__close {
  margin-top: 28px;
  background: var(--nif-blue);
  color: #fff;
  border-radius: 8px;
  padding: 44px 52px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
  position: relative;
  overflow: hidden;
}
.nif-who__close .nif-deco .c1 { top: -110px; right: -70px; width: 300px; height: 300px; border: 1.5px solid rgba(255, 255, 255, 0.16); }
.nif-who__close .nif-deco .c2 { top: auto; bottom: -120px; right: 120px; width: 240px; height: 240px; border: 1.5px solid rgba(255, 255, 255, 0.10); }
.nif-who__close .nif-deco .c4 { top: 34px; right: 200px; width: 22px; height: 22px; background: var(--nif-red); }
.nif-who__close-copy { position: relative; max-width: 700px; }
.nif-who__close-lead { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 27px; line-height: 1.35; margin: 0; letter-spacing: -0.005em; color: #fff; }
.nif-who__close-lead em { font-style: italic; color: var(--nif-pink); }
.nif-who__close-text { font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, 0.85); margin: 12px 0 0; }
.nif-who__close-actions { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; flex: none; }
.nif-who__close-actions .nif-btn { padding: 16px 36px; font-size: 16px; }
.nif-who__close-actions small { font-size: 13.5px; color: rgba(255, 255, 255, 0.8); }
.nif-who__close-actions small a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.45); }
.nif-who__close-actions small a:hover { text-decoration-color: #fff; }

/* ---------------------------------------------------------------------------
   Home: programme
--------------------------------------------------------------------------- */
.nif-days {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.nif-day {
  background: var(--nif-surface);
  border: 1px solid var(--nif-border);
  border-top: 4px solid var(--nif-blue);
  border-radius: 6px;
  padding: 28px;
}
.nif-day--highlight { border-top-color: var(--nif-red); }

.nif-day__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nif-red);
}

.nif-day__title { font-size: 21px; font-weight: 800; margin-top: 8px; }

.nif-day ul {
  margin: 16px 0 0;
  padding: 0 0 0 18px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--nif-text);
}

.nif-tracks {
  margin-top: 36px;
  background: var(--nif-blue);
  border-radius: 6px;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.nif-tracks__label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nif-pink);
  flex: none;
}

.nif-tracks__pills { display: flex; gap: 10px; flex-wrap: wrap; }

.nif-tracks__pills span {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 100px;
}

/* ---------------------------------------------------------------------------
   Home: key parties
--------------------------------------------------------------------------- */
.nif-parties {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.nif-party {
  background: var(--nif-surface);
  border: 1px solid var(--nif-border);
  border-radius: 6px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.nif-party__logo,
.nif-party .nif-img-placeholder { width: 130px; height: 72px; }
.nif-party__logo { object-fit: contain; }
.nif-party .nif-img-placeholder { border-radius: 4px; }

.nif-party__name { font-weight: 700; font-size: 15px; text-align: center; }
.nif-party__role { font-size: 12.5px; color: var(--nif-muted); margin-top: 2px; text-align: center; }

/* ---------------------------------------------------------------------------
   Home: Kuching strip
--------------------------------------------------------------------------- */
.nif-kuching__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.nif-kuching__grid img,
.nif-kuching__grid .nif-img-placeholder {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* ---------------------------------------------------------------------------
   Home: CTA band
--------------------------------------------------------------------------- */
.nif-cta { padding: 88px 0 96px; }

.nif-cta__band {
  background: var(--nif-red);
  border-radius: 8px;
  padding: 52px 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

.nif-cta__band .nif-deco .c1 { top: -80px; right: -60px; width: 260px; height: 260px; border-color: rgba(255, 255, 255, 0.25); }
.nif-cta__band .nif-deco .c2 { top: auto; bottom: -100px; right: 80px; width: 220px; height: 220px; border-color: rgba(255, 255, 255, 0.18); }

.nif-cta__copy { position: relative; }
.nif-cta__heading { color: #fff; font-size: 30px; font-weight: 900; letter-spacing: -0.01em; margin: 0; }
.nif-cta__text { color: rgba(255, 255, 255, 0.85); font-size: 16px; margin: 8px 0 0; }
.nif-cta__band .nif-btn { position: relative; flex: none; padding: 16px 36px; font-size: 16px; }

/* ---------------------------------------------------------------------------
   Inner pages (page.php / single.php / index.php)
--------------------------------------------------------------------------- */
.nif-page-hero {
  background: var(--nif-blue) url('assets/img/nif-motif-blue.jpg') no-repeat right center / cover;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.nif-page-hero__inner { padding-top: 56px; padding-bottom: 56px; position: relative; }

.nif-page-hero__kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nif-pink);
}

.nif-page-hero__title {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 12px 0 0;
  color: #fff;
}

.nif-page-hero__meta { font-size: 15.5px; color: rgba(255, 255, 255, 0.75); margin-top: 10px; }
.nif-page-hero__meta a { color: rgba(255, 255, 255, 0.9); }

/* Early-bird call-out in the Register hero (inc/early-bird.php → nif2027_early_bird_flash()) */
.nif-page-hero__flash {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 12px 18px 12px 14px;
  border-radius: 6px;
  background: var(--nif-red);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
.nif-page-hero__flash-days {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.nif-page-hero__flash > span { display: block; }
.nif-page-hero__flash small {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.92;
}

.nif-content {
  padding-top: 56px;
  padding-bottom: 96px; /* longhands: the shorthand was zeroing .nif-container's side padding */
  /* Subtle Sarawak motif watermark; multiply blends its white ground into the page bg */
  background-color: var(--nif-bg);
  background-image: url('assets/img/nif-motif-light.png');
  background-repeat: no-repeat;
  background-position: right -160px bottom -220px;
  background-size: 620px auto;
  background-blend-mode: multiply;
}
.nif-content--narrow .nif-prose { max-width: 760px; }

.nif-prose {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--nif-text);
}
.nif-prose h2, .nif-prose h3, .nif-prose h4 { color: var(--nif-blue); letter-spacing: -0.01em; }
.nif-prose h2 { font-size: 28px; font-weight: 800; margin: 40px 0 12px; }
.nif-prose h3 { font-size: 21px; font-weight: 800; margin: 32px 0 10px; }
.nif-prose blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  border-left: 3px solid var(--nif-red);
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  color: var(--nif-muted);
}
.nif-prose img { border-radius: 6px; }
.nif-prose .wp-block-button__link { border-radius: 4px; }

/* Blog listing */
.nif-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.nif-post-card {
  background: var(--nif-surface);
  border: 1px solid var(--nif-border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.nif-post-card__thumb { display: block; }
.nif-post-card__thumb img { width: 100%; height: 190px; object-fit: cover; display: block; }

.nif-post-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.nif-post-card__meta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nif-faint);
}

.nif-post-card__title { font-size: 19px; font-weight: 800; line-height: 1.3; margin: 0; }
.nif-post-card__title a { color: var(--nif-blue); }
.nif-post-card__title a:hover { color: var(--nif-red); text-decoration: none; }

.nif-post-card__excerpt { font-size: 14.5px; line-height: 1.6; color: var(--nif-text); margin: 0; }

.nif-post-card__more { margin-top: auto; font-size: 13.5px; font-weight: 700; }

.nif-pagination { margin-top: 48px; text-align: center; }
.nif-pagination .nav-links { display: inline-flex; gap: 8px; font-weight: 700; font-size: 14px; }
.nif-pagination .page-numbers {
  display: inline-block;
  min-width: 38px;
  padding: 9px 12px;
  border: 1px solid var(--nif-border);
  border-radius: 4px;
  background: var(--nif-surface);
  color: var(--nif-blue);
}
.nif-pagination .page-numbers.current { background: var(--nif-blue); border-color: var(--nif-blue); color: #fff; }
.nif-pagination .page-numbers:hover { text-decoration: none; border-color: var(--nif-blue); }

/* Single post extras */
.nif-post-nav { margin-top: 56px; display: flex; justify-content: space-between; gap: 24px; font-weight: 700; font-size: 14.5px; }

.nif-empty {
  background: var(--nif-notice-bg);
  border: 1px dashed #C4C7CD;
  border-radius: 6px;
  padding: 26px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--nif-muted);
  margin-top: 40px;
}

/* ---------------------------------------------------------------------------
   Gravity Forms (registration page) — restyle GF 2.9 "orbital" theme into the
   NIF design. Overrides orbital's CSS custom properties on the wrapper, then
   targets its markup with enough specificity to win.
--------------------------------------------------------------------------- */
.nif-prose .gform_wrapper {
  margin-top: 8px;
  /* Re-point orbital's design tokens at the NIF palette */
  --gf-color-primary: var(--nif-red);
  --gf-color-primary-rgb: 227, 27, 35;
  --gf-color-primary-contrast: #ffffff;
  --gf-color-primary-darker: var(--nif-red-dark);
  --gf-color-primary-darkest: var(--nif-red-dark);
  --gf-color-secondary: #ffffff;
  --gf-color-secondary-contrast: var(--nif-red);
  --gf-color-out-ctrl-light-darker: #d2d4d9;
  --gf-color-in-ctrl-primary: var(--nif-red);
  --gf-radius: 4px;
  --gf-font-size-secondary: 13px;
  --gf-label-color: var(--nif-blue);
  color: var(--nif-blue);
}

/* Inputs */
.nif-prose .gform_wrapper .gfield input[type="text"],
.nif-prose .gform_wrapper .gfield input[type="email"],
.nif-prose .gform_wrapper .gfield input[type="tel"],
.nif-prose .gform_wrapper .gfield input[type="url"],
.nif-prose .gform_wrapper .gfield input[type="number"],
.nif-prose .gform_wrapper .gfield select,
.nif-prose .gform_wrapper .gfield textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 15px;
  padding: 11px 13px;
  border: 1px solid #d2d4d9;
  border-radius: 4px;
  background: #fcfcfd;
  color: var(--nif-blue);
}
.nif-prose .gform_wrapper .gfield input:focus,
.nif-prose .gform_wrapper .gfield textarea:focus {
  border-color: var(--nif-blue);
  outline: 2px solid rgba(46, 49, 146, 0.15);
}

.nif-prose .gform_wrapper .gfield_label,
.nif-prose .gform_wrapper .gform-field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--nif-blue);
}

/* Submit button */
.nif-prose .gform_wrapper .gform_footer input[type="submit"],
.nif-prose .gform_wrapper .gform-theme-button,
.nif-prose .gform_wrapper .gform_button {
  background: var(--nif-red);
  color: #fff;
  border: none;
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  padding: 16px 34px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}
.nif-prose .gform_wrapper .gform_footer input[type="submit"]:hover,
.nif-prose .gform_wrapper .gform_button:hover { background: var(--nif-red-light); }

/* Step section breaks → red kickers */
.nif-prose .gform_wrapper .gsection {
  border: none;
  margin: 36px 0 0;
  padding: 0;
  grid-column: 1 / -1;
}
.nif-prose .gform_wrapper .gsection .gsection_title,
.nif-prose .gform_wrapper .gsection_title {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nif-red);
  margin: 0;
}
.nif-prose .gform_wrapper .gsection .gsection_description,
.nif-prose .gform_wrapper .gsection_description {
  font-size: 13px;
  color: var(--nif-faint);
  margin-top: 8px;
}

/* Fee category (product radio) → 3-across card grid, like the design.
   Only the inner .gfield_radio is the grid — gridding its wrapper too would
   nest two grids and crush every card into a third of a third. */
.nif-prose .gform_wrapper .gfield--type-product .gfield_radio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.nif-prose .gform_wrapper .gfield--type-product .gchoice {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--nif-surface);
  border: 2px solid var(--nif-border);
  border-radius: 6px;
  padding: 18px 18px 20px 44px;
  transition: border-color 0.12s ease;
}
.nif-prose .gform_wrapper .gfield--type-product .gchoice:has(input:checked) { border-color: var(--nif-red); }
.nif-prose .gform_wrapper .gfield--type-product .gchoice input[type="radio"] {
  position: absolute;
  top: 20px;
  left: 16px;
  margin: 0;
  accent-color: var(--nif-red);
}
.nif-prose .gform_wrapper .gfield--type-product .gchoice label {
  display: flex;
  flex: 1;
  flex-direction: column;
  font-weight: 700;
  color: var(--nif-blue);
  line-height: 1.45;
  cursor: pointer;
  max-width: none;
}
/* register.js rebuilds each choice as name · price · detail */
.nif-prose .gform_wrapper .gfield--type-product .gchoice .nif-fee-name {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nif-muted);
}
.nif-prose .gform_wrapper .gfield--type-product .gchoice:has(input:checked) .nif-fee-name { color: var(--nif-red); }
.nif-prose .gform_wrapper .gfield--type-product .gchoice .nif-fee-price {
  display: block;
  margin-top: auto;
  padding-top: 14px;
  color: var(--nif-blue);
  font-size: 24px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nif-prose .gform_wrapper .gfield--type-product .gchoice .nif-fee-detail {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--nif-muted);
}

.nif-prose .gform_wrapper .gfield--type-product .gchoice .nif-fee-was {
  display: block;
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--nif-red-dark);
}

/* Early-bird emphasis on the cards while early bird is active (register.js):
   standard price struck through above the early price, "save" ribbon on the top edge. */
.nif-prose .gform_wrapper .gfield--type-product .gfield_radio:has(.nif-fee--early) { padding-top: 8px; }
.nif-prose .gform_wrapper .gfield--type-product .gchoice.nif-fee--early { overflow: visible; padding-top: 22px; }
.nif-prose .gform_wrapper .gfield--type-product .gchoice .nif-fee-tag {
  position: absolute;
  top: -11px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--nif-red);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nif-prose .gform_wrapper .gfield--type-product .gchoice .nif-fee-std {
  display: block;
  margin-top: auto;
  padding-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--nif-faint);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nif-prose .gform_wrapper .gfield--type-product .gchoice .nif-fee-std + .nif-fee-price { margin-top: 0; padding-top: 0; }
.nif-prose .gform_wrapper .gfield--type-product .gchoice.nif-fee--early .nif-fee-was { font-weight: 700; }

/* -------------------------------------------------------------------------
   Fee table (inc/early-bird.php → nif2027_fee_table(), above the form)
   ------------------------------------------------------------------------- */
.nif-fees { margin: 0 0 44px; }
.nif-fees__head { max-width: 760px; }
.nif-fees__heading { font-size: 28px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; margin: 12px 0 0; color: var(--nif-blue); text-wrap: balance; }
.nif-fees__table-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid var(--nif-border); border-radius: 6px; background: var(--nif-surface); }
.nif-fees__table { width: 100%; border-collapse: collapse; font-size: 15px; }
.nif-fees__table th, .nif-fees__table td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--nif-border); }
.nif-fees__table tbody tr:last-child th, .nif-fees__table tbody tr:last-child td { border-bottom: none; }
.nif-fees__table thead th { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nif-muted); background: var(--nif-bg); }
.nif-fees__table thead th small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: none; color: var(--nif-faint); margin-top: 2px; }
.nif-fees__table thead th.is-current { color: var(--nif-red); }
.nif-fees__table thead th.is-current small { color: var(--nif-red-dark); }
.nif-fees__table tbody th { font-weight: 700; color: var(--nif-blue); }
.nif-fees__name { display: block; }
.nif-fees__detail { display: block; font-size: 13px; font-weight: 500; color: var(--nif-muted); margin-top: 2px; }
.nif-fees__table td { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--nif-text); }
.nif-fees__table td.is-current { color: var(--nif-blue); font-size: 17px; font-weight: 900; }
.nif-fees__table td.is-past { color: var(--nif-faint); text-decoration: line-through; font-weight: 500; }
.nif-fees__table td.is-later { color: var(--nif-muted); font-weight: 600; }
.nif-fees__notes { margin: 16px 0 0; padding: 0 0 0 18px; font-size: 13.5px; line-height: 1.7; color: var(--nif-muted); }
.nif-fees__notes li { margin: 0; }

/* Total field — neutral by default (readable if JS is off); the summary panel
   recolours it white when it is moved there. */
.nif-prose .gform_wrapper .gfield--type-total .gfield_label,
.nif-prose .gform_wrapper .gfield--type-total .gform-field-label {
  color: var(--nif-blue);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nif-prose .gform_wrapper .gfield--type-total .gfield_description,
.nif-prose .gform_wrapper .gfield--type-total .gform-field-description {
  color: var(--nif-muted);
  font-size: 12.5px;
}
.nif-prose .gform_wrapper .ginput_total {
  display: block;
  font-size: 30px;
  font-weight: 900;
  color: var(--nif-blue);
  background: transparent;
  border: none;
  padding: 4px 0 0;
  font-variant-numeric: tabular-nums;
}

/* Consent */
.nif-prose .gform_wrapper .gfield_consent_label { font-size: 13px; color: var(--nif-muted); font-weight: 500; }

/* Plain radio lists (non-product): "How did you hear", day-pass day */
.nif-prose .gform_wrapper .gfield--type-radio:not(.gfield--type-product) .gfield_radio .gchoice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
}
.nif-prose .gform_wrapper .gfield--type-radio:not(.gfield--type-product) .gfield_radio input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--nif-red);
}
.nif-prose .gform_wrapper .gfield--type-radio:not(.gfield--type-product) .gfield_radio .gchoice label {
  font-size: 15px;
  font-weight: 500;
  color: var(--nif-text);
  line-height: 1.4;
}

/* Checkbox choice lists (registration-of-interest form: interests, tracks) */
.nif-prose .gform_wrapper .gfield_checkbox .gchoice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
}
.nif-prose .gform_wrapper .gfield_checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--nif-red);
}
.nif-prose .gform_wrapper .gfield_checkbox .gchoice label {
  font-size: 15px;
  font-weight: 500;
  color: var(--nif-text);
  line-height: 1.4;
}

/* -------------------------------------------------------------------------
   Currency switcher (page-register.php, multi-currency registration)
   Segmented control above the form: "Pay in  [RM Malaysian Ringgit] [$ US Dollar]"
   ------------------------------------------------------------------------- */
.nif-currency-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 0 0 32px;
  scroll-margin-top: 120px;
}
.nif-currency-switch__label {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nif-red);
}
.nif-currency-switch__list {
  display: inline-flex;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--nif-surface);
  border: 2px solid var(--nif-border);
  border-radius: 6px;
  overflow: hidden;
}
.nif-currency-switch__list li { margin: 0; }
.nif-currency-switch__list a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--nif-muted);
  text-decoration: none;
  border-right: 2px solid var(--nif-border);
  transition: background 0.12s ease, color 0.12s ease;
}
.nif-currency-switch__list li:last-child a { border-right: none; }
.nif-currency-switch__list a strong { font-weight: 900; color: var(--nif-blue); }
.nif-currency-switch__list a:hover { background: var(--nif-bg); color: var(--nif-blue); text-decoration: none; }
.nif-currency-switch__list a.is-active,
.nif-currency-switch__list a.is-active:hover { background: var(--nif-blue); color: #fff; }
.nif-currency-switch__list a.is-active strong { color: #fff; }
.nif-currency-switch__note {
  flex-basis: 100%;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--nif-faint);
}
@media (max-width: 480px) {
  .nif-currency-switch__list { display: flex; width: 100%; }
  .nif-currency-switch__list li { flex: 1; }
  .nif-currency-switch__list a { width: 100%; justify-content: center; padding: 10px 8px; }
}

/* -------------------------------------------------------------------------
   Two-column registration (page-register.php + register.js)
   register.js appends .nif-reg__summary inside <form>, then moves the Total,
   Consent and submit button into it. The <form> becomes a 2-col grid.
   ------------------------------------------------------------------------- */
.nif-reg .gform_wrapper form.nif-reg--split {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}
.nif-reg .gform_wrapper form.nif-reg--split .gform-body { grid-column: 1; min-width: 0; }

.nif-reg .gform_wrapper .nif-reg__summary {
  grid-column: 2;
  position: sticky;
  top: 96px;
  align-self: start;
  background: var(--nif-blue);
  color: #fff;
  border-radius: 8px;
  padding: 30px;
}
.admin-bar .nif-reg .gform_wrapper .nif-reg__summary { top: 128px; }

.nif-reg__summary-title {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nif-pink);
}
.nif-reg__summary .nif-reg__summary-early {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--nif-pink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}
.nif-reg__summary .nif-reg__summary-early b { color: #fff; }
.nif-reg__summary .nif-reg__summary-early:empty { display: none; }
.nif-reg__summary .nif-reg__tier {
  font-size: 15px;
  font-weight: 600;
  margin-top: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  min-height: 1em;
}
.nif-reg__summary .gfield { margin: 16px 0 0; padding: 0; border: none; }

/* Recolour the moved Total + Consent for the blue panel (4-class selectors win) */
.nif-prose .gform_wrapper .nif-reg__summary .gfield--type-total .gform-field-label,
.nif-prose .gform_wrapper .nif-reg__summary .gfield--type-total .gfield_label {
  color: rgba(255, 255, 255, 0.7);
}
.nif-prose .gform_wrapper .nif-reg__summary .gfield--type-total .gfield_description,
.nif-prose .gform_wrapper .nif-reg__summary .gfield--type-total .gform-field-description {
  color: rgba(255, 255, 255, 0.6);
}
.nif-prose .gform_wrapper .nif-reg__summary .ginput_total { color: #fff; font-size: 32px; }
.nif-prose .gform_wrapper .nif-reg__summary .gfield_consent_label,
.nif-prose .gform_wrapper .nif-reg__summary .gform-field-label { color: rgba(255, 255, 255, 0.9); }
.nif-prose .gform_wrapper .nif-reg__summary .gfield_consent_label { font-weight: 500; font-size: 12.5px; }

.nif-reg__summary .gform_footer,
.nif-reg__summary .gform-footer { margin: 22px 0 0; padding: 0; }
.nif-reg__summary .gform_button { width: 100%; }

@media (max-width: 900px) {
  .nif-reg .gform_wrapper form.nif-reg--split { grid-template-columns: 1fr; gap: 28px; }
  .nif-reg .gform_wrapper .nif-reg__summary { position: static; grid-column: 1; }
}

/* HTML note block (matches the design's grey enquiry box) */
.nif-prose .nif-form-note {
  background: var(--nif-notice-bg);
  border: 1px solid var(--nif-border);
  border-radius: 6px;
  padding: 20px 24px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--nif-text);
}
.nif-prose .nif-form-note strong { color: var(--nif-blue); }

/* -------------------------------------------------------------------------
   Terms & refund policy page (/terms/): at-a-glance box, refund schedule
   table, numbered clauses. Markup lives in the page content.
   ------------------------------------------------------------------------- */
.nif-prose .nif-policy-meta { font-size: 14.5px; color: var(--nif-muted); margin: 0 0 24px; }
.nif-prose .nif-policy-glance {
  background: var(--nif-surface);
  border: 1px solid var(--nif-border);
  border-radius: 6px;
  padding: 22px 24px 18px;
  margin: 8px 0 36px;
}
.nif-prose .nif-policy-glance h2 { margin: 0 0 6px; font-size: 20px; }
.nif-prose .nif-policy-glance p { font-size: 14.5px; color: var(--nif-muted); margin: 0 0 4px; }
.nif-prose .nif-policy-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--nif-border);
  border-radius: 6px;
  background: var(--nif-surface);
  margin: 14px 0 20px;
}
.nif-prose .nif-policy-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.nif-prose .nif-policy-table th, .nif-prose .nif-policy-table td {
  padding: 13px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--nif-border);
}
.nif-prose .nif-policy-table tbody tr:last-child td { border-bottom: none; }
.nif-prose .nif-policy-table thead th {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nif-muted);
  background: var(--nif-bg);
}
.nif-prose .nif-policy-table td:first-child { font-weight: 700; color: var(--nif-blue); white-space: nowrap; }
.nif-prose .nif-policy-table td.nif-policy-days { color: var(--nif-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nif-prose .nif-policy-table td.nif-policy-nil { color: var(--nif-red); font-weight: 700; }
.nif-prose .nif-policy-clause { display: grid; grid-template-columns: 44px 1fr; gap: 0 8px; margin: 0 0 12px; }
.nif-prose .nif-policy-clause b { font-size: 13px; font-weight: 700; color: var(--nif-faint); padding-top: 4px; font-variant-numeric: tabular-nums; }
.nif-prose .nif-policy-clause p { margin: 0; }
@media (max-width: 560px) {
  .nif-prose .nif-policy-table td:first-child, .nif-prose .nif-policy-table td.nif-policy-days { white-space: normal; }
  .nif-prose .nif-policy-clause { grid-template-columns: 36px 1fr; }
}

@media (max-width: 720px) {
  .nif-prose .gform_wrapper .gfield--type-product .gfield_radio { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Footer
--------------------------------------------------------------------------- */
/* Dayak pattern band from the marketing booklet, flipped so the pattern edge
   meets the footer and the white sweep dissolves into the page */
.nif-preband {
  height: 170px;
  background: url('assets/img/nif-band.png') no-repeat center / cover;
  transform: scaleY(-1);
}

.nif-footer { background: var(--nif-blue-deep); color: #fff; margin-top: 0; }

/* White-on-dark-blue lockup from the official logo pack; ring colour matches --nif-blue-deep. */
.nif-footer__logo { display: block; width: 240px; height: auto; }

.nif-footer__grid {
  padding-top: 56px;
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}

.nif-footer__brand { font-weight: 900; font-size: 22px; }
.nif-footer__brand .is-red { color: var(--nif-red-light); }

.nif-footer__blurb {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 12px;
  max-width: 340px;
}

.nif-footer__title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.nif-footer__links { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.nif-footer__links a { color: rgba(255, 255, 255, 0.85); }
.nif-footer__links a:hover { color: #fff; text-decoration: none; }

.nif-footer__contact { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.nif-footer__contact a { color: rgba(255, 255, 255, 0.85); }
.nif-footer__contact a:hover { color: #fff; }

.nif-footer__bar { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.nif-footer__bar-inner {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
}
.nif-footer__bar-inner a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------------------
   Responsive
--------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  /* four centred stats no longer fit beside the venue photo: go two-by-two */
  .nif-why__stats { gap: 24px 0; }
  .nif-why__stats > div { flex: 0 0 50%; }
}

@media (max-width: 1020px) {
  .nif-hero__heading { font-size: 46px; }
  .nif-parties { grid-template-columns: repeat(2, 1fr); }
  .nif-posts { grid-template-columns: repeat(2, 1fr); }
  .nif-who__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nif-who__grid .nif-who__card:nth-child(n) { grid-column: span 1; }
  .nif-who__grid .nif-who__card:last-child:nth-child(odd) { grid-column: span 2; }
}

@media (max-width: 860px) {
  .nif-header__inner { flex-wrap: wrap; gap: 12px 20px; }
  .nif-nav { margin-left: 0; width: 100%; justify-content: space-between; }
  .nif-nav__list { flex-wrap: wrap; gap: 12px 18px; }
  .nif-nav__list .is-soon { display: none; }

  .nif-section { padding-top: 64px; }
  .nif-hero { background: var(--nif-blue) url('assets/img/nif-motif-blue.jpg') no-repeat center / cover; }
  .nif-hero__inner::before { display: none; }
  .nif-hero__inner { padding-top: 56px; padding-bottom: 48px; }
  .nif-hero__inner--video { grid-template-columns: 1fr; gap: 36px; }
  .nif-hero__heading,
  .nif-hero__inner--video .nif-hero__heading { font-size: 36px; }
  .nif-hero__quote,
  .nif-hero__inner--video .nif-hero__quote { font-size: 18px; }
  .nif-video__hint { display: none; }
  .nif-video-modal { padding: 12px; }
  .nif-video-modal__close { top: -46px; }

  .nif-about__grid { grid-template-columns: 1fr; gap: 24px; }
  .nif-why__grid { grid-template-columns: 1fr; gap: 44px; }
  .nif-why__badge { left: 12px; bottom: -14px; }
  .nif-days { grid-template-columns: 1fr; }
  .nif-who__grid { grid-template-columns: 1fr; gap: 14px; }
  .nif-who__grid .nif-who__card:nth-child(n), .nif-who__grid .nif-who__card:last-child:nth-child(odd) { grid-column: span 1; }
  .nif-who__close { padding: 32px 26px; }
  .nif-who__close-lead { font-size: 22px; }
  .nif-who__close .nif-deco .c4, .nif-who__close .nif-deco .c2 { display: none; }
  .nif-who__close .nif-deco .c1 { top: auto; bottom: -160px; right: -120px; }
  .nif-kuching__grid { grid-template-columns: 1fr; }
  .nif-posts { grid-template-columns: 1fr; }

  .nif-cta__band { padding: 36px 28px; }
  .nif-h2 { font-size: 28px; }
  .nif-fees__heading { font-size: 24px; }
  .nif-fees__table th, .nif-fees__table td { padding: 12px 14px; }
  .nif-fees__table { font-size: 14px; }
  .nif-page-hero__title { font-size: 32px; }

  .nif-footer__grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 560px) {
  .nif-page-hero__flash { display: flex; width: 100%; box-sizing: border-box; }
  .nif-page-hero__flash-days { font-size: 26px; }
  .nif-brand__logo--full { display: none; }
  .nif-brand__logo--mark { display: block; }
  .nif-parties { grid-template-columns: 1fr; }
  .nif-countdown__units { gap: 20px; }
  .nif-countdown__units span { font-size: 26px; }
}
