
/* GoldenDrift system — namespaced tokens */
:root{
  --gd-primary: #d4af37;
  --gd-paper: #0f1113;
  --gd-ink: #f5f3ea;
  --gd-muted: #c9c3b1;
  --gd-surface: #15181c;
  --gd-line: rgba(212,175,55,0.35);
  --gd-radius-1: 6px;
  --gd-radius-2: 12px;
  --gd-radius-3: 18px;
  --gd-shadow-1: 0 1px 0 rgba(0,0,0,0.25), 0 0 0 1px rgba(212,175,55,0.06) inset;
  --gd-shadow-2: 0 10px 24px rgba(0,0,0,0.35), 0 0 0 1px rgba(212,175,55,0.12);
  --gd-container: 1180px;
  --gd-space-1: 8px;
  --gd-space-2: 14px;
  --gd-space-3: 20px;
  --gd-space-4: 28px;
  --gd-space-5: 40px;
  --gd-space-6: 56px;
}

* { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  color: var(--gd-ink);
  background: radial-gradient(1200px 600px at 50% -200px, rgba(212,175,55,0.08), transparent 60%),
              radial-gradient(800px 400px at 110% 0, rgba(212,175,55,0.05), transparent 60%),
              linear-gradient(180deg, #0b0d0f, var(--gd-paper) 35%, #0b0d0f);
}

a { color: var(--gd-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Paragraph justification rule — do not override elsewhere */
article p,
section p,
main p,
p {
  text-align: justify !important;
  text-justify: inter-word !important;
  -webkit-hyphens: auto !important;
  -ms-hyphens: auto !important;
  hyphens: auto !important;
}

/* Layout */
.gd-wrap {
  max-width: var(--gd-container);
  margin: 0 auto;
  padding: 0 var(--gd-space-3);
}

header.gd-hdr {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(10,12,14,0.9), rgba(10,12,14,0.7));
  border-bottom: 1px solid var(--gd-line);
}
.gd-hdr-inner {
  display: flex; align-items: center; gap: var(--gd-space-3);
  padding: var(--gd-space-2) 0;
}
.gd-logo { display:flex; align-items:center; gap: var(--gd-space-2); }
.gd-logo img { height: 36px; width:auto; display:block; }
.gd-brand { font-weight: 700; letter-spacing: .5px; color: var(--gd-ink); }

/* Nav: right aligned, pill tabs with bg-fade */
nav.gd-nav { margin-left: auto; }
.gd-menu { display: flex; gap: var(--gd-space-2); list-style: none; padding: 0; margin: 0; }
.gd-menu a {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  color: var(--gd-ink); border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.gd-menu a:hover { background: rgba(212,175,55,0.12); border-color: rgba(212,175,55,0.25); transform: translateY(-1px); }
.gd-menu .gd-active { background: rgba(212,175,55,0.22); border-color: rgba(212,175,55,0.35); }

/* Main layout: two-column with sidebar */
main.gd-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--gd-space-5);
  padding: var(--gd-space-5) 0 var(--gd-space-6);
}
@media (max-width: 980px){
  main.gd-main { grid-template-columns: 1fr; }
  aside.gd-sidebar { order: -1; }
}

article.gd-content {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  border: 1px solid var(--gd-line);
  border-radius: var(--gd-radius-2);
  box-shadow: var(--gd-shadow-2);
  padding: var(--gd-space-5);
}
aside.gd-sidebar {
  position: sticky; top: 72px;
  align-self: start;
  background: var(--gd-surface);
  border: 1px solid var(--gd-line);
  border-radius: var(--gd-radius-2);
  padding: var(--gd-space-4);
  box-shadow: var(--gd-shadow-1);
}
.gd-sidebar h3 { margin-top: 0; }

/* Headings and dek */
.gd-dek {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--gd-muted);
  margin: 0 0 var(--gd-space-3);
}
h1.gd-h1 {
  font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem);
  margin: 0 0 var(--gd-space-2);
  letter-spacing: .2px;
}
h2, h3 { color: var(--gd-ink); }

.gd-section { padding-top: var(--gd-space-5); margin-top: var(--gd-space-4); border-top: 1px solid var(--gd-line); }

/* Image treatment: one framed hero per page */
.gd-hero { margin: 0 0 var(--gd-space-4); }
.gd-hero img {
  width: 100%; height: auto; display: block;
  border-radius: var(--gd-radius-3);
  border: 1px solid rgba(212,175,55,0.35);
  box-shadow: 0 0 0 6px rgba(212,175,55,0.08), 0 20px 48px rgba(0,0,0,0.45);
}
.gd-hero figcaption {
  color: var(--gd-muted);
  font-size: .95rem; padding-top: 8px;
}

/* Buttons and small UI */
.gd-btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--gd-primary);
  color: #111; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.2);
}
.gd-btn:hover { filter: brightness(1.05); }

/* Footer */
footer.gd-ftr {
  border-top: 1px solid var(--gd-line);
  background: #0b0d0f;
  color: var(--gd-muted);
  padding: var(--gd-space-4) 0;
  text-align: center;
}

/* Back to Top control (namespaced) */
.gd--to-top{
  position: fixed;
  right: 18px; bottom: 18px;
  width: 42px; height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: var(--gd-primary);
  color: #111;
  font: 600 18px/42px system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
  z-index: 60;
}
.gd--to-top:hover{ background: #fff; }
.gd--to-top.gd--show{ opacity: 1; transform: translateY(0); pointer-events: auto; }
@media (prefers-reduced-motion: reduce){ .gd--to-top{ transition: none; } }

/* --- Footer Alignment & Styling Fix (FutureHealth / Metrolagu Network adaptation) --- */

/* Override justification inside footer */
footer.gd-ftr,
footer.gd-ftr * {
  text-align: center !important;
}

/* Structure and spacing */
footer.gd-ftr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gd-space-3);
  padding-top: var(--gd-space-5);
  padding-bottom: var(--gd-space-5);
  background: #0b0d0f; /* darker tone for contrast */
  border-top: 1px solid var(--gd-line);
  color: var(--gd-muted);
}

/* Metrolagu Network Section (FutureHealth adaptation) */
.metrolagu-network {
  background: none;
  color: var(--gd-ink);
  padding: var(--gd-space-4) 0;
}

.network-container {
  max-width: var(--gd-container);
  margin: 0 auto;
  padding: 0 var(--gd-space-3);
}

.metrolagu-network h3 {
  font-size: 1.15em;
  margin-bottom: var(--gd-space-1);
  color: var(--gd-primary);
  font-weight: 600;
  text-align: center;
  text-shadow: 0 0 6px rgba(212,175,55,0.25);
}

.metrolagu-network p {
  color: var(--gd-muted);
  margin-bottom: 10px;
  line-height: 1.7;
  text-align: center;
}

/* Network links */
.network-links {
  text-align: center;
}

.network-links a {
  color: var(--gd-ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(212,175,55,0.25);
  transition: color 0.3s ease, border-color 0.3s ease, text-shadow 0.3s ease;
}

.network-links a:hover {
  color: var(--gd-primary);
  border-bottom-color: var(--gd-primary);
  text-shadow: 0 0 6px rgba(212,175,55,0.35);
}

/* Copyright Pill (Gold-accented) */
.site-footer .copyright,
footer.gd-ftr .copyright {
  display: inline-block;
  margin: 16px auto 6px auto;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.4px;
  color: var(--gd-ink);
  background: rgba(255,255,255,0.06);
  padding: 8px 24px;
  border: 1.5px solid var(--gd-line);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4), 0 0 12px rgba(212,175,55,0.1);
  transition: all 0.3s ease;
}

/* Hover shimmer */
footer.gd-ftr .copyright:hover {
  background: rgba(212,175,55,0.08);
  color: var(--gd-primary);
  border-color: rgba(212,175,55,0.45);
  box-shadow: 0 3px 14px rgba(212,175,55,0.25);
  transform: translateY(-1px);
}

/* Ensure link inside pill inherits glow tone */
footer.gd-ftr .copyright a {
  color: inherit !important;
  text-decoration: none !important;
  transition: opacity 0.3s ease;
}
