/* ================================================================
   style.css — Gold Rate Today  (Homepage styles only)
   Navbar styles are in css/navbar.css
================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:       #0A0A0A;
  --black2:      #111111;
  --gray3:       #777777;
  --gold:        #B8972A;
  --up:          #2E7D52;
  --down:        #C0392B;
  --border:      rgba(0,0,0,0.10);
  --page-bg:     #FFFFFF;
  --surface:     #F7F7F7;
  --text:        #111111;
  --text-muted:  #555555;
  --text-dim:    #888888;
  --white:       #FFFFFF;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: Calibri, 'Segoe UI', Arial, sans-serif;
  background: var(--page-bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── PAGE WRAPPER ─────────────────────────────────────── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px 0;
}

/* ── CHART CARD ───────────────────────────────────────── */
.chart-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 16px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.chart-header-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}
.price-main {
  font-family: Calibri, sans-serif;
  font-size: 44px; font-weight: 300;
  color: var(--black);
  line-height: 1.0;
  letter-spacing: -0.5px;
}
.price-meta {
  display: flex; align-items: center; gap: 10px;
  margin-top: 6px; flex-wrap: wrap;
}
.price-change {
  font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
}
.price-change.up   { background: rgba(46,125,82,0.12); color: #2E7D52; border: 1px solid rgba(46,125,82,0.25); }
.price-change.down { background: rgba(192,57,43,0.10); color: #C0392B; border: 1px solid rgba(192,57,43,0.25); }
.price-timestamp   { font-size: 11px; color: var(--text-dim); }

.location-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid #E0E0E0;
  border-radius: 8px; padding: 5px 12px;
  font-size: 12px; color: var(--text-muted); margin-top: 10px;
}
.location-badge svg { color: var(--gold); }

/* Tabs */
.tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid #E8E8E8;
  margin-top: 20px;
}
.tab {
  background: none; border: none; cursor: pointer;
  font-family: Calibri, sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em;
  color: #AAA; padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  position: relative; transition: color 0.2s;
  text-transform: uppercase;
}
.tab::after {
  content: ''; position: absolute;
  bottom: -1px; left: 0; right: 0; height: 2px;
  background: var(--black); border-radius: 2px;
  opacity: 0; transition: opacity 0.2s;
}
.tab:hover { color: var(--text-muted); }
.tab.active { color: var(--black); }
.tab.active::after { opacity: 1; }

/* Chart Canvas */
.chart-wrap {
  position: relative; margin-top: 18px;
  height: 220px; user-select: none;
  background: var(--white);
}
canvas#goldChart { display: block; width: 100%; height: 100%; cursor: crosshair; }

.tooltip {
  position: absolute; top: 0; left: 0;
  background: var(--black2); border: 1px solid rgba(0,0,0,0.15);
  color: var(--white); font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 8px;
  pointer-events: none; display: none;
  white-space: nowrap; z-index: 10;
  transform: translate(-50%, -115%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.tooltip b { font-size: 13px; }
.crosshair {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: rgba(0,0,0,0.25); pointer-events: none; display: none;
}
.x-labels { display: flex; justify-content: space-between; padding: 6px 0 0; }
.x-label  { font-size: 10px; color: var(--text-dim); letter-spacing: 0.03em; }

.chart-card-footer {
  border-top: 1px solid #EEEEEE;
  margin-top: 16px; padding-top: 10px;
  font-size: 11px; color: #AAA;
  display: flex; justify-content: space-between; align-items: center;
}
.chart-card-footer a { color: var(--gold); text-decoration: none; }
.chart-card-footer a:hover { text-decoration: underline; }

/* ── SECTION HEADINGS ─────────────────────────────────── */
.section-heading {
  font-family: Calibri, sans-serif;
  font-size: 28px; font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}
.section-heading span { color: var(--gold); font-style: italic; }
.section-sub {
  font-size: 13px; color: var(--text-dim);
  margin-bottom: 20px; letter-spacing: 0.03em;
}

/* ── GOLD PRICE TABLE ─────────────────────────────────── */
.table-section { margin-bottom: 48px; }

.gold-table-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.gold-table {
  width: 100%; border-collapse: collapse;
  min-width: 420px;
}
.gold-table thead tr {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.gold-table thead th {
  padding: 14px 20px;
  font-family: Calibri, sans-serif;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--text-muted); text-align: left;
  white-space: nowrap;
}
.gold-table thead th:not(:first-child) { text-align: right; }
.gold-table tbody tr {
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: background 0.15s;
}
.gold-table tbody tr:last-child { border-bottom: none; }
.gold-table tbody tr:hover { background: var(--surface); }
.gold-table td {
  padding: 15px 20px;
  font-family: Calibri, sans-serif;
  font-size: 15px; color: var(--text-muted);
  text-align: right; white-space: nowrap;
}
.gold-table td:first-child { text-align: left; font-weight: 700; }

.td-up   { color: var(--up)   !important; }
.td-down { color: var(--down) !important; }

.change-badge {
  display: inline-flex; flex-direction: column;
  align-items: flex-end; gap: 2px;
}
.change-num { font-weight: 700; font-size: 15px; }
.change-pct { font-size: 11px; opacity: 0.8; }

/* ── LATEST NEWS ──────────────────────────────────────── */
.news-section { margin-bottom: 56px; }

.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.news-card {
  display: flex;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.2s;
  background: var(--white);
}
.news-card:nth-child(odd)    { border-right: 1px solid var(--border); }
.news-card:nth-last-child(1),
.news-card:nth-last-child(2) { border-bottom: none; }
.news-card:hover             { background: var(--surface); }

.news-img-wrap {
  flex-shrink: 0;
  width: 130px; height: 96px;
  overflow: hidden;
}
.news-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-body {
  padding: 14px 18px; flex: 1;
  display: flex; flex-direction: column;
  justify-content: space-between;
}
.news-cat {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--gold); margin-bottom: 5px;
}
.news-title {
  font-family: Calibri, sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--text); line-height: 1.35;
}
.news-card:hover .news-title { color: var(--gold); }
.news-meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 8px; font-size: 11px; color: var(--text-dim);
}
.news-meta svg    { width: 13px; height: 13px; flex-shrink: 0; }
.news-comments    { display: flex; align-items: center; gap: 4px; }

/* ── PAGINATION ───────────────────────────────────────── */
.pagination-wrap {
  display: flex; justify-content: center;
  align-items: center; gap: 5px;
  padding: 36px 0 56px;
  flex-wrap: wrap;
}
.pg-btn {
  min-width: 38px; height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  font-family: Calibri, sans-serif;
  font-size: 14px; font-weight: 600;
  border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.pg-btn:hover    { background: var(--surface); color: var(--text); border-color: var(--gray3); }
.pg-btn.active   { background: var(--black); color: var(--white); border-color: var(--black); font-weight: 700; }
.pg-btn.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.pg-ellipsis {
  min-width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 15px;
}

/* ── ARTICLE / EDITORIAL CONTENT ─────────────────────── */
.content-section {
  margin-bottom: 48px;
  border-top: 2px solid #EEEEEE;
  padding-top: 40px;
}
.content-section h2 {
  font-family: Calibri, sans-serif;
  font-size: 20px; font-weight: 700;
  color: var(--black);
  margin: 36px 0 0;
  line-height: 1.35;
  /* ── H2 background strip ── */
  background: #F2F2F2;
  border-left: 4px solid var(--black);
  padding: 12px 18px;
  border-radius: 0 8px 8px 0;
  display: block;
}
.content-section h2:first-of-type { margin-top: 0; }

/* Paragraph sits directly under its H2 with slight indent */
.content-section p {
  font-family: Calibri, sans-serif;
  font-size: 16px;
  color: #333333;
  line-height: 1.88;
  margin-top: 14px;
  margin-bottom: 0;
  padding: 0 4px;
  text-align: justify;
}
.content-section p + p   { margin-top: 12px; }
.content-section h2 + p  { margin-top: 14px; }
.content-section strong  { color: var(--black); font-weight: 700; }
.content-section em      { color: var(--gold);  font-style: normal; font-weight: 600; }

.content-highlight-box {
  background: #FFFBF0;
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 22px 0;
}
.content-highlight-box p {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 15px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── FAQ SECTION ──────────────────────────────────────── */
.faq-section {
  margin-bottom: 60px;
  border-top: 2px solid #EEEEEE;
  padding-top: 40px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}

.faq-item {
  border-radius: 10px;
  border: 1px solid #E2E2E2;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
  background: var(--white);
}
.faq-item:hover {
  border-color: #C8C8C8;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.faq-item.faq-open {
  border-color: var(--black);
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

/* Question button */
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  background: #F5F5F5;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s;
}
.faq-item.faq-open .faq-question {
  background: var(--black);
}
.faq-question:hover {
  background: #EBEBEB;
}
.faq-item.faq-open .faq-question:hover {
  background: #1A1A1A;
}

/* H3 inside the button */
.faq-question h3 {
  font-family: Calibri, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
  margin: 0;
  padding: 16px 20px;
  flex: 1;
  letter-spacing: 0.01em;
}
.faq-item.faq-open .faq-question h3 {
  color: var(--white);
}

/* Plus/minus icon */
.faq-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid #BBBBBB;
  margin-right: 18px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: border-color 0.2s, background 0.2s, transform 0.25s;
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: #555555;
  border-radius: 2px;
  transition: background 0.2s, transform 0.25s, opacity 0.2s;
}
/* Horizontal bar */
.faq-icon::before {
  width: 12px; height: 2px;
}
/* Vertical bar (becomes hidden when open) */
.faq-icon::after {
  width: 2px; height: 12px;
}

/* Open state icon → becomes × */
.faq-item.faq-open .faq-icon {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.12);
  transform: rotate(45deg);
}
.faq-item.faq-open .faq-icon::before,
.faq-item.faq-open .faq-icon::after {
  background: var(--white);
}

/* Answer panel */
.faq-answer {
  display: none;
  padding: 18px 22px 20px;
  background: #FAFAFA;
  border-top: 1px solid #E8E8E8;
}
.faq-item.faq-open .faq-answer {
  display: block;
  animation: fadeSlide 0.22s ease;
}
.faq-answer p {
  font-family: Calibri, sans-serif;
  font-size: 15px;
  color: #3A3A3A;
  line-height: 1.82;
  margin: 0;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── FAQ Responsive ───────────────────────────────────── */
@media (max-width: 600px) {
  .faq-question h3 { font-size: 14px; padding: 14px 14px; }
  .faq-icon        { margin-right: 14px; }
  .faq-answer      { padding: 14px 16px 16px; }
  .faq-answer p    { font-size: 14px; }
  .content-section h2 { font-size: 17px; padding: 10px 14px; }
  .content-section p  { font-size: 14px; line-height: 1.75; }
}

/* ── FOOTER ───────────────────────────────────────────── */
.site-footer {
  background: #111111;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-main {
  max-width: 1200px; margin: 0 auto;
  padding: 64px 32px 48px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-bottom: 16px;
}
/* Icon: white background, gold ₹ — mirrors navbar but inverted for dark bg */
.footer-logo-icon {
  width: 38px; height: 38px;
  background: #FFFFFF;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: Calibri, sans-serif;
  font-size: 20px; font-weight: 700;
  color: #B8972A;
  flex-shrink: 0;
  line-height: 1;
}
/* Text: white, with gold accent on "Rate" */
.footer-logo-text {
  font-family: Calibri, sans-serif;
  font-size: 22px; font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
}
.footer-logo-text span { color: #B8972A; }
.footer-desc {
  font-size: 13px; line-height: 1.8;
  color: #999; max-width: 280px; margin-bottom: 24px;
}
.footer-socials { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #999; font-size: 13px; text-decoration: none;
  transition: all 0.2s;
}
.social-btn:hover { background: var(--white); color: var(--black); border-color: var(--white); }

.footer-col h4 {
  font-family: Calibri, sans-serif;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--white); margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 11px; }
.footer-col ul li a {
  font-family: Calibri, sans-serif;
  font-size: 13px; color: #999;
  text-decoration: none; transition: color 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.footer-col ul li a:hover { color: var(--white); }
.footer-col ul li a::before {
  content: ''; width: 4px; height: 4px;
  border-radius: 50%; background: var(--gold);
  flex-shrink: 0; opacity: 0.6;
}
.footer-col ul li a:hover::before { opacity: 1; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: 1200px; margin: 0 auto;
  padding: 20px 32px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 12px; color: #777; letter-spacing: 0.03em; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a {
  font-size: 12px; color: #777;
  text-decoration: none; transition: color 0.2s;
}
.footer-bottom-links a:hover { color: var(--white); }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
  .page-wrap { padding: 24px 20px 0; }

  .news-grid { grid-template-columns: 1fr; }
  .news-card:nth-child(odd) { border-right: none; }
  .news-card:nth-last-child(2) { border-bottom: 1px solid var(--border); }

  .footer-main { grid-template-columns: 1fr 1fr; }

  .content-section h2 { font-size: 18px; }
  .content-section p  { font-size: 15px; }
  .faq-section        { padding-top: 32px; }
}

@media (max-width: 600px) {
  .page-wrap { padding: 18px 14px 0; }

  /* Chart */
  .chart-card  { padding: 18px 14px 12px; }
  .price-main  { font-size: 32px; }
  .chart-wrap  { height: 170px; }

  /* Table — smaller font so all columns fit */
  .gold-table thead th { font-size: 10px; padding: 10px 10px; letter-spacing: 0.04em; }
  .gold-table td       { font-size: 12px; padding: 11px 10px; }
  .change-num          { font-size: 12px; }
  .change-pct          { font-size: 10px; }

  /* News */
  .news-img-wrap { width: 90px; height: 82px; }
  .news-title    { font-size: 14px; }
  .news-body     { padding: 10px 12px; }

  /* Section headings */
  .section-heading { font-size: 22px; }

  /* Pagination */
  .pg-btn { min-width: 32px; height: 32px; font-size: 13px; }

  /* Footer */
  .footer-main   { grid-template-columns: 1fr; padding: 36px 18px 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; padding: 14px 18px; }
}
