/* ==========================================================================
   Guyana Matrimony — Policy Pages
   Primary: #205634   Secondary: #D4A24A
   ========================================================================== */

:root {
  --primary: #205634;
  --primary-dark: #163d24;
  --primary-light: #2f7a4a;
  --primary-tint: #eaf2ed;
  --secondary: #D4A24A;
  --secondary-dark: #A87F32;
  --secondary-tint: #fbf4e7;

  --ink: #1c2521;
  --body: #4a5750;
  --muted: #77857d;
  --line: #e2e8e4;
  --bg: #f6f8f7;
  --card: #ffffff;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(28, 37, 33, .06);
  --shadow: 0 4px 18px rgba(28, 37, 33, .07);
  --shadow-lg: 0 12px 40px rgba(28, 37, 33, .12);

  --header-h: 74px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  --font-head: "Georgia", "Times New Roman", serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--secondary-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.3; margin: 0 0 .6em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.35rem; }
li { margin-bottom: .5em; }
strong { color: var(--ink); font-weight: 600; }
:focus-visible { outline: 3px solid var(--secondary); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.brand img { height: 50px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; color: var(--primary); letter-spacing: .02em; }
.brand-tag { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--secondary-dark); font-weight: 600; }

.nav-toggle { display: none; }
.nav-toggle-label {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px; background: #fff;
}
.nav-toggle-label span { display: block; width: 20px; height: 2px; background: var(--primary); border-radius: 2px; transition: transform .25s, opacity .2s; }

.site-nav ul { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 9px 15px; border-radius: 999px;
  font-size: .93rem; font-weight: 600; color: var(--body); transition: background .2s, color .2s;
}
.site-nav a:hover { background: var(--primary-tint); color: var(--primary); }
.site-nav a.active { background: var(--primary); color: #fff; }

/* ---------- Hero ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
  color: #fff; padding: 54px 0 60px; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; right: -90px; top: -90px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,162,74,.28), transparent 68%);
}
.page-hero .container { position: relative; z-index: 1; }
.breadcrumb { font-size: .82rem; color: rgba(255,255,255,.78); margin-bottom: 14px; }
.breadcrumb a { color: rgba(255,255,255,.78); }
.breadcrumb a:hover { color: var(--secondary); }
.breadcrumb span { margin: 0 7px; opacity: .6; }
.page-hero h1 { color: #fff; font-size: clamp(1.75rem, 5vw, 2.7rem); margin-bottom: .35em; }
.hero-rule { width: 68px; height: 4px; background: var(--secondary); border-radius: 3px; margin-bottom: 18px; }
.hero-sub { max-width: 640px; color: rgba(255,255,255,.88); font-size: 1.03rem; margin: 0 0 18px; }
.badge-updated {
  display: inline-block; background: rgba(212,162,74,.2); border: 1px solid rgba(212,162,74,.55);
  color: #fbf0da; font-size: .8rem; font-weight: 600; padding: 6px 15px; border-radius: 999px;
}

/* ---------- Layout ---------- */
.page-body { padding: 42px 0 60px; }
.layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 32px; align-items: start; }

/* ---------- TOC ---------- */
.toc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); position: sticky; top: calc(var(--header-h) + 20px); overflow: hidden;
}
.toc > summary { display: none; }
.toc-head {
  padding: 15px 18px; border-bottom: 1px solid var(--line); background: var(--primary-tint);
  font-family: var(--font-head); font-weight: 700; color: var(--primary); font-size: .95rem;
}
.toc nav {
  max-height: min(62vh, 560px); overflow-y: auto; padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: #cfdad3 transparent;
}
.toc nav::-webkit-scrollbar { width: 5px; }
.toc nav::-webkit-scrollbar-track { background: transparent; }
.toc nav::-webkit-scrollbar-thumb { background: #cfdad3; border-radius: 999px; }
.toc nav::-webkit-scrollbar-thumb:hover { background: var(--secondary); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a {
  display: block; padding: 8px 11px; border-radius: var(--radius-sm);
  font-size: .87rem; line-height: 1.45; color: var(--body); border-left: 3px solid transparent;
}
.toc a:hover { background: var(--primary-tint); color: var(--primary); border-left-color: var(--secondary); }

/* ---------- Content ---------- */
.content {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 40px 44px 34px;
}
.content > .intro {
  background: var(--secondary-tint); border-left: 4px solid var(--secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 18px 22px; margin-bottom: 34px;
  font-size: .96rem; color: var(--ink);
}
.content > .intro p:last-child { margin-bottom: 0; }

.policy-section { padding-top: 6px; margin-bottom: 34px; }
.policy-section:last-child { margin-bottom: 0; }
.policy-section h2 {
  display: flex; align-items: baseline; gap: 12px;
  font-size: clamp(1.12rem, 2.4vw, 1.34rem); color: var(--primary);
  padding-bottom: 11px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
}
.policy-section h2 .num {
  flex: 0 0 auto; font-family: var(--font); font-size: .78rem; font-weight: 700;
  color: var(--secondary-dark); background: var(--secondary-tint);
  border: 1px solid rgba(212,162,74,.4); border-radius: 7px; padding: 3px 9px; letter-spacing: .04em;
}
.policy-section ul { list-style: none; padding-left: 0; }
.policy-section ul > li { position: relative; padding-left: 27px; }
.policy-section ul > li::before {
  content: ""; position: absolute; left: 6px; top: .68em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--secondary);
}
.policy-section ol { padding-left: 1.4rem; }
.policy-section ol > li::marker { color: var(--secondary-dark); font-weight: 700; }

.callout {
  background: var(--primary-tint); border: 1px solid #cfe0d6; border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 18px 22px; margin: 20px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout em { color: var(--ink); }

.content-foot {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  font-size: .86rem; color: var(--muted);
}
.btn-top {
  display: inline-block; background: var(--primary); color: #fff; font-weight: 600; font-size: .86rem;
  padding: 10px 20px; border-radius: 999px; transition: background .2s, transform .15s;
}
.btn-top:hover { background: var(--secondary-dark); color: #fff; transform: translateY(-1px); }

/* ---------- Related ---------- */
.related { margin-top: 30px; }
.related h2 { font-size: 1.15rem; color: var(--primary); margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.related-card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--secondary); }
.related-card h3 { font-size: 1.02rem; color: var(--primary); margin-bottom: .35em; }
.related-card p { font-size: .87rem; color: var(--muted); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.74); padding: 46px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 34px; padding-bottom: 34px; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: var(--secondary); }
.footer-about p { font-size: .89rem; margin: 16px 0 0; max-width: 360px; }
.site-footer h4 { color: #fff; font-size: .93rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; font-size: .89rem; }
.site-footer a { color: rgba(255,255,255,.74); }
.site-footer a:hover { color: var(--secondary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.13); padding: 18px 0 22px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: .82rem;
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; gap: 22px; }
  .toc { position: static; }
  .toc > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer;
    list-style: none; padding: 15px 18px; background: var(--primary-tint);
    font-family: var(--font-head); font-weight: 700; color: var(--primary); font-size: .95rem;
  }
  .toc > summary::-webkit-details-marker { display: none; }
  .toc > summary::after {
    content: "▾"; color: var(--secondary-dark); font-size: 1rem; transition: transform .25s;
  }
  .toc[open] > summary::after { transform: rotate(180deg); }
  .toc[open] > summary { border-bottom: 1px solid var(--line); }
  .toc-head { display: none; }
  .toc nav { max-height: 340px; }
  .content { padding: 32px 30px 28px; }
}

@media (max-width: 860px) {
  .nav-toggle-label { display: flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px; }
  .site-nav a { padding: 13px 14px; border-radius: var(--radius-sm); }
  .nav-toggle:checked ~ .site-nav { max-height: 340px; }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .header-inner { position: relative; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; line-height: 1.72; }
  .container { padding: 0 16px; }
  .brand img { height: 42px; }
  .brand-name { font-size: .97rem; }
  .brand-tag { font-size: .6rem; letter-spacing: .13em; }
  .page-hero { padding: 36px 0 40px; }
  .page-hero::after { width: 210px; height: 210px; right: -70px; top: -70px; }
  .hero-sub { font-size: .95rem; }
  .page-body { padding: 26px 0 42px; }
  .content { padding: 24px 20px 22px; border-radius: 12px; }
  .content > .intro { padding: 15px 17px; margin-bottom: 26px; }
  .policy-section { margin-bottom: 28px; }
  .policy-section h2 { flex-direction: column; gap: 8px; align-items: flex-start; }
  .content-foot { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 380px) {
  .brand-text { display: none; }
  .content { padding: 20px 15px 18px; }
}

@media print {
  .site-header, .page-hero::after, .toc, .related, .site-footer, .btn-top, .skip-link { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .layout { display: block; }
  .content { box-shadow: none; border: 0; padding: 0; }
  .page-hero { background: none; color: #000; padding: 0 0 18px; }
  .page-hero h1, .hero-sub, .breadcrumb { color: #000; }
  .policy-section { break-inside: avoid; }
}
