/* ==========================================================================
   Gold Tola Rate — global stylesheet
   Warm gold/cream theme, shared across every page of the site.
   ========================================================================== */

/* ---------- Ad slots ----------
   Hidden by default so an empty placeholder never renders a blank box.
   Once a real ad network snippet is placed inside one of these
   containers, remove `display: none` here (or scope it to only slots
   that are still empty via :empty). */
.ad-slot {
  display: none;
  margin: 24px 0;
}
.ad-slot:not(:empty) {
  display: block;
}

/* ---------- Cookie consent banner ---------- */

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(42, 35, 24, 0.12);
  padding: 16px 20px;
}

.cookie-consent-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cookie-consent-inner p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 640px;
}

.cookie-consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-consent-actions .btn,
.cookie-consent-actions .btn-outline {
  font-size: 13px;
  padding: 8px 16px;
}

:root {
  --bg: #fffaf0;
  --bg-alt: #f7f1e1;
  --surface: #ffffff;
  --border: #e6ddc8;
  --text: #2a2318;
  --text-muted: #6b5f47;
  --accent: #b8860b;
  --accent-dark: #8a660a;
  --accent-light: #d9a441;
  --link: #8a660a;
  --radius: 14px;
  --max-width: 1080px;
  --shadow: 0 1px 3px rgba(42, 35, 24, 0.08);
  --shadow-lg: 0 8px 24px rgba(42, 35, 24, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 19px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.logo svg { flex-shrink: 0; }
.logo span.accent { color: var(--accent-dark); }

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-links a:hover { color: var(--accent-dark); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 10px 0; border-bottom: 1px solid var(--bg-alt); }
  .nav-toggle { display: inline-block; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 44px 0 30px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(26px, 4vw, 38px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.hero p.lead {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Buttons / pills ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 999px;
}
.btn-outline:hover { background: var(--bg-alt); text-decoration: none; }

.pill {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- Cards / grids ---------- */

.section { padding: 34px 0; }
.section-title {
  font-size: 22px;
  margin: 0 0 6px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 22px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.card .pill { margin-bottom: 10px; }

.card h3 {
  font-size: 16px;
  margin: 0 0 8px;
  line-height: 1.4;
}
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent-dark); text-decoration: none; }

.card p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.city-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.city-chip:hover { border-color: var(--accent); color: var(--accent-dark); text-decoration: none; }

/* ---------- Article / prose content ---------- */

.article-header { padding: 34px 0 10px; }
.article-header .pill { margin-bottom: 12px; }
.article-header h1 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 10px; }
.article-meta { color: var(--text-muted); font-size: 13px; }

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 0 40px;
  font-size: 16.5px;
}

.prose h2 {
  font-size: 22px;
  margin: 34px 0 12px;
  padding-top: 4px;
}
.prose h3 {
  font-size: 18px;
  margin: 26px 0 10px;
}
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 14.5px;
}
.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.prose th { background: var(--bg-alt); font-weight: 700; }

.callout {
  background: var(--bg-alt);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 20px;
  font-size: 14.5px;
  color: var(--text-muted);
}
.callout strong { color: var(--text); }

.faq details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: var(--surface);
}
.faq summary {
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
}
.faq details p { margin: 10px 0 0; color: var(--text-muted); font-size: 14.5px; }

.related-box {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 10px;
}
.related-box h2 { margin-top: 0; font-size: 17px; }
.related-box ul { margin: 0; padding-left: 18px; }
.related-box li { margin-bottom: 6px; font-size: 14.5px; }

.breadcrumbs {
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 14px 0 0;
}
.breadcrumbs a { color: var(--text-muted); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin-top: 50px;
  padding: 40px 0 24px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.footer-grid h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0 0 10px;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 7px; }
.footer-grid a { color: var(--text-muted); }
.footer-grid a:hover { color: var(--accent-dark); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* ---------- Widget wrapper (spacing on host pages) ---------- */

.widget-wrap {
  display: flex;
  justify-content: center;
  margin: 22px 0 8px;
}

/* ==========================================================================
   Gold price widget (see /assets/widget.js) — scoped under #gold-tola-widget
   ========================================================================== */

#gold-tola-widget {
  --gtw-bg: #ffffff;
  --gtw-border: #e6ddc8;
  --gtw-text: #2a2318;
  --gtw-muted: #8a7f68;
  --gtw-accent: #b8860b;
  --gtw-accent-dark: #8a660a;
  --gtw-pill-bg: #f7f1e1;
  --gtw-pill-active-bg: #b8860b;
  --gtw-pill-active-text: #ffffff;
  font-family: inherit;
  width: 100%;
  max-width: 380px;
}

#gold-tola-widget .gtw-card {
  background: var(--gtw-bg);
  border: 1px solid var(--gtw-border);
  border-radius: 14px;
  padding: 18px 20px;
  color: var(--gtw-text);
  box-shadow: var(--shadow-lg);
}

#gold-tola-widget .gtw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

#gold-tola-widget .gtw-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gtw-muted);
  text-transform: uppercase;
}

#gold-tola-widget .gtw-refresh {
  background: none;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: var(--gtw-muted);
  padding: 4px;
  border-radius: 6px;
  transition: transform 0.4s ease, color 0.2s ease;
}
#gold-tola-widget .gtw-refresh:hover { color: var(--gtw-accent); }
#gold-tola-widget .gtw-refresh.gtw-spinning { animation: gtw-spin 0.7s linear; }
@keyframes gtw-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

#gold-tola-widget .gtw-purity-row {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

#gold-tola-widget .gtw-purity-btn {
  flex: 1;
  background: var(--gtw-pill-bg);
  border: none;
  color: var(--gtw-text);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

#gold-tola-widget .gtw-purity-btn.gtw-active {
  background: var(--gtw-pill-active-bg);
  color: var(--gtw-pill-active-text);
}

#gold-tola-widget .gtw-prices {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

#gold-tola-widget .gtw-price-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

#gold-tola-widget .gtw-currency-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gtw-muted);
  width: 34px;
  flex-shrink: 0;
}

#gold-tola-widget .gtw-price-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--gtw-accent-dark);
  font-variant-numeric: tabular-nums;
}

#gold-tola-widget .gtw-price-block:last-child .gtw-price-value {
  font-size: 17px;
  font-weight: 600;
  color: var(--gtw-muted);
}

#gold-tola-widget .gtw-footer {
  font-size: 11px;
  color: var(--gtw-muted);
  border-top: 1px solid var(--gtw-border);
  padding-top: 8px;
  margin-top: 4px;
}

/* ---------- Gold parallax playground (homepage only) ----------
   Fixed, aria-hidden decorative layer. z-index:-1 keeps it behind every
   normal-flow element (header, hero, cards, footer all stay fully
   readable) while still showing through the transparent gaps between
   them. Movement is driven by assets/gold-parallax.js: cursor position
   on desktop, device tilt (deviceorientation) on mobile/tablet. Respects
   prefers-reduced-motion by staying static. */

.gold-parallax {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.gp-orb,
.gp-coin {
  position: absolute;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* The outer .gp-orb/.gp-coin element is positioned on the page and is the
   ONLY thing gold-parallax.js ever moves (via inline transform). The inner
   <i> carries the visuals and its own separate, purely-CSS "breathe"
   animation, so the two transforms never fight over the same element. */
.gp-orb > i,
.gp-coin > i {
  display: block;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: gp-breathe 7s ease-in-out infinite;
}

.gp-orb > i {
  background: radial-gradient(circle at 32% 30%, #f7dfa0, #b8860b 55%, transparent 74%);
  filter: blur(14px);
}

.gp-orb-1 { width: 260px; height: 260px; left: -70px;  top: -60px;  opacity: 0.28; }
.gp-orb-2 { width: 200px; height: 200px; right: -50px; top: 16vh;   opacity: 0.22; }
.gp-orb-3 { width: 320px; height: 320px; left: 58vw;   top: 52vh;   opacity: 0.20; }
.gp-orb-4 { width: 180px; height: 180px; left: 8vw;    top: 68vh;   opacity: 0.24; }
.gp-orb-5 { width: 240px; height: 240px; right: 6vw;   top: 78vh;   opacity: 0.20; }
.gp-orb-6 { width: 150px; height: 150px; left: 38vw;   top: 6vh;    opacity: 0.26; }

.gp-orb-1 > i { animation-delay: 0s; }
.gp-orb-2 > i { animation-delay: .8s; }
.gp-orb-3 > i { animation-delay: 1.6s; }
.gp-orb-4 > i { animation-delay: 2.4s; }
.gp-orb-5 > i { animation-delay: 3.2s; }
.gp-orb-6 > i { animation-delay: 4s; }

.gp-coin > i {
  background: radial-gradient(circle at 35% 30%, #ffe9b0, #e0ac2e 45%, #a97c14 78%, #7a5a0d 100%);
  box-shadow: inset 0 0 0 2px rgba(122, 90, 13, 0.35);
  filter: blur(0.3px);
}

.gp-coin-1 { width: 34px; height: 34px; left: 20vw;  top: 24vh; opacity: 0.55; }
.gp-coin-2 { width: 26px; height: 26px; right: 16vw; top: 38vh; opacity: 0.6;  }
.gp-coin-3 { width: 42px; height: 42px; left: 74vw;  top: 14vh; opacity: 0.5;  }
.gp-coin-4 { width: 30px; height: 30px; right: 28vw; top: 62vh; opacity: 0.58; }

.gp-coin-1 > i { animation-delay: .4s; }
.gp-coin-2 > i { animation-delay: 1.2s; }
.gp-coin-3 > i { animation-delay: 2s; }
.gp-coin-4 > i { animation-delay: 2.8s; }

@keyframes gp-breathe {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -6px, 0) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .gp-orb > i, .gp-coin > i { animation: none; }
}

@media (max-width: 640px) {
  .gp-coin { display: none; }
  .gp-orb > i { filter: blur(20px); }
}

#gold-tola-widget .gtw-footer.gtw-error { color: #c0392b; }

/* ---------- Gold vs Other Metals (homepage comparison widget) ---------- */

.metals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.metal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.metal-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.metal-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.metal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.metal-name {
  font-weight: 700;
  font-size: 15px;
}

.metal-prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.metal-price-pkr {
  font-size: 21px;
  font-weight: 700;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}

.metal-price-usd {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.metal-unit {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.metal-ratio {
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.metals-status {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 14px 2px 0;
}

.metals-status.metals-error { color: #c0392b; }

@media (max-width: 480px) {
  .metals-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .metal-card { padding: 14px 14px 12px; }
}

.metals-faq-title {
  font-size: 17px;
  margin: 30px 0 12px;
}

.metals-faq { margin-bottom: 0; }
