/*
Theme Name: MITE Blog
Theme URI: https://mite.co.za/
Author: Mastercraft Institute of Trade Excellence
Author URI: https://mite.co.za/
Description: Editorial blog theme for Mastercraft Institute of Trade Excellence (MITE), sharing the navy-and-gold design system, DM Serif Display / Lato typography and hairline-grid card layout of mite.co.za. Blog-only: the front page is the post index, single.php reads like a programme detail page, and category archives are real, filterable pages in the same pattern as the main site's programme listings.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: mite-blog
*/

:root {
  --navy: #10304A;
  --navy-deep: #0B2336;
  --navy-line: #1B3B53;
  --ink: #12222E;
  --gold: #DAA425;
  --gold-light: #E7C77A;
  --bone: #F8F6F2;
  --bone-warm: #FFFDF7;
  --line: #E5E0D6;
  --line-light: #F0EBE1;
  --body: #4C5D6A;
  --body-light: #5A6B78;
  --meta: #6A7B88;
  --meta-light: #8A97A2;
  --on-navy: #C3D0DA;
  --on-navy-strong: #E3EBF1;
  --on-navy-muted: #B9C7D2;
  --input-line: #D9D3C6;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Lato', system-ui, -apple-system, sans-serif;
  --wrap: 1360px;
  --pad-x: clamp(20px, 5vw, 64px);
  --sec-y: clamp(48px, 6vw, 92px);
  --sec-y-lg: clamp(56px, 7vw, 100px);
  --gap-col: clamp(32px, 5vw, 64px);
  --header-h: 104px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { max-width: 100%; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }

::selection { background: var(--gold); color: var(--navy); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

h1, h2, h3, h4, blockquote, p, figure { margin: 0; }

button { font: inherit; }

.screen-reader-text {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--navy);
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 200;
}
.skip:focus { left: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; width: 100%; }

/* ---------- type ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.kicker {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.label {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.06;
  text-wrap: pretty;
}
.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.12;
  color: var(--navy);
  text-wrap: pretty;
}
.h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.14;
  color: var(--navy);
}
.lead {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.68;
  color: var(--body);
}
.body { font-size: 17px; line-height: 1.75; color: #3F5260; text-wrap: pretty; }
.measure { max-width: 62ch; }
.measure-sm { max-width: 56ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 18px 32px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s cubic-bezier(0.16,1,0.3,1), box-shadow 0.18s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--navy); color: #FFFFFF; box-shadow: 0 10px 24px rgba(16,48,74,0.18); }
.btn-navy { background: var(--navy); color: #FFFFFF; }
.btn-navy:hover { background: var(--gold); color: var(--navy); box-shadow: 0 10px 24px rgba(218,164,37,0.22); }
.btn-ghost { border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #FFFFFF; }
.btn-ghost-light { border-color: #7C93A5; color: #FFFFFF; }
.btn-ghost-light:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { padding: 14px 24px; font-size: 12.5px; }

.textlink {
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 4px;
  display: inline-block;
}
.textlink-light { color: #FFFFFF; }
.textlink-light:hover { color: var(--gold); }

/* ---------- header ---------- */
.utility {
  background: var(--navy);
  color: var(--on-navy-muted);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  justify-content: flex-end;
  padding: 9px clamp(16px, 4vw, 64px);
}
.utility a { color: var(--gold-light); }
.utility a:hover { color: var(--gold); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #FFFFFF;
  box-shadow: 0 1px 0 var(--line);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 10px 28px rgba(11,35,54,0.1); }
.header-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px var(--pad-x);
  max-width: var(--wrap);
  margin: 0 auto;
  width: 100%;
}
.logo { display: flex; align-items: center; min-width: 0; }
.logo img { height: clamp(44px, 5.6vw, 64px); width: auto; display: block; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 30px);
  margin-left: auto;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: contents; }
.nav li { display: contents; }
.nav a.navlink {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 6px 0;
  position: relative;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.nav a.navlink[aria-current]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--gold);
}
.nav a.navlink:not([aria-current])::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--gold-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1);
}
.nav a.navlink:not([aria-current]):hover::before { transform: scaleX(1); }
.nav .btn { padding: 13px 22px; font-size: 12.5px; letter-spacing: 0.11em; font-weight: 900; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  background: #FFFFFF;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--navy);
  display: block;
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1), opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  border-top: 1px solid transparent;
  padding: 0 var(--pad-x);
  transition: max-height 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.3s ease, padding 0.35s ease, border-color 0.3s ease;
}
.nav-mobile.open {
  max-height: 640px;
  opacity: 1;
  padding: 8px var(--pad-x) 24px;
  border-top-color: var(--line);
}
.nav-mobile ul { list-style: none; margin: 0; padding: 0; display: contents; }
.nav-mobile li { display: contents; }
.nav-mobile a.navlink {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 15px 0;
  border-bottom: 1px solid var(--line-light);
  display: block;
}
.nav-mobile .btn { margin-top: 18px; padding: 17px 22px; }

@media (max-width: 1079px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- sections ---------- */
.section { padding: var(--sec-y) var(--pad-x); background: #FFFFFF; }
.section-lg { padding: var(--sec-y-lg) var(--pad-x); }
.section-bone { background: var(--bone); }
.section-navy { background: var(--navy); color: #FFFFFF; }
.section-navy .h2, .section-navy .h1 { color: #FFFFFF; }
.section-navy .body, .section-navy .lead { color: var(--on-navy); }

.page-hero { background: var(--navy); color: #FFFFFF; padding: clamp(44px, 6vw, 84px) var(--pad-x); }
.page-hero .h1 { margin-bottom: 18px; max-width: 26ch; }
.page-hero p { font-size: 17px; line-height: 1.7; color: var(--on-navy); max-width: 62ch; }
.page-hero .post-meta { color: var(--on-navy-muted); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap-col);
  align-items: center;
}
.split-top { align-items: start; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(28px, 3.5vw, 48px);
}

/* hairline grid: 2px gaps over the line colour */
.hairline {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
.hairline > * { background: #FFFFFF; flex: 1 1 300px; }
.hairline.bone > * { background: var(--bone); }
.cell { padding: clamp(26px, 3vw, 36px); display: flex; flex-direction: column; gap: 12px; }
.cell-title { font-family: var(--serif); font-size: 23px; line-height: 1.2; color: var(--navy); }
.cell p { font-size: 15px; line-height: 1.7; color: var(--body-light); }
.cell-num { font-family: var(--serif); font-size: 32px; color: var(--gold); line-height: 1; }

.ruled { border-top: 2px solid var(--gold); padding-top: 20px; }

.starlist { display: flex; flex-direction: column; }
.starlist li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line-light);
  padding: 15px 0;
  font-size: 16px;
  line-height: 1.7;
  color: #3F5260;
}
.starlist li::before { content: "\2605"; color: var(--gold); font-size: 13px; line-height: 1.7; }

ul.plain { list-style: none; margin: 0; padding: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 1px solid var(--navy);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 20px;
}
.chip-soft {
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  padding: 14px 20px;
}

.quote,
blockquote {
  font-family: var(--serif);
  font-size: clamp(21px, 2.2vw, 27px);
  line-height: 1.35;
  color: var(--navy);
  padding-left: 24px;
  border-left: 3px solid var(--gold);
  text-wrap: pretty;
}
blockquote p { margin-bottom: 0; }
blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: var(--meta);
}

/* ---------- media ---------- */
.media { position: relative; overflow: hidden; background: var(--line-light); }
.ratio-32 { aspect-ratio: 3 / 2; }
.ratio-43 { aspect-ratio: 4 / 3; }
.ratio-54 { aspect-ratio: 5 / 4; }
.ratio-45 { aspect-ratio: 4 / 5; }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.card:hover .media img { transform: scale(1.045); }

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: var(--bone);
  border: 1px dashed var(--line);
  color: var(--meta);
  font-size: 13px;
  line-height: 1.6;
  min-height: 200px;
}

/* ---------- blog hero ---------- */
.hero {
  position: relative;
  background: var(--navy);
  color: #FFFFFF;
  overflow: hidden;
  min-height: clamp(420px, 58vh, 640px);
  display: flex;
  align-items: flex-end;
  padding: clamp(64px, 10vw, 130px) var(--pad-x) clamp(52px, 7vw, 96px);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-scrim, .hero-scrim-2 { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-scrim {
  background: linear-gradient(100deg, rgba(11,35,54,0.95) 0%, rgba(11,35,54,0.88) 38%, rgba(16,48,74,0.62) 72%, rgba(16,48,74,0.5) 100%);
}
.hero-scrim-2 {
  background: linear-gradient(to top, rgba(11,35,54,0.9) 0%, rgba(11,35,54,0.25) 42%, rgba(11,35,54,0.45) 100%);
}
.hero-seal {
  position: absolute;
  right: -7%;
  bottom: -22%;
  width: min(520px, 62vw);
  opacity: 0.09;
  z-index: 2;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 3; max-width: var(--wrap); margin: 0 auto; width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .hero-badge, .hero h1, .hero p, .hero .btn-row {
    animation: fade-up 0.85s cubic-bezier(0.16,1,0.3,1) both;
  }
  .hero-badge { animation-delay: 0.05s; }
  .hero h1 { animation-delay: 0.16s; }
  .hero p { animation-delay: 0.3s; }
  .hero .btn-row { animation-delay: 0.42s; }

  .page-hero .h1, .page-hero p, .page-hero .btn-row, .page-hero .post-meta {
    animation: fade-up 0.75s cubic-bezier(0.16,1,0.3,1) both;
  }
  .page-hero .eyebrow, .page-hero .back-link { animation: fade-up 0.6s cubic-bezier(0.16,1,0.3,1) both; }
  .page-hero .post-meta { animation-delay: 0.03s; }
  .page-hero .h1 { animation-delay: 0.08s; }
  .page-hero p { animation-delay: 0.18s; }
  .page-hero .btn-row { animation-delay: 0.28s; }
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6.2vw, 68px);
  line-height: 1.05;
  margin-bottom: 20px;
  text-wrap: pretty;
  text-shadow: 0 2px 24px rgba(7,22,35,0.45);
}
.hero p { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65; color: var(--on-navy-strong); max-width: 56ch; margin-bottom: 30px; }
.stars { color: var(--gold); letter-spacing: 0.34em; font-size: 15px; }
.hero-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.hero-badge span:last-child {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #DCE5EC;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  transition: opacity 0.2s ease;
}
.card-grid.is-filtering { opacity: 0.4; }
.card {
  border: 1px solid var(--line);
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease;
}
.card:hover { border-color: var(--navy); transform: translateY(-5px); box-shadow: 0 18px 36px rgba(16,48,74,0.09); }
.card-body { padding: 26px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.card-title { font-family: var(--serif); font-size: 24px; line-height: 1.18; color: var(--navy); }
.card-body p { font-size: 15px; line-height: 1.6; color: var(--body-light); flex: 1; }
.card-more {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  padding-top: 6px;
}
.card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.card-featured .media { aspect-ratio: auto; height: 100%; }
@media (max-width: 780px) { .card-featured { grid-template-columns: 1fr; } }

/* ---------- filters (category browse bar) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(28px, 3.5vw, 44px); }
.filter {
  display: inline-flex;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 22px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #FFFFFF;
  color: var(--navy);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}
.filter:hover { border-color: var(--navy); color: var(--navy); }
.filter:active { transform: scale(0.97); }
.filter[aria-current="page"] { background: var(--navy); color: #FFFFFF; border-color: var(--navy); }
.filter[aria-current="page"]:hover { color: #FFFFFF; }

/* ---------- back link / post meta ---------- */
.back-link {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-navy-muted);
  display: inline-block;
  margin-bottom: 26px;
}
.back-link:hover { color: var(--gold); }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--meta);
  margin-top: 14px;
}
.post-meta a { color: inherit; }
.post-meta a:hover { color: var(--gold); }
.post-meta .dot { color: var(--line); }

/* ---------- entry / prose ---------- */
.entry-content { font-size: 17px; line-height: 1.78; color: #3F5260; }
.entry-content > * + * { margin-top: 22px; }
.entry-content h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  color: var(--navy);
  margin-top: 44px !important;
}
.entry-content h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.24;
  color: var(--navy);
  margin-top: 36px !important;
}
.entry-content h4 { font-size: 17px; font-weight: 700; color: var(--navy); }
.entry-content a { text-decoration: underline; text-decoration-color: var(--gold-light); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: var(--gold); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: 8px; }
.entry-content img { display: block; }
.entry-content figure { margin: 0; }
.entry-content figcaption {
  font-size: 13px;
  color: var(--meta);
  margin-top: 10px;
  text-align: center;
}
.entry-content code {
  background: var(--bone);
  border: 1px solid var(--line);
  padding: 2px 6px;
  font-size: 0.9em;
}
.entry-content pre {
  background: var(--navy-deep);
  color: var(--on-navy-strong);
  padding: 22px;
  overflow-x: auto;
  border-left: 3px solid var(--gold);
}
.entry-content pre code { background: none; border: none; padding: 0; color: inherit; }
.entry-content hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; }
.entry-content th { font-weight: 900; text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em; color: var(--navy); }

/* WordPress core alignment + caption classes */
.alignwide { width: 100%; max-width: calc(var(--wrap) - 2 * var(--pad-x) + 260px); margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 6px 26px 16px 0; max-width: 46%; }
.alignright { float: right; margin: 6px 0 16px 26px; max-width: 46%; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--meta); margin-top: 10px; text-align: center; }
.wp-block-quote, .wp-block-pullquote blockquote { font-family: var(--serif); }

/* ---------- tags / share ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.tag-list a {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  border: 1px solid var(--line);
  padding: 8px 14px;
}
.tag-list a:hover { border-color: var(--navy); color: var(--gold); }

/* ---------- author bio ---------- */
.author-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bone);
  border-top: 3px solid var(--gold);
  padding: clamp(24px, 3vw, 34px);
}
.author-card img { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; display: block; }
.author-card .name { font-family: var(--serif); font-size: 20px; color: var(--navy); margin-bottom: 6px; }
.author-card p { font-size: 15px; line-height: 1.65; color: var(--body-light); }

/* ---------- post navigation ---------- */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.post-nav a {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.18s ease;
}
.post-nav a:hover { background: var(--bone); }
.post-nav .prev { border-right: 1px solid var(--line); }
.post-nav .dir {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.post-nav .title { font-family: var(--serif); font-size: 19px; color: var(--navy); line-height: 1.3; }
.post-nav .next { text-align: right; align-items: flex-end; }
@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .prev { border-right: none; border-bottom: 1px solid var(--line); }
  .post-nav .next { text-align: left; align-items: flex-start; }
}

/* ---------- pagination ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(36px, 4vw, 56px);
}
.pagination a, .pagination span {
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  padding: 0 14px;
}
.pagination a:hover { border-color: var(--navy); }
.pagination .current { background: var(--navy); color: #FFFFFF; border-color: var(--navy); }
.pagination .dots { border: none; color: var(--meta); }

/* ---------- comments ---------- */
.comments-area { border-top: 1px solid var(--line); padding-top: clamp(36px, 4vw, 56px); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 24px 0 0 clamp(20px, 4vw, 48px); padding: 0; }
.comment-body { padding: clamp(20px, 2.5vw, 30px) 0; border-bottom: 1px solid var(--line-light); display: flex; gap: 18px; }
.comment-body img { border-radius: 50%; flex-shrink: 0; }
.comment-author { font-weight: 900; font-size: 14px; color: var(--navy); }
.comment-metadata { font-size: 12.5px; color: var(--meta); margin-top: 2px; }
.comment-metadata a { color: inherit; }
.comment-content { font-size: 15.5px; line-height: 1.7; color: var(--body); margin-top: 10px; }
.comment-content > * + * { margin-top: 12px; }
.comment-reply-link {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
  display: inline-block;
  margin-top: 10px;
}

/* ---------- forms (search, comment) ---------- */
.form-card {
  background: var(--bone);
  border-top: 3px solid var(--gold);
  padding: clamp(28px, 3.5vw, 44px);
}
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label, .field > span {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 16px;
  padding: 15px 16px;
  border: 1px solid var(--input-line);
  background: #FFFFFF;
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(218,164,37,0.25);
}
.search-form { display: flex; gap: 10px; flex-wrap: wrap; }
.search-form input[type="search"] {
  flex: 1 1 260px;
  font-family: var(--sans);
  font-size: 16px;
  padding: 15px 16px;
  border: 1px solid var(--input-line);
  background: #FFFFFF;
  color: var(--ink);
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(218,164,37,0.25); }

/* ---------- CTA band ---------- */
.cta {
  background: var(--bone);
  border-top: 1px solid var(--line);
  padding: clamp(48px, 6vw, 84px) var(--pad-x);
}
.cta-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
}
.cta h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.14;
  color: var(--navy);
  margin-bottom: 12px;
  text-wrap: pretty;
}
.cta p { font-size: 16.5px; line-height: 1.65; color: var(--body); }
.cta-copy { max-width: 46ch; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #A9BAC7;
  padding: clamp(48px, 6vw, 80px) var(--pad-x) 34px;
}
.footer-grid {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(32px, 4vw, 56px);
}
.site-footer img { width: 118px; height: auto; display: block; margin-bottom: 22px; }
.site-footer p { font-size: 15px; line-height: 1.7; max-width: 34ch; }
.footer-head {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.footer-list { display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.6; }
.footer-list a, .site-footer address a { color: #D6E0E8; }
.footer-list a:hover, .site-footer address a:hover { color: var(--gold); }
.site-footer address { font-style: normal; }
.footer-bottom {
  max-width: var(--wrap);
  margin: clamp(36px, 4vw, 56px) auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--navy-line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  font-size: 13px;
  color: #7E93A3;
}

/* ---------- WhatsApp overlay ---------- */
.wa {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.wa-panel {
  width: min(330px, calc(100vw - 40px));
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  background: #FFFFFF;
  box-shadow: 0 18px 48px rgba(11,35,54,0.28);
  border-top: 3px solid var(--gold);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.25s cubic-bezier(0.16,1,0.3,1), transform 0.25s cubic-bezier(0.16,1,0.3,1);
}
.wa-panel.open { opacity: 1; transform: translateY(0) scale(1); }
.wa-panel[hidden] { display: none; }
.wa-head {
  background: var(--navy);
  color: #FFFFFF;
  padding: 20px 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.wa-head strong { font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.2; }
.wa-head p { font-size: 13px; line-height: 1.55; color: var(--on-navy); margin-top: 4px; }
.wa-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--on-navy-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}
.wa-close:hover { color: var(--gold); }
.wa-topics { display: flex; flex-direction: column; padding: 8px 0; }
.wa-topics a {
  font-size: 15px;
  line-height: 1.45;
  color: var(--navy);
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-light);
  display: flex;
  gap: 12px;
  align-items: center;
  transition: background 0.15s ease, padding-left 0.2s ease;
}
.wa-topics a:hover { background: var(--bone); color: var(--navy); padding-left: 26px; }
.wa-topics a::before { content: "\2605"; color: var(--gold); font-size: 12px; }
.wa-foot { padding: 16px 22px 20px; font-size: 12.5px; line-height: 1.6; color: var(--meta); }
.wa-foot a { font-weight: 700; }
.wa-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--navy);
  color: #FFFFFF;
  border: none;
  border-bottom: 3px solid var(--gold);
  padding: 16px 22px;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(11,35,54,0.3);
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.18s ease, color 0.18s ease, transform 0.2s cubic-bezier(0.16,1,0.3,1), box-shadow 0.2s ease;
}
.wa-trigger:hover { background: var(--gold); color: var(--navy); transform: translateY(-2px); box-shadow: 0 16px 36px rgba(11,35,54,0.36); }
.wa-trigger:active { transform: translateY(0); }
.wa-trigger svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
