/* ==========================================================================
   Gold Rate Today - Design System & Premium Light Theme Stylesheet
   ========================================================================== */

/* --- Custom Variables & Tokens (Light Mode Primary) --- */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --border-color: rgba(180, 83, 9, 0.12); /* Soft amber-gold border */
  --border-hover: rgba(180, 83, 9, 0.4);
  
  --text-primary: #0f172a; /* Deep slate */
  --text-secondary: #475569; /* Medium slate */
  --text-muted: #64748b; /* WCAG AA compliant muted slate */
  
  --gold-primary: #b45309; /* Accessible amber-gold for excellent contrast */
  --gold-secondary: #d97706;
  --gold-glow: rgba(217, 119, 6, 0.06);
  --gold-light: #fef3c7; /* Soft yellow highlight */
  
  --silver-primary: #475569;
  --silver-secondary: #64748b;
  --silver-glow: rgba(148, 163, 184, 0.08);
  
  --success: #16a34a; /* Accessible green */
  --success-glow: rgba(22, 163, 74, 0.08);
  --error: #dc2626; /* Accessible red */
  --error-glow: rgba(220, 38, 38, 0.08);
  
  --font-en: 'Outfit', sans-serif;
  --font-hi: 'Noto Sans Devanagari', 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
  --box-shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --box-shadow-hover: 0 20px 25px -5px rgba(180, 83, 9, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- Base Reset & Setup --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-en);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

body.lang-hi {
  font-family: var(--font-hi);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Glowing Background Blobs (Soft pastels for light mode) --- */
.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(160px);
  z-index: -1;
  opacity: 0.25;
  pointer-events: none;
}

.blob-1 {
  background: radial-gradient(circle, #fef08a 0%, transparent 70%); /* Soft gold */
  top: -200px;
  right: -50px;
}

.blob-2 {
  background: radial-gradient(circle, #bfdbfe 0%, transparent 70%); /* Soft blue */
  bottom: 20%;
  left: -200px;
}

/* --- Header Styling --- */
header {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--gold-secondary), var(--gold-primary));
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.2);
}

.logo-icon svg {
  width: 24px;
  height: 24px;
}

.logo-text h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary), var(--gold-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text .subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: rgba(0, 0, 0, 0.15);
}

.glass-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-color);
}

.glass-btn:hover {
  border-color: var(--gold-primary);
  background-color: var(--gold-light);
  color: var(--gold-primary);
}

.btn-filter {
  background-color: #ffffff;
  color: var(--text-secondary);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--border-radius-sm);
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

.btn-filter.active, .btn-filter:hover {
  background: linear-gradient(135deg, var(--gold-secondary), var(--gold-primary));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(180, 83, 9, 0.2);
}

.btn-select {
  background-color: #ffffff;
  color: var(--text-secondary);
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex: 1;
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-select.active {
  background-color: var(--gold-light);
  color: var(--gold-primary);
  border-color: var(--gold-primary);
}

.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--border-radius-sm);
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-secondary);
}

.btn-sm.active, .btn-sm:hover {
  background-color: var(--gold-primary);
  color: #ffffff;
  border-color: transparent;
}

/* --- Layout Sections --- */
.section {
  padding: 2rem 0;
  margin-bottom: 1rem;
}

.glass-section {
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--box-shadow-card);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.text-gold {
  color: var(--gold-primary);
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.text-center {
  text-align: center;
}

/* --- Last Updated Badge --- */
.last-updated-badge {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

/* --- Weight Filter Row --- */
.weight-filter-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.btn-group {
  display: inline-flex;
  gap: 0.4rem;
  background-color: var(--bg-secondary);
  padding: 0.25rem;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.btn-group-full {
  display: flex;
  gap: 0.4rem;
  width: 100%;
}

.btn-group-sm {
  display: inline-flex;
  gap: 0.25rem;
  background-color: var(--bg-secondary);
  padding: 0.2rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

/* --- Price Cards Grid --- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.price-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: var(--box-shadow-card);
}

.price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-hover);
}

.card-glow {
  position: absolute;
  top: -50px;
  left: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.2;
  pointer-events: none;
  transition: var(--transition-smooth);
}

/* Specific Card Glow Colors (Light theme soft tones) */
.gold-card-24 .card-glow, .gold-card-22 .card-glow, .gold-card-18 .card-glow {
  background: #fde047;
}

.silver-card .card-glow {
  background: #cbd5e1;
}

/* Card Hover Highlights */
.gold-card-24:hover { border-color: rgba(180, 83, 9, 0.35); }
.gold-card-22:hover { border-color: rgba(217, 119, 6, 0.3); }
.gold-card-18:hover { border-color: rgba(217, 119, 6, 0.25); }
.silver-card:hover { border-color: rgba(71, 85, 105, 0.3); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.purity-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
}

.gold-card-24 .purity-badge {
  color: var(--gold-primary);
  background-color: var(--gold-light);
}

.gold-card-22 .purity-badge {
  color: var(--gold-secondary);
  background-color: var(--gold-light);
}

.gold-card-18 .purity-badge {
  color: #d97706;
  background-color: rgba(253, 230, 138, 0.5);
}

.silver-card .purity-badge {
  color: var(--silver-primary);
  background-color: var(--bg-secondary);
}

.gold-icon, .silver-icon {
  font-size: 1.25rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.price-value-container {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.currency {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.price-number {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

/* Make 24K text pop with a gold metallic feel */
.gold-card-24 .price-number {
  color: var(--gold-primary);
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--gold-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.price-change-row {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.change-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
}

.change-up {
  color: var(--success);
  background-color: var(--success-glow);
}

.change-down {
  color: var(--error);
  background-color: var(--error-glow);
}

/* --- Layout Structure --- */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .two-column-layout {
    grid-template-columns: 5.5fr 6.5fr;
  }
}

/* --- Calculator Custom Styles --- */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-unit-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.number-input {
  width: 90px;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
  padding: 0.4rem 1.6rem 0.4rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: right;
  outline: none;
  transition: var(--transition-smooth);
}

.number-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(180, 83, 9, 0.15);
}

.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.unit {
  position: absolute;
  right: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  pointer-events: none;
}

/* Custom Range Slider styling (Light Theme) */
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: #e2e8f0;
  outline: none;
  margin: 10px 0;
  transition: var(--transition-smooth);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.3);
  transition: var(--transition-smooth);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 2px 10px rgba(180, 83, 9, 0.5);
}

.range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--gold-primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.3);
  transition: var(--transition-smooth);
}

.range-slider::-moz-range-thumb:hover {
  transform: scale(1.25);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  padding: 0 0.1rem;
}

/* Bill Breakdown Design */
.bill-breakdown {
  margin-top: 2rem;
  background-color: var(--bg-secondary);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
}

.bill-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 0.5rem;
  letter-spacing: 0.3px;
}

.bill-rows {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bill-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.bill-row span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.bill-row.divider {
  height: 1px;
  background-color: rgba(0, 0, 0, 0.05);
  margin: 0.25rem 0;
}

.bill-row.divider-double {
  height: 3px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin: 0.4rem 0;
}

.bill-row.highlight {
  color: var(--text-primary);
  font-weight: 500;
}

.bill-row.highlight span:last-child {
  color: var(--gold-primary);
}

.bill-row.total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.bill-row.total span:last-child {
  color: var(--gold-primary);
  font-size: 1.35rem;
}

.bill-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
  line-height: 1.3;
}

/* --- Chart Section Styles --- */
.chart-section {
  display: flex;
  flex-direction: column;
}

.chart-container-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 300px;
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .chart-container-wrapper {
    min-height: 420px;
  }
}

/* --- Search Input Icon Wrapper --- */
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper input {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
  padding: 0.5rem 1rem 0.5rem 2.2rem;
  border-radius: var(--border-radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  width: 180px;
  transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
  width: 240px;
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(180, 83, 9, 0.1);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  font-size: 0.85rem;
  pointer-events: none;
  color: var(--text-secondary);
}

/* --- City Table Section --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 1.5rem;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background-color: #ffffff;
}

.city-rates-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.city-rates-table th, .city-rates-table td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.city-rates-table th {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.city-rates-table tbody tr {
  transition: var(--transition-smooth);
}

.city-rates-table tbody tr:hover {
  background-color: rgba(180, 83, 9, 0.02);
}

.city-rates-table tbody tr:last-child td {
  border-bottom: none;
}

/* Highlight user local location row */
.city-rates-table tbody tr.highlight-location-row {
  background-color: var(--gold-light);
  border-left: 4px solid var(--gold-primary);
}

.city-rates-table tbody tr.highlight-location-row:hover {
  background-color: #fde68a;
}

.city-name-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.user-loc-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 50px;
  background-color: var(--gold-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.text-gold-accent {
  color: var(--gold-primary);
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

/* --- FAQ Section --- */
.faq-section {
  max-width: 800px;
  margin: 0 auto 3rem auto;
}

.faq-accordion-container {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.faq-item:hover {
  border-color: rgba(180, 83, 9, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.faq-question-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
}

.faq-question-btn:focus-visible {
  background-color: rgba(0, 0, 0, 0.02);
}

.faq-arrow {
  font-size: 0.7rem;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
  color: var(--gold-primary);
}

.faq-item.open {
  border-color: rgba(180, 83, 9, 0.3);
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.04);
}

.faq-answer-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.faq-item.open .faq-answer-panel {
  max-height: 500px;
  transition: max-height 0.35s ease-in-out;
}

.faq-answer-panel p {
  padding: 0 1.4rem 1.2rem 1.4rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* --- Footer Styling --- */
footer {
  background-color: #0f172a; /* Keep dark background for the footer for contrast */
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3rem 0 1.5rem 0;
  margin-top: 3rem;
  color: #94a3b8;
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-container {
    grid-template-columns: 2fr 1.2fr 2fr;
  }
}

footer h4 {
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff, var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

footer h5 {
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 600;
}

footer p {
  font-size: 0.85rem;
  line-height: 1.5;
}

footer ul {
  list-style: none;
}

footer ul li {
  margin-bottom: 0.5rem;
}

footer ul li a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

footer ul li a:hover {
  color: var(--gold-light);
  padding-left: 3px;
}

.footer-disclaimer p {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #64748b;
}

.footer-copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
}

/* --- Scrollbar Customization --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(180, 83, 9, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 83, 9, 0.4);
}


/* --- Market Commentary Box --- */
.market-commentary-box {
  background-color: var(--gold-light);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.15rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.03);
  position: relative;
  overflow: hidden;
}

.market-commentary-box::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--gold-secondary), var(--gold-primary));
}

.commentary-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.commentary-header h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pulse-icon {
  font-size: 1rem;
}

#commentary-text {
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.5;
  font-weight: 500;
}

/* --- Calculator Tabs --- */
.calculator-tabs {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.calc-tab {
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  background: none;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.calc-tab.active {
  background-color: var(--gold-light);
  color: var(--gold-primary);
  border-color: var(--border-color);
}

.calc-tab:hover:not(.active) {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.calc-tab-content {
  display: none;
}

.calc-tab-content.active {
  display: block;
}

/* --- Investment Comparison Tool --- */
.comp-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comp-bars-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.comp-bar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.comp-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.comp-bar-label .bar-value {
  font-weight: 800;
}

.comp-bar-track {
  background-color: var(--bg-secondary);
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
}

.comp-bar-fill {
  height: 100%;
  border-radius: 5px;
  width: 0; /* Dynamic expansion via JS */
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.gold-fill {
  background: linear-gradient(90deg, var(--gold-secondary), var(--gold-primary));
  box-shadow: 0 0 6px rgba(180, 83, 9, 0.2);
}

.nifty-fill {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.2);
}

.fd-fill {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

/* --- Email Subscription Section --- */
.sub-section {
  margin-top: 1.5rem;
  padding: 2.25rem;
}

.sub-container-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.sub-text-column {
  flex: 1;
  min-width: 280px;
}

.sub-form-column {
  flex: 1.2;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.subscribe-form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.subscribe-form input[type="email"] {
  flex: 1;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
  padding: 0.65rem 1rem;
  border-radius: var(--border-radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(180, 83, 9, 0.1);
}

.gold-btn {
  background: linear-gradient(135deg, var(--gold-secondary), var(--gold-primary));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.2);
}

.gold-btn:hover {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.3);
}

.sub-message-text {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.sub-message-success {
  color: var(--success);
}

.sub-message-error {
  color: var(--error);
}

/* --- Layout utility classes --- */
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }

/* ==========================================================================
   Mobile Optimization Media Queries
   ========================================================================== */

@media (max-width: 767px) {
  .container {
    padding: 0 1rem;
  }
  
  .section {
    padding: 1.5rem 0;
    margin-bottom: 0.5rem;
  }

  .glass-section {
    padding: 1.25rem;
  }
  
  header {
    padding: 1rem 0;
  }

  .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .logo-icon {
    width: 38px;
    height: 38px;
  }

  .logo-text h1 {
    font-size: 1.2rem;
  }

  .logo-text .subtitle {
    font-size: 0.7rem;
  }

  /* Make weight filters full-width mobile tabs */
  .weight-filter-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
  }

  .weight-filter-container .btn-group {
    display: flex;
    width: 100%;
  }

  .weight-filter-container .btn-filter {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.2rem;
    font-size: 0.8rem;
  }

  /* 2-column layout for gold price cards on mobile */
  .price-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .price-card {
    padding: 1rem;
    border-radius: var(--border-radius-md);
  }

  .purity-badge {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
  }

  .card-title {
    font-size: 0.95rem;
  }

  .currency {
    font-size: 1.15rem;
  }

  .price-number {
    font-size: 1.45rem;
  }

  .price-change-row {
    font-size: 0.75rem;
  }

  .change-indicator {
    padding: 0.1rem 0.35rem;
  }

  /* Calculator Form tweaks */
  .calc-form {
    gap: 1.25rem;
  }

  .btn-select {
    padding: 0.6rem;
    font-size: 0.85rem;
  }

  .number-input {
    width: 75px;
    padding: 0.35rem 1.2rem 0.35rem 0.4rem;
    font-size: 0.9rem;
  }

  .unit {
    right: 0.4rem;
    font-size: 0.8rem;
  }

  /* Tables adjustments */
  .city-rates-table th, .city-rates-table td {
    padding: 0.7rem 0.6rem;
    font-size: 0.85rem;
  }

  .user-loc-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
  }
}

@media (max-width: 480px) {
  /* Smaller styling adjustments for compact phones */
  .price-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .price-card {
    padding: 0.75rem;
  }

  .price-number {
    font-size: 1.25rem;
  }

  .logo-text h1 {
    font-size: 1.1rem;
  }
  
  .logo-text .subtitle {
    display: none; /* Hide subtitle to save header space on small screens */
  }

  .faq-question-btn {
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
  }

  .faq-answer-panel p {
    padding: 0 1rem 1rem 1rem;
    font-size: 0.82rem;
  }
}

/* --- SEO & Crawlable City Links Styling --- */
.city-link {
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.city-link:hover, .city-link:focus {
  color: var(--gold-primary);
  text-decoration: underline;
  transform: translateX(2px);
}

.city-link-arrow {
  font-size: 0.75rem;
  opacity: 0.5;
  transition: var(--transition-smooth);
}

.city-link:hover .city-link-arrow {
  opacity: 1;
  color: var(--gold-secondary);
}

.city-quick-links-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border-color);
}

.city-quick-links-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.city-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.city-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.82rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.city-chip:hover {
  background: var(--gold-light);
  border-color: var(--gold-secondary);
  color: var(--gold-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.1);
}

.city-chip.active {
  background: var(--gold-primary);
  color: #ffffff;
  border-color: var(--gold-primary);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.breadcrumb-nav a {
  color: var(--gold-primary);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-nav a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--text-muted);
}

