/* ============================================================
   PriceGold.in — Main Stylesheet
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --gold-primary:   #c8960c;
  --gold-light:     #f7e9b0;
  --gold-dark:      #8a6500;
  --gold-gradient:  linear-gradient(135deg, #f6c90e 0%, #c8960c 60%, #8a6500 100%);
  --gold-gradient2: linear-gradient(135deg, #fff3c0 0%, #ffe87a 100%);

  --silver-primary: #7b8fa3;
  --silver-light:   #e8edf2;
  --silver-dark:    #3c4f60;
  --silver-gradient: linear-gradient(135deg, #d0dce6 0%, #8fa5ba 60%, #4a6175 100%);

  --green:   #16a34a;
  --red:     #dc2626;
  --green-bg:#dcfce7;
  --red-bg:  #fee2e2;

  --bg-main: #f4f6f9;
  --bg-white: #ffffff;
  --text-dark: #1a1a2e;
  --text-mid:  #444466;
  --text-light: #6b7280;
  --border:    #e2e8f0;

  --radius:    10px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.13);

  --font: 'Inter', sans-serif;
  --header-h: 64px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, select { font-family: var(--font); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.mt-2 { margin-top: 2rem; }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  background: #1a1a2e;
  color: #aab4c8;
  font-size: 0.78rem;
  padding: 6px 0;
  border-bottom: 1px solid #2d2d4e;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar i { margin-right: 4px; color: var(--gold-primary); }
.topbar-right { color: #aab4c8; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: #fff;
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.09);
  border-bottom: 3px solid var(--gold-primary);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--text-dark);
}
.logo-icon {
  background: var(--gold-gradient);
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(200,150,12,0.35);
}
.logo-text { letter-spacing: -0.5px; }
.logo-dot { color: var(--gold-primary); }

/* Nav */
.main-nav { display: flex; gap: 6px; }
.main-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: all 0.2s;
}
.main-nav a:hover {
  background: var(--gold-light);
  color: var(--gold-dark);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ============================================================
   CITY BANNER
   ============================================================ */
.city-banner {
  background: linear-gradient(90deg, #1a1a2e 0%, #2d2d50 100%);
  padding: 10px 0;
  border-bottom: 2px solid var(--gold-primary);
}
.city-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.city-banner i { color: var(--gold-primary); }
.city-banner span { color: #d0d8e8; font-size: 0.9rem; }
.city-select {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(200,150,12,0.5);
  border-radius: 8px;
  padding: 6px 32px 6px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M6 8L0 0h12z' fill='%23c8960c'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.2s;
}
.city-select option { background: #1a1a2e; color: #fff; }
.city-note {
  font-size: 0.78rem;
  color: #8892a4;
  margin-left: auto;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  background: linear-gradient(160deg, #1a1a2e 0%, #2d2d50 50%, #1a1a40 100%);
  padding: 48px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(200,150,12,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.page-title {
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.page-title span { color: var(--gold-primary); }
.page-subtitle {
  color: #8892a4;
  font-size: 0.95rem;
  margin-bottom: 32px;
}

/* Hero Cards */
.hero-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.price-card {
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s;
}
.price-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 48px rgba(0,0,0,0.22);
}

.gold-card { background: var(--gold-gradient); }
.secondary-gold { background: linear-gradient(135deg, #ffd85c 0%, #c8960c 60%, #7a5a00 100%); }
.tertiary-gold   { background: linear-gradient(135deg, #e8c870 0%, #b08020 60%, #6a4800 100%); }
.silver-card { background: var(--silver-gradient); }

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.metal-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.gold-icon { background: rgba(255,255,255,0.25); color: #fff; }
.silver-icon { background: rgba(255,255,255,0.25); color: #fff; }

.metal-label { color: #fff; font-weight: 700; font-size: 1rem; }
.metal-sub   { color: rgba(255,255,255,0.75); font-size: 0.72rem; }

.card-price {
  color: #fff;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.card-change {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255,255,255,0.22);
  border-radius: 20px;
  padding: 3px 10px;
  color: #fff;
}
.card-note {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
  margin-top: 6px;
}

.disclaimer-note {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.rates-section, .trend-section, .calculator-section,
.city-comparison-section, .info-section, .faq-section {
  padding: 56px 0;
}
.rates-section { background: var(--bg-white); }
.trend-section  { background: var(--bg-main); }
.calculator-section { background: #1a1a2e; }
.city-comparison-section { background: var(--bg-white); }
.info-section   { background: var(--bg-main); }
.faq-section    { background: var(--bg-white); }
.silver-section { background: #f8fafc; }

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-header h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-dark);
}
.gold-text   { color: var(--gold-primary); }
.silver-text { color: var(--silver-primary); }
.city-inline { color: var(--gold-primary); }

.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-live {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.badge-live .fa-circle { font-size: 0.5rem; }
.pulse {
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================================
   RATE BLOCK & TABLES
   ============================================================ */
.rate-block { margin-bottom: 36px; }
.rate-block:last-child { margin-bottom: 0; }
.rate-block-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 4px solid var(--gold-primary);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.rate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #fff;
}
.rate-table thead tr {
  background: linear-gradient(90deg, #1a1a2e 0%, #2d2d50 100%);
  color: #d0d8e8;
}
.rate-table thead th {
  padding: 13px 18px;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.rate-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.rate-table tbody tr:hover { background: #fafbfc; }
.rate-table tbody tr:last-child { border-bottom: none; }
.rate-table tbody td {
  padding: 13px 18px;
  font-weight: 500;
  white-space: nowrap;
}
.rate-table tbody td:first-child { color: var(--text-mid); }
.rate-table .price-cell { font-weight: 700; color: var(--text-dark); }
.rate-table .positive { color: var(--green); font-weight: 600; }
.rate-table .negative { color: var(--red); font-weight: 600; }
.rate-table .neutral  { color: var(--text-light); font-weight: 500; }
.stripe-row { background: #fafbfc; }

/* ============================================================
   TREND SECTION
   ============================================================ */
.trend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.trend-table-wrap, .trend-chart-wrap {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.sub-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold-light);
}
.trend-table tbody td { padding: 10px 14px; }

/* ============================================================
   CALCULATOR
   ============================================================ */
.calculator-section .section-header h2 { color: #fff; }
.calculator-section .section-header i  { color: var(--gold-primary); }

.calc-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(200,150,12,0.3);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 760px;
  margin: 0 auto;
}
.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.calc-field label {
  display: block;
  color: #a0aec0;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.calc-select, .calc-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: rgba(255,255,255,0.09);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.calc-select:focus, .calc-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(200,150,12,0.2);
}
.calc-select option { background: #1a1a2e; color: #fff; }
.calc-input::placeholder { color: rgba(255,255,255,0.35); }

.calc-btn {
  background: var(--gold-gradient);
  color: #1a1a2e;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(200,150,12,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,150,12,0.5);
}
.calc-btn:active { transform: translateY(0); }

.calc-result {
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  color: #d0d8e8;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.total-row {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold-primary);
  border-bottom: none;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 2px solid rgba(200,150,12,0.3);
}
.total-row span:last-child { color: #f6c90e; }

/* ============================================================
   CITY COMPARISON
   ============================================================ */
.comparison-table tbody td { font-size: 0.9rem; }
.city-col { font-weight: 700; color: var(--text-dark) !important; }
.highlight-row {
  background: var(--gold-light) !important;
}

/* ============================================================
   INFO CARDS
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.info-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.info-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.info-icon {
  width: 48px; height: 48px;
  background: var(--gold-light);
  color: var(--gold-dark);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.info-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}
.info-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.65;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;
  transition: background 0.15s, color 0.15s;
}
.faq-question:hover { background: #f8f9fa; color: var(--gold-dark); }
.faq-question.active {
  background: var(--gold-light);
  color: var(--gold-dark);
}
.faq-icon {
  font-size: 0.8rem;
  color: var(--text-light);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.faq-question.active .faq-icon { transform: rotate(180deg); color: var(--gold-dark); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-answer.open {
  max-height: 300px;
  padding: 0 20px 18px;
}
.faq-answer p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0f0f1f;
  color: #8892a4;
  padding: 56px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 36px;
  padding-bottom: 48px;
}
.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}
.footer-logo i { color: var(--gold-primary); margin-right: 6px; }
.footer-logo span { color: var(--gold-primary); }
.footer-col p { font-size: 0.85rem; line-height: 1.7; }
.footer-col h4 {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: #8892a4;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold-primary); }
.footer-disclaimer {
  font-size: 0.8rem;
  line-height: 1.65;
  color: #6b7280;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.social-links a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  color: #aab4c8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}
.social-links a:hover {
  background: var(--gold-primary);
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 16px 0;
  font-size: 0.8rem;
  color: #4a5568;
  text-align: center;
}
.footer-bottom a { color: #6b7280; transition: color 0.2s; }
.footer-bottom a:hover { color: var(--gold-primary); }

/* ============================================================
   CHART CONTAINERS
   ============================================================ */
.trend-chart-wrap canvas { border-radius: 8px; }

/* ============================================================
   TICKER BAR
   ============================================================ */
.ticker-bar {
  background: #0f0f1f;
  overflow: hidden;
  white-space: nowrap;
  padding: 8px 0;
  border-bottom: 1px solid rgba(200,150,12,0.25);
}
.ticker-track {
  display: inline-block;
  animation: tickerScroll 40s linear infinite;
  color: #c8960c;
  font-size: 0.82rem;
  font-weight: 500;
  padding-left: 100%;
}
.ticker-track span { margin: 0 6px; }
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.ticker-bar:hover .ticker-track { animation-play-state: paused; }

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
#scrollTopBtn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px; height: 46px;
  background: var(--gold-gradient);
  color: #1a1a2e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(200,150,12,0.45);
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
}
#scrollTopBtn.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .hero-cards { grid-template-columns: repeat(2, 1fr); }
  .info-grid   { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .trend-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .page-title { font-size: 1.5rem; }
  .card-price  { font-size: 1.5rem; }

  /* Mobile Nav */
  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 99;
    border-top: 2px solid var(--gold-primary);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 16px; font-size: 1rem; }
  .hamburger { display: flex; }

  .hero-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .info-grid   { grid-template-columns: 1fr; }
  .calc-grid   { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .topbar-right { display: none; }
  .city-note { display: none; }
}

@media (max-width: 480px) {
  .hero-cards { grid-template-columns: 1fr; }
  .price-card { padding: 18px 16px; }
  .rate-table thead th, .rate-table tbody td { padding: 10px 12px; font-size: 0.82rem; }
  .section-header h2 { font-size: 1.2rem; }
}
