/* ==============================================
   Roz Ka Bhav – Stylesheet v2.4 (Professional Light)
   ============================================== */

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

:root {
    --rkb-green:      #16a34a;
    --rkb-green-lt:   #22c55e;
    --rkb-green-dk:   #14532d;
    --rkb-green-xs:   #dcfce7;
    --rkb-green-bg:   #f0fdf4;
    --rkb-card:       #ffffff;
    --rkb-card-alt:   #f8fafc;
    --rkb-border:     rgba(22,163,74,.15);
    --rkb-border-hl:  rgba(22,163,74,.35);
    --rkb-red:        #dc2626;
    --rkb-amber:      #d97706;
    --rkb-text:       #111827;
    --rkb-text-2:     #374151;
    --rkb-text-muted: #6b7280;
    --rkb-text-dim:   #9ca3af;
    --rkb-shadow:     0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
    --rkb-shadow-lg:  0 2px 8px rgba(0,0,0,.06), 0 8px 28px rgba(0,0,0,.08);
    --rkb-font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --rkb-radius:     14px;
}

/* ── Card ── */
.hg-card {
    font-family: var(--rkb-font);
    background: var(--rkb-card);
    border: 1px solid rgba(0,0,0,.08);
    border-top: 3px solid var(--rkb-green);
    border-radius: var(--rkb-radius);
    padding: 24px;
    margin: 20px 0;
    color: var(--rkb-text);
    box-shadow: var(--rkb-shadow);
    overflow: hidden;
    position: relative;
}
.hg-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: linear-gradient(135deg, var(--rkb-green-bg) 0%, #ffffff 100%);
    pointer-events: none;
    z-index: 0;
}
.hg-card > * { position: relative; z-index: 1; }

/* ── Card Header ── */
.hg-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,.07);
}
.hg-card-icon, .hg-city-icon { font-size: 1.8rem; line-height: 1; }
.hg-card-header h2,
.hg-card-header h3 { margin: 0 0 3px; font-size: 1.15rem; font-weight: 700; color: var(--rkb-text); line-height: 1.3; }
.hg-subtitle { margin: 0; font-size: .78rem; color: var(--rkb-text-muted); font-weight: 500; }

/* ── 4-column City Grid ── */
.hg-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.hg-mini-card {
    background: var(--rkb-card-alt);
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 10px;
    padding: 14px 13px;
}
.hg-mini-icon { font-size: 1.3rem; margin-bottom: 5px; }
.hg-mini-card h4 { margin: 0 0 9px; font-size: .75rem; color: var(--rkb-green-dk); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.hg-row-item { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px solid rgba(0,0,0,.05); font-size: .78rem; }
.hg-row-item:last-child { border-bottom: none; }
.hg-row-item span { color: var(--rkb-text-muted); }
.hg-row-item strong { color: var(--rkb-green-dk); font-weight: 700; }

/* ── Fuel Grid ── */
.hg-fuel-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 12px 0; }
.hg-fuel-item { text-align: center; padding: 18px 10px; border-radius: 10px; border: 1px solid; }
.hg-petrol { background: #fff5f5; border-color: #fca5a5; }
.hg-diesel { background: #fffbeb; border-color: #fcd34d; }
.hg-cng    { background: var(--rkb-green-bg); border-color: #86efac; }
.hg-fuel-label { font-size: .72rem; font-weight: 700; color: var(--rkb-text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.hg-fuel-price { font-size: 1.5rem; font-weight: 800; color: var(--rkb-text); letter-spacing: -.03em; }
.hg-fuel-unit  { font-size: .66rem; color: var(--rkb-text-dim); margin-top: 3px; }

/* ── Metals Grid ── */
.hg-metals-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 12px 0; }
.hg-metal-item { text-align: center; padding: 18px 10px; border-radius: 10px; border: 1px solid; }
.hg-gold22 { background: #fffbeb; border-color: #fcd34d; }
.hg-gold24 { background: #fff7ed; border-color: #fdba74; }
.hg-silver { background: #f8fafc; border-color: #cbd5e1; }
.hg-metal-karat { font-size: .76rem; font-weight: 700; color: #92400e; margin-bottom: 6px; }
.hg-gold24 .hg-metal-karat { color: #c2410c; }
.hg-silver .hg-metal-karat { color: var(--rkb-text-muted); }
.hg-metal-price { font-size: 1.3rem; font-weight: 800; color: var(--rkb-text); letter-spacing: -.03em; }
.hg-metal-unit  { font-size: .66rem; color: var(--rkb-text-dim); margin-top: 3px; }

/* ── Tables ── */
.hg-table-wrap { overflow-x: auto; }
.hg-scrollable { max-height: 480px; overflow-y: auto; }
.hg-price-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.hg-price-table thead { position: sticky; top: 0; z-index: 2; }
.hg-price-table th {
    background: var(--rkb-green-bg);
    color: var(--rkb-green-dk);
    padding: 9px 13px;
    text-align: left;
    font-weight: 700;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 2px solid var(--rkb-border-hl);
}
.hg-price-table td {
    padding: 8px 13px;
    border-bottom: 1px solid rgba(0,0,0,.05);
    color: var(--rkb-text-2);
}
.hg-price-table tr:hover td { background: var(--rkb-green-bg); }
.hg-price-table tr:last-child td { border-bottom: none; }
.hg-price-table strong { color: var(--rkb-green-dk); font-weight: 700; }
.hg-cell-best { background: #dcfce7 !important; color: var(--rkb-green-dk) !important; font-weight: 700 !important; }

/* ── Badges ── */
.hg-badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.hg-badge-low  { background: #dcfce7; color: #15803d; }
.hg-badge-mid  { background: #fef9c3; color: #854d0e; }
.hg-badge-high { background: #fee2e2; color: #991b1b; }

/* ── Progress bars ── */
.hg-bar-wrap { background: #f1f5f9; border-radius: 20px; height: 7px; overflow: hidden; min-width: 70px; }
.hg-bar-fill { height: 100%; border-radius: 20px; transition: width .3s; }

/* ── Stat Row ── */
.hg-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 16px 0 12px; }
.hg-stat { text-align: center; padding: 14px 10px; border-radius: 10px; border: 1px solid; }
.hg-stat-low  { background: #f0fdf4; border-color: #86efac; }
.hg-stat-mid  { background: #f0fdf4; border-color: var(--rkb-border); }
.hg-stat-high { background: #fff5f5; border-color: #fca5a5; }
.hg-stat-label { font-size: .66rem; color: var(--rkb-text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.hg-stat-name  { font-size: .8rem; color: var(--rkb-text-2); font-weight: 600; margin-bottom: 3px; }
.hg-stat-val   { font-size: 1.2rem; font-weight: 800; color: var(--rkb-green-dk); }

/* ── Chart Container ── */
.hg-chart-wrap {
    background: #fafafa;
    border-radius: 10px;
    padding: 14px;
    margin: 12px 0;
    border: 1px solid rgba(0,0,0,.07);
}

/* ── Highlights ── */
.hg-highlights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
.hg-highlight-col { flex: 1; }
.hg-highlight-heading { font-size: .82rem; font-weight: 700; margin: 0 0 9px; padding: 7px 12px; border-radius: 8px; }
.hg-highlight-heading.hg-cheap  { background: #dcfce7; color: #15803d; }
.hg-highlight-heading.hg-costly { background: #fee2e2; color: #991b1b; }
.hg-highlight-list { list-style: none; margin: 0; padding: 0; }
.hg-highlight-list li { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid rgba(0,0,0,.05); font-size: .8rem; }
.hg-highlight-list li:last-child { border-bottom: none; }
.hg-hl-rank   { width: 20px; height: 20px; border-radius: 50%; background: var(--rkb-green-bg); color: var(--rkb-green-dk); font-size: .66rem; font-weight: 700; display:flex; align-items:center; justify-content:center; flex-shrink: 0; border: 1px solid var(--rkb-border-hl); }
.hg-hl-city   { flex: 1; color: var(--rkb-text-2); }
.hg-hl-price  { font-weight: 800; font-size: .9rem; }
.hg-price-low  { color: var(--rkb-green); }
.hg-price-high { color: var(--rkb-red); }

/* ── India Map Scale ── */
.hg-legend-wrap { display: flex; align-items: center; gap: 10px; margin: 12px 0; font-size: .72rem; font-weight: 600; }
.hg-gradient-bar { flex: 1; height: 11px; border-radius: 20px; background: linear-gradient(to right, #15803d, #22c55e, #86efac, #fbbf24, #ef4444); border: 1px solid rgba(0,0,0,.08); }
.hg-gradient-bar-green { flex: 1; height: 11px; border-radius: 20px; background: linear-gradient(to right, #dcfce7, #bbf7d0, #4ade80, #16a34a, #14532d); border: 1px solid rgba(0,0,0,.08); }
.hg-legend-low  { color: var(--rkb-green); white-space: nowrap; }
.hg-legend-high { color: var(--rkb-red); white-space: nowrap; }

/* ── SVG Heatmap ── */
.hg-state-path { transition: fill 0.3s ease, filter 0.2s ease; cursor: pointer; }
.hg-state-path:hover { filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.3)) brightness(0.95); z-index: 10; position: relative; }
.hg-map-tooltip {
    position: absolute; opacity: 0; pointer-events: none; background: #0f172a; color: #fff;
    padding: 6px 12px; border-radius: 6px; font-size: .75rem; font-weight: 600;
    font-family: var(--rkb-font); white-space: nowrap; transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 50; border: 1px solid rgba(255,255,255,0.1);
}

.hg-state-bubbles { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.hg-state-bubble { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 10px; cursor: default; transition: transform .2s, box-shadow .2s; font-weight: 700; border: 1px solid rgba(0,0,0,.1); }
.hg-state-bubble:hover { transform: scale(1.06); box-shadow: var(--rkb-shadow-lg); }
.hg-bubble-state { font-size: .7rem; font-weight: 800; letter-spacing: .02em; }
.hg-bubble-price { font-size: .6rem; font-weight: 600; margin-top: 2px; opacity: .85; }

/* ── SEO Block ── */
.hg-seo-block { margin: 16px 0; }
.hg-seo-para {
    font-family: var(--rkb-font);
    font-size: .95rem;
    line-height: 1.8;
    color: var(--rkb-text-2);
    margin-bottom: 12px;
    padding: 14px 18px;
    background: var(--rkb-green-bg);
    border-left: 4px solid var(--rkb-green);
    border-radius: 0 8px 8px 0;
    border: 1px solid var(--rkb-border);
    border-left: 4px solid var(--rkb-green);
}

/* ── Comparison ── */
.hg-comparison-table th:first-child, .hg-comparison-table td:first-child { min-width: 140px; }
.hg-comparison-table th { white-space: nowrap; }

/* ── Disclaimer ── */
.hg-disclaimer { font-size: .72rem; color: var(--rkb-text-dim); margin-top: 16px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,.06); }
.hg-disclaimer a { color: var(--rkb-green); }

/* ── Error ── */
.hg-error { color: #991b1b; background: #fee2e2; padding: 10px 14px; border-radius: 8px; border: 1px solid #fca5a5; font-size: .88rem; font-family: var(--rkb-font); }

/* ── Section Heading ── */
.hg-section-heading {
    font-size: .84rem; font-weight: 700; color: var(--rkb-green-dk);
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--rkb-border);
    letter-spacing: .03em;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .hg-grid-4, .hg-fuel-grid, .hg-metals-grid { grid-template-columns: 1fr; }
    .hg-stat-row { grid-template-columns: 1fr; }
    .hg-highlights-grid { grid-template-columns: 1fr; }
    .hg-state-bubble { width: 60px; height: 60px; }
    .hg-card { padding: 16px 14px; }
}

/* ==============================================
   FAQ Accordion
   ============================================== */
.hg-faq-card { position: relative; }
.hg-faq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }

.hg-faq-item { border: 1px solid rgba(0,0,0,.08); border-radius: 10px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.hg-faq-item:has(.hg-faq-open) { border-color: var(--rkb-border-hl); box-shadow: 0 2px 8px rgba(22,163,74,.1); }

.hg-faq-question {
    width: 100%; background: #fafafa; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 10px; padding: 13px 16px;
    text-align: left; color: var(--rkb-text); font-family: var(--rkb-font);
    font-size: .86rem; font-weight: 600; transition: background .15s;
}
.hg-faq-question:hover { background: var(--rkb-green-bg); }
.hg-faq-question.hg-faq-open { background: var(--rkb-green-bg); color: var(--rkb-green-dk); }

.hg-faq-q-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 7px;
    background: #dcfce7; color: var(--rkb-green-dk);
    font-size: .66rem; font-weight: 800; flex-shrink: 0;
}
.hg-faq-open .hg-faq-q-icon { background: var(--rkb-green); color: #fff; }
.hg-faq-q-text { flex: 1; line-height: 1.4; }
.hg-faq-chevron { font-size: 1rem; color: var(--rkb-text-dim); transition: transform .22s; flex-shrink: 0; }
.hg-faq-open .hg-faq-chevron { transform: rotate(180deg); color: var(--rkb-green); }

.hg-faq-answer {
    padding: 12px 16px 14px 50px;
    border-top: 1px solid rgba(0,0,0,.06);
    background: #ffffff;
}
.hg-faq-answer p { margin: 0; font-size: .85rem; line-height: 1.8; color: var(--rkb-text-2); font-family: var(--rkb-font); }
.hg-faq-answer[hidden] { display: none; }

@media (max-width: 640px) {
    .hg-faq-answer { padding-left: 14px; }
    .hg-faq-question { font-size: .8rem; padding: 11px 12px; }
}

/* ==============================================
   30-Day History Shortcodes
   ============================================== */

/* ── Trend Stat Bar ── */
.hg-trend-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.hg-trend-stat {
    flex: 1; min-width: 96px;
    background: #fafafa;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px; padding: 11px 13px;
    display: flex; flex-direction: column; gap: 3px;
}
.hg-ts-label { font-size: .66rem; color: var(--rkb-text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.hg-ts-value { font-size: 1.05rem; font-weight: 800; color: var(--rkb-text); }
.hg-ts-date { font-size: .65rem; color: var(--rkb-text-dim); }

.hg-ts-min { border-color: #86efac; background: #f0fdf4; }
.hg-ts-min .hg-ts-value { color: var(--rkb-green); }
.hg-ts-max { border-color: #fca5a5; background: #fff5f5; }
.hg-ts-max .hg-ts-value { color: var(--rkb-red); }
.hg-trend-up { border-color: #fca5a5; }
.hg-trend-up .hg-ts-value { color: var(--rkb-red); }
.hg-trend-down { border-color: #86efac; }
.hg-trend-down .hg-ts-value { color: var(--rkb-green); }

/* ── Stats Big Grid ── */
.hg-stats-big-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; margin-bottom: 16px; }
.hg-stats-big {
    background: linear-gradient(135deg, var(--rkb-green-bg), #dcfce7);
    border: 1px solid var(--rkb-border-hl);
    border-radius: 12px; padding: 20px 16px;
    display: flex; flex-direction: column; justify-content: center;
}
.hg-sb-label { font-size: .72rem; color: var(--rkb-green-dk); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.hg-sb-value { font-size: 1.9rem; font-weight: 800; color: var(--rkb-text); letter-spacing: -.04em; margin-bottom: 6px; }
.hg-sb-sub { font-size: .78rem; color: var(--rkb-text-muted); display: flex; flex-direction: column; gap: 2px; }
.hg-sb-sub span { font-size: .7rem; }
.hg-change-up   { color: var(--rkb-red) !important; }
.hg-change-down { color: var(--rkb-green) !important; }

.hg-stats-small-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.hg-stats-small { background: #fafafa; border: 1px solid rgba(0,0,0,.07); border-radius: 9px; padding: 10px 11px; }
.hg-ss-label { font-size: .66rem; color: var(--rkb-text-dim); font-weight: 600; margin-bottom: 3px; }
.hg-ss-value { font-size: .84rem; font-weight: 700; color: var(--rkb-text); }
.hg-ss-date  { font-size: .64rem; color: var(--rkb-text-dim); margin-top: 2px; }
.hg-ss-min .hg-ss-value { color: var(--rkb-green); }
.hg-ss-max .hg-ss-value { color: var(--rkb-red); }

/* ── Sparkline ── */
.hg-sparkline-wrap { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.07); }
.hg-sparkline-title { font-size: .72rem; font-weight: 700; color: var(--rkb-text-dim); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em; }
.hg-sparkline-row { display: flex; align-items: flex-end; gap: 5px; height: 90px; }
.hg-spark-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; cursor: default; }
.hg-spark-bar { width: 100%; border-radius: 3px 3px 0 0; transition: opacity .2s; min-height: 4px; }
.hg-spark-col:hover .hg-spark-bar { opacity: .72; }
.hg-spark-label { font-size: .58rem; color: var(--rkb-text-dim); white-space: nowrap; }
.hg-spark-price { font-size: .63rem; font-weight: 700; color: var(--rkb-text-muted); }

/* ── History Table ── */
.hg-history-table .hg-row-today td { background: var(--rkb-green-bg) !important; }
.hg-history-table tfoot td { font-size: .78rem; background: var(--rkb-green-bg); color: var(--rkb-green-dk); font-weight: 600; }

/* ── State Trend Card ── */
.hg-state-trend-card { position: relative; }

/* ── Responsive History ── */
@media (max-width: 640px) {
    .hg-trend-stats { flex-direction: column; }
    .hg-trend-stat { min-width: unset; }
    .hg-stats-big-grid { grid-template-columns: 1fr; }
    .hg-stats-small-grid { grid-template-columns: 1fr 1fr; }
    .hg-sb-value { font-size: 1.5rem; }
    .hg-sparkline-row { gap: 2px; }
    .hg-spark-label { font-size: .52rem; }
}
