/*
Theme Name: GoldSilverNews
Theme URI: https://goldsilvernews.xyz
Author: GoldSilverNews Team
Author URI: https://goldsilvernews.xyz
Description: A premium gold and silver news theme with live prices, auto content, and AdSense-ready layout.
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: goldsilvernews
Tags: news, gold, silver, finance, investment, dark-mode, responsive
*/

/* =============================
   RESET & BASE
============================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --gold: #D4AF37;
  --gold-dark: #B8960C;
  --gold-light: #F5E27A;
  --silver: #A8A9AD;
  --silver-dark: #6C6D70;
  --primary: #1a1a2e;
  --secondary: #16213e;
  --accent: #0f3460;
  --bg: #f7f8fa;
  --bg-card: #ffffff;
  --text: #1c1c1c;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --font: 'Inter', 'Segoe UI', sans-serif;
  --header-h: 68px;
}
[data-theme="dark"] {
  --bg: #0d1117;
  --bg-card: #161b22;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --border: #30363d;
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
}
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; transition: background 0.3s, color 0.3s; }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* =============================
   TYPOGRAPHY
============================= */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.3; color: var(--text); }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
p { margin-bottom: 1rem; }

/* =============================
   LAYOUT
============================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.grid-main { display: grid; grid-template-columns: 1fr 320px; gap: 32px; }
@media(max-width:900px){ .grid-main { grid-template-columns: 1fr; } }
.section { padding: 48px 0; }
.section-title { font-size: 1.4rem; font-weight: 800; color: var(--text); border-left: 4px solid var(--gold); padding-left: 12px; margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }

/* =============================
   HEADER
============================= */
#site-header { background: var(--primary); position: sticky; top: 0; z-index: 1000; height: var(--header-h); display: flex; align-items: center; box-shadow: 0 2px 16px rgba(0,0,0,0.3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo .logo-icon { width: 38px; height: 38px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.site-logo .logo-text { font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.site-logo .logo-text span { color: var(--gold); }
.header-ticker { flex: 1; overflow: hidden; margin: 0 24px; }
.ticker-wrap { display: flex; align-items: center; gap: 8px; }
.ticker-label { background: var(--gold); color: #000; font-weight: 700; font-size: 0.7rem; padding: 2px 8px; border-radius: 3px; white-space: nowrap; }
.ticker-scroll { overflow: hidden; flex: 1; }
.ticker-inner { display: flex; gap: 32px; animation: ticker 30s linear infinite; white-space: nowrap; }
.ticker-item { color: #e0e0e0; font-size: 0.82rem; display: flex; align-items: center; gap: 6px; }
.ticker-item .price { color: #fff; font-weight: 600; }
.ticker-item .up { color: #4ade80; }
.ticker-item .down { color: #f87171; }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.header-actions { display: flex; align-items: center; gap: 12px; }
#dark-toggle { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
#dark-toggle:hover { background: var(--gold); color: #000; }
.nav-menu { display: flex; gap: 4px; }
.nav-menu a { color: rgba(255,255,255,0.85); font-size: 0.87rem; font-weight: 500; padding: 6px 12px; border-radius: 5px; transition: all 0.2s; }
.nav-menu a:hover, .nav-menu a.current { background: rgba(212,175,55,0.2); color: var(--gold); }
.hamburger { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }
@media(max-width:768px){
  .nav-menu { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--primary); flex-direction: column; padding: 16px; gap: 2px; }
  .nav-menu.open { display: flex; }
  .hamburger { display: flex; }
  .header-ticker { display: none; }
}

/* =============================
   HERO / BREAKING NEWS
============================= */
.breaking-bar { background: var(--gold); color: #000; padding: 6px 0; font-size: 0.82rem; font-weight: 600; }
.breaking-bar .container { display: flex; gap: 16px; align-items: center; }
.breaking-label { background: #000; color: var(--gold); padding: 2px 10px; border-radius: 3px; white-space: nowrap; font-size: 0.75rem; }

/* =============================
   PRICE WIDGET (homepage)
============================= */
.price-hero { background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); padding: 32px 0; }
.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.price-card { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); padding: 20px; text-align: center; backdrop-filter: blur(10px); transition: transform 0.2s; }
.price-card:hover { transform: translateY(-2px); }
.price-card .metal-name { color: rgba(255,255,255,0.7); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.price-card .metal-price { font-size: 1.8rem; font-weight: 800; color: var(--gold); }
.price-card .metal-unit { color: rgba(255,255,255,0.5); font-size: 0.75rem; }
.price-card .metal-change { font-size: 0.85rem; font-weight: 600; margin-top: 6px; }
.price-card .metal-change.up { color: #4ade80; }
.price-card .metal-change.down { color: #f87171; }
.price-controls { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.price-btn { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); padding: 5px 14px; border-radius: 20px; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.price-btn.active, .price-btn:hover { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 700; }

/* =============================
   CARDS
============================= */
.card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-img { aspect-ratio: 16/9; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 16px; }
.card-cat { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gold-dark); margin-bottom: 6px; }
.card-title { font-size: 1rem; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--gold-dark); }
.card-meta { font-size: 0.75rem; color: var(--text-muted); display: flex; gap: 12px; align-items: center; }
.card-excerpt { font-size: 0.87rem; color: var(--text-muted); line-height: 1.5; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Featured card large */
.card-featured { display: grid; grid-template-columns: 1fr 1fr; min-height: 300px; }
@media(max-width:600px){ .card-featured { grid-template-columns: 1fr; } }
.card-featured .card-img { aspect-ratio: auto; height: 100%; }
.card-featured .card-body { padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.card-featured .card-title { font-size: 1.3rem; }

/* Post grid */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.post-grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }

/* Trending list */
.trending-list { display: flex; flex-direction: column; gap: 12px; }
.trending-item { display: flex; gap: 12px; align-items: flex-start; }
.trending-num { font-size: 2rem; font-weight: 900; color: var(--gold); opacity: 0.3; line-height: 1; min-width: 32px; }
.trending-content .t-cat { font-size: 0.7rem; color: var(--gold-dark); font-weight: 700; text-transform: uppercase; }
.trending-content .t-title { font-size: 0.9rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.trending-content .t-title:hover { color: var(--gold-dark); }

/* =============================
   SINGLE POST
============================= */
.post-header { background: var(--primary); padding: 48px 0 32px; }
.post-header .post-cat-label { display: inline-block; background: var(--gold); color: #000; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; padding: 3px 12px; border-radius: 3px; margin-bottom: 12px; }
.post-header h1 { color: #fff; max-width: 800px; }
.post-meta-bar { display: flex; gap: 16px; align-items: center; margin-top: 12px; color: rgba(255,255,255,0.6); font-size: 0.82rem; flex-wrap: wrap; }
.post-meta-bar .author { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.8); }
.author-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; color: #000; }
.post-content { max-width: 780px; }
.post-content h2 { margin: 2rem 0 1rem; padding-bottom: 6px; border-bottom: 2px solid var(--gold); }
.post-content h3 { margin: 1.5rem 0 0.8rem; color: var(--gold-dark); }
.post-content p { margin-bottom: 1.2rem; font-size: 1.05rem; line-height: 1.8; }
.post-content ul, .post-content ol { margin: 1rem 0 1rem 1.5rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-content blockquote { border-left: 4px solid var(--gold); padding: 12px 20px; background: rgba(212,175,55,0.08); margin: 1.5rem 0; font-style: italic; border-radius: 0 var(--radius) var(--radius) 0; }

/* FAQ */
.faq-block { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 2rem 0; }
.faq-block h2 { margin-bottom: 16px; font-size: 1.3rem; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q { padding: 14px 0; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-q::after { content: '+'; font-size: 1.4rem; color: var(--gold); transition: transform 0.2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 0 14px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.faq-item.open .faq-a { display: block; }

/* Share bar */
.share-bar { display: flex; gap: 10px; align-items: center; margin: 24px 0; flex-wrap: wrap; }
.share-bar span { font-weight: 600; font-size: 0.85rem; color: var(--text-muted); }
.share-btn { display: flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 5px; font-size: 0.82rem; font-weight: 600; border: none; cursor: pointer; transition: opacity 0.2s; }
.share-btn:hover { opacity: 0.85; }
.share-btn.twitter { background: #1da1f2; color: #fff; }
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.whatsapp { background: #25d366; color: #fff; }
.share-btn.copy { background: var(--border); color: var(--text); }

/* =============================
   SIDEBAR
============================= */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.widget-title { font-size: 1rem; font-weight: 700; border-bottom: 2px solid var(--gold); padding-bottom: 8px; margin-bottom: 16px; }
.widget-post-list { display: flex; flex-direction: column; gap: 14px; }
.widget-post { display: flex; gap: 10px; }
.widget-post-thumb { width: 70px; height: 55px; border-radius: 5px; overflow: hidden; flex-shrink: 0; }
.widget-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-post-title { font-size: 0.85rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.widget-post-title:hover { color: var(--gold-dark); }
.widget-post-date { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }

/* Ad slots */
.ad-slot { background: var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; overflow: hidden; }
.ad-728x90 { width: 100%; height: 90px; }
.ad-300x250 { width: 100%; height: 250px; max-width: 300px; }
.ad-320x50 { width: 100%; height: 50px; }
.ad-in-content { width: 100%; height: 280px; margin: 24px 0; }

/* =============================
   PRICE TOOL PAGE
============================= */
.price-tool { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 32px; }
.price-tool-header { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.price-tool-header h1 { font-size: 1.5rem; }
.tab-group { display: flex; gap: 4px; background: var(--bg); border-radius: 8px; padding: 4px; }
.tab-btn { padding: 6px 18px; border-radius: 6px; border: none; background: transparent; cursor: pointer; font-weight: 600; font-size: 0.85rem; color: var(--text-muted); transition: all 0.2s; }
.tab-btn.active { background: var(--gold); color: #000; }
.select-group { display: flex; gap: 8px; flex-wrap: wrap; }
.price-select { padding: 7px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 0.85rem; }
.live-price-display { text-align: center; padding: 24px; background: linear-gradient(135deg, var(--primary), var(--accent)); border-radius: var(--radius); color: #fff; margin-bottom: 24px; }
.live-price-display .big-price { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 900; color: var(--gold); }
.live-price-display .price-change { font-size: 1rem; margin-top: 4px; }
.price-table-wrap { overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.price-table th { background: var(--primary); color: #fff; padding: 10px 14px; text-align: left; font-size: 0.82rem; text-transform: uppercase; }
.price-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.price-table tr:hover td { background: rgba(212,175,55,0.05); }

/* Calculator */
.calc-box { background: var(--bg); border-radius: var(--radius); padding: 24px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:600px){ .calc-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.form-group input, .form-group select { padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card); color: var(--text); font-size: 0.95rem; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #000; font-weight: 700; padding: 10px 28px; border-radius: 6px; border: none; cursor: pointer; font-size: 0.95rem; transition: opacity 0.2s; }
.btn-gold:hover { opacity: 0.9; }
.calc-result { background: linear-gradient(135deg, var(--primary), var(--accent)); border-radius: var(--radius); padding: 20px; text-align: center; color: #fff; margin-top: 16px; }
.calc-result .result-value { font-size: 2rem; font-weight: 800; color: var(--gold); }

/* =============================
   BREADCRUMBS
============================= */
.breadcrumbs { padding: 10px 0; font-size: 0.82rem; color: var(--text-muted); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs span { margin: 0 6px; }

/* =============================
   FOOTER
============================= */
#site-footer { background: var(--primary); color: rgba(255,255,255,0.8); margin-top: 48px; }
.footer-top { padding: 48px 0 32px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media(max-width:768px){ .footer-top { grid-template-columns: 1fr 1fr; } }
@media(max-width:480px){ .footer-top { grid-template-columns: 1fr; } }
.footer-brand .logo-text { font-size: 1.3rem; font-weight: 800; color: #fff; }
.footer-brand .logo-text span { color: var(--gold); }
.footer-brand p { font-size: 0.85rem; margin-top: 10px; color: rgba(255,255,255,0.55); line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: 0.9rem; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.55); font-size: 0.85rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: rgba(255,255,255,0.4); flex-wrap: wrap; gap: 8px; }
.footer-disclaimer { text-align: center; padding: 12px 0 0; font-size: 0.75rem; color: rgba(255,255,255,0.3); border-top: 1px solid rgba(255,255,255,0.07); margin-top: 8px; }

/* =============================
   PAGINATION
============================= */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 32px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 5px; border: 1px solid var(--border); font-size: 0.9rem; font-weight: 600; color: var(--text); transition: all 0.2s; }
.pagination a:hover, .pagination .current { background: var(--gold); color: #000; border-color: var(--gold); }

/* =============================
   MISC UTILITIES
============================= */
.badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.badge-gold { background: var(--gold); color: #000; }
.badge-live { background: #ef4444; color: #fff; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.7} }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.mt-0{margin-top:0} .mb-24{margin-bottom:24px} .mt-24{margin-top:24px}
.d-flex{display:flex} .align-center{align-items:center} .gap-8{gap:8px}

/* =============================
   LOADING SKELETON
============================= */
.skeleton { background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.05) 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* =============================
   SEARCH
============================= */
.search-form { display: flex; gap: 0; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.search-form input { flex: 1; padding: 10px 16px; border: none; background: var(--bg-card); color: var(--text); font-size: 0.9rem; outline: none; }
.search-form button { background: var(--gold); border: none; padding: 10px 16px; cursor: pointer; font-weight: 700; color: #000; }

/* =============================
   RESPONSIVE TWEAKS
============================= */
@media(max-width:480px){
  .price-cards { grid-template-columns: 1fr 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .card-featured { grid-template-columns: 1fr; }
}

/* =============================
   ACCESSIBILITY FIXES (v2)
============================= */

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  padding: 8px 16px;
  z-index: 10000;
  border-radius: 0 0 6px 0;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; color: #000; }

/* Focus visible outlines - WCAG 2.1 AA */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}
a:focus-visible { outline: 3px solid var(--gold-dark); }
button:focus-visible { outline: 3px solid var(--gold); }

/* Color contrast fixes - WCAG AA requires 4.5:1 ratio */
/* --text-muted was #6b7280 (3.0:1 on white) — raised to #595f6a */
:root {
  --text-muted: #595f6a;      /* 4.6:1 contrast on white */
}
[data-theme="dark"] {
  --text-muted: #9ca3af;      /* 4.7:1 on dark bg */
}

/* Card excerpt text — was using var(--text-muted) with small font — boost */
.card-excerpt { color: #4b5563; font-size: 0.9rem; }
[data-theme="dark"] .card-excerpt { color: #9ca3af; }

/* Category labels — gold on white = poor contrast, use gold-dark */
.card-cat { color: #8a6d00; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
[data-theme="dark"] .card-cat { color: #e2b714; }

/* Muted text on dark header backgrounds */
.post-meta-bar { color: rgba(255,255,255,0.75); }  /* raised from 0.6 */
.post-header h1 { color: #ffffff; }

/* Ticker text contrast */
.ticker-item { color: #d1d5db; font-size: 0.82rem; display: flex; align-items: center; gap: 8px; white-space: nowrap; padding: 0 12px; }
.ticker-item .price { color: #ffffff; font-weight: 700; }
.ticker-item .up   { color: #4ade80; font-weight: 700; }
.ticker-item .down { color: #f87171; font-weight: 700; }
.ticker-lbl  { color: #9ca3af; font-size: 0.75rem; margin-right: 4px; }

/* =============================
   TICKER REWRITE (v2)
   JS dynamically fills #headerTicker
   Animation is reset by JS after inject
============================= */
.ticker-badge {
  background: #ef4444;
  color: #fff;
  font-weight: 800;
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  animation: livepulse 2s infinite;
  flex-shrink: 0;
}
@keyframes livepulse { 0%,100%{opacity:1} 50%{opacity:.65} }

/* Ticker animation — controlled by JS reset trick */
.ticker-inner {
  display: inline-flex;
  gap: 0;
  animation: gsn-ticker 45s linear infinite;
  white-space: nowrap;
  will-change: transform;
}
@keyframes gsn-ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}
.ticker-inner:hover { animation-play-state: paused; }

/* =============================
   HAMBURGER — proper bars style
============================= */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}
@media(max-width: 768px) {
  .hamburger { display: flex; }
}

/* =============================
   HOMEPAGE SECTIONS (front-page.php)
============================= */
.price-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.price-hero-title {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-hero-sub { color: rgba(255,255,255,0.55); font-size: 0.82rem; margin: 0; }
.price-disclaimer { text-align: center; margin-top: 12px; font-size: 0.72rem; color: rgba(255,255,255,0.35); }

/* Gold CTA box */
.gold-cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 48px;
  text-align: center;
}
.gold-cta-title { color: #fff; font-size: 1.4rem; margin-bottom: 8px; }
.gold-cta-sub   { color: rgba(255,255,255,0.65); font-size: 0.9rem; margin-bottom: 20px; }
.gold-cta-prices {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.cta-price-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: var(--radius);
  padding: 16px 28px;
  min-width: 180px;
}
.cta-metal { color: rgba(255,255,255,0.65); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.cta-val   { color: var(--gold); font-size: 1.7rem; font-weight: 800; }
.cta-silver { color: var(--silver) !important; }
.cta-btn   { display: inline-block; padding: 12px 32px; border-radius: 6px; font-weight: 700; font-size: 1rem; text-decoration: none; color: #000; }

/* Horizontal card */
.card-horizontal {
  display: flex;
  flex-direction: row;
  gap: 0;
  min-height: 90px;
}
.card-img-sm {
  width: 120px;
  min-height: 90px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--radius) 0 0 var(--radius);
}
.card-img-sm img { width: 100%; height: 100%; object-fit: cover; }

/* =============================
   FORM ACCESSIBILITY FIXES
   - All inputs need associated labels
============================= */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);   /* was using --text-muted → fails contrast */
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.2);
}

/* =============================
   AD WRAP
============================= */
.ad-wrap { text-align: center; padding: 12px 0; }
.ad-header { padding: 8px 0; background: var(--bg); }

/* =============================
   PRICE CARD — contrast fix
   metal-name was rgba(255,255,255,0.7) on dark bg — OK
   but on light bg fallback it was invisible
============================= */
.price-card .metal-name { color: rgba(255,255,255,0.85); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; font-weight: 600; }
.price-card .metal-price { font-size: 1.8rem; font-weight: 800; color: var(--gold); }
.price-card .metal-unit  { color: rgba(255,255,255,0.55); font-size: 0.72rem; }
.price-card .metal-change.up   { color: #4ade80; font-weight: 700; font-size: 0.85rem; margin-top: 6px; }
.price-card .metal-change.down { color: #f87171; font-weight: 700; font-size: 0.85rem; margin-top: 6px; }
.price-card .metal-change { font-size: 0.85rem; margin-top: 6px; }

/* =============================
   HEADER SCROLLED STATE
============================= */
#site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.45); }

/* =============================
   PRICE LOADING PLACEHOLDER
============================= */
.price-loading {
  display: inline-block;
  color: rgba(255,255,255,0.4);
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:0.4} 50%{opacity:1} }

/* =============================
   RESPONSIVE TWEAKS v2
============================= */
@media(max-width: 600px) {
  .price-cards { grid-template-columns: 1fr 1fr; }
  .gold-cta-prices { flex-direction: column; align-items: center; }
  .card-horizontal { flex-direction: column; }
  .card-img-sm { width: 100%; height: 140px; border-radius: var(--radius) var(--radius) 0 0; }
}
@media(max-width: 400px) {
  .price-cards { grid-template-columns: 1fr; }
}
