/* ============================================================
   MCX TODAY - Component Styles
   Header, Navigation, Rate Cards, City Selector, Footer, etc.
   ============================================================ */

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--border-light);
  height: var(--header-height);
  transition: all var(--transition-base);
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--space-md);
  max-width: var(--container-max);
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 1.375rem;
  color: var(--text-primary);
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-gold);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #1A1A1A;
}
.logo span { color: var(--gold-600); }

/* Desktop Nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.nav-link {
  padding: 10px 16px;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--gold-600);
  background: var(--gold-50);
}
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active { background: rgba(212,160,23,0.1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-size: 1.125rem;
  background: var(--bg-secondary);
}
.theme-toggle:hover { color: var(--gold-600); }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.375rem;
}
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: flex; }
}

/* Mobile Navigation */
.nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: var(--z-overlay);
  padding: var(--space-xl);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  overflow-y: auto;
}
.nav-mobile.open { transform: translateX(0); }
.nav-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}
.nav-mobile-close {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.5rem; color: var(--text-primary);
}
.nav-mobile .mobile-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1.063rem;
  transition: background var(--transition-fast);
}
.nav-mobile .mobile-link:hover { background: var(--bg-secondary); }
.nav-mobile .mobile-link.active { background: var(--gold-50); color: var(--gold-700); }
[data-theme="dark"] .nav-mobile .mobile-link.active { background: rgba(212,160,23,0.1); }

/* --- Live Status Bar --- */
.live-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--success-bg);
  border-radius: var(--radius-full);
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--success);
}

/* --- Rate Card (Main) --- */
.rate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.rate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.rate-card:hover::before { opacity: 1; }
.rate-card:hover { box-shadow: var(--shadow-gold); border-color: var(--gold-200); }

.rate-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}
.rate-metal-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.rate-metal-icon.gold-icon { background: var(--gold-50); color: var(--gold-600); }
[data-theme="dark"] .rate-metal-icon.gold-icon { background: rgba(212,160,23,0.15); }
.rate-metal-icon.silver-icon { background: var(--silver-100); color: var(--silver-500); }
[data-theme="dark"] .rate-metal-icon.silver-icon { background: rgba(192,192,192,0.1); }

.rate-price {
  font-family: var(--font-primary);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.rate-price .currency { font-size: 1rem; font-weight: 600; color: var(--text-secondary); vertical-align: super; }
.rate-unit { font-size: 0.813rem; color: var(--text-tertiary); margin-top: 2px; }

.rate-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.813rem;
  font-weight: 700;
}
.rate-change.up { background: var(--success-bg); color: var(--success); }
.rate-change.down { background: var(--danger-bg); color: var(--danger); }

.rate-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}
.rate-meta-item { font-size: 0.75rem; }
.rate-meta-label { color: var(--text-tertiary); display: block; }
.rate-meta-value { font-weight: 600; color: var(--text-primary); }

/* --- City Selector Chips --- */
.city-chips {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.city-chips::-webkit-scrollbar { display: none; }
.city-chip {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.city-chip:hover { border-color: var(--gold-300); }
.city-chip.active {
  background: var(--gold-50);
  color: var(--gold-700);
  border-color: var(--gold-400);
}
[data-theme="dark"] .city-chip.active { background: rgba(212,160,23,0.15); color: var(--gold-400); }

/* --- Rate Table --- */
.rate-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.rate-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background: var(--bg-card);
}
.rate-table tbody td {
  padding: 14px 16px;
  font-size: 0.938rem;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}
.rate-table tbody tr:hover td {
  background: var(--gold-50);
}
[data-theme="dark"] .rate-table tbody tr:hover td { background: rgba(212,160,23,0.05); }
.rate-table tbody tr:last-child td { border-bottom: none; }

/* --- Comparison Table --- */
.comparison-table { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-light); }

/* --- Purity Grid --- */
.purity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-sm);
}
.purity-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
}
.purity-item:hover { border-color: var(--gold-300); box-shadow: var(--shadow-gold); }
.purity-label { font-size: 0.75rem; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.purity-price { font-size: 1.25rem; font-weight: 800; font-family: var(--font-primary); margin-top: 4px; }
.purity-change { font-size: 0.75rem; font-weight: 600; margin-top: 2px; }

/* --- Trend Mini Chart --- */
.trend-mini {
  width: 80px;
  height: 32px;
}

/* --- Market Sentiment --- */
.sentiment-bar {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}
.sentiment-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}
.sentiment-fill.bullish { background: var(--success); }
.sentiment-fill.bearish { background: var(--danger); }

/* --- Feature Cards --- */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  text-align: center;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-md);
  font-size: 1.5rem;
  background: var(--gold-50);
  color: var(--gold-600);
}
[data-theme="dark"] .feature-icon { background: rgba(212,160,23,0.1); }

/* --- Testimonials --- */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}
.testimonial-stars { color: var(--gold-500); font-size: 0.875rem; letter-spacing: 2px; margin-bottom: var(--space-sm); }
.testimonial-text { font-size: 0.938rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--space-md); font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: var(--space-md); }
.testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: #1A1A1A;
  font-size: 1rem;
}
.testimonial-name { font-weight: 600; font-size: 0.875rem; }
.testimonial-role { font-size: 0.75rem; color: var(--text-tertiary); }

/* --- Festival Banner --- */
.festival-banner {
  background: var(--gradient-premium);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.festival-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212,160,23,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.festival-title { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; margin-bottom: var(--space-sm); position: relative; }
.festival-subtitle { color: rgba(255,255,255,0.7); font-size: 1rem; margin-bottom: var(--space-lg); position: relative; }
.festival-countdown {
  display: flex;
  gap: var(--space-md);
  position: relative;
}
.countdown-item {
  text-align: center;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  min-width: 60px;
}
.countdown-value { font-size: 1.5rem; font-weight: 800; font-family: var(--font-primary); display: block; }
.countdown-label { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; }

/* --- Footer --- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-3xl);
}
[data-theme="dark"] .site-footer { background: #0A0A0A; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: var(--text-secondary); font-size: 0.875rem; margin-top: var(--space-md); line-height: 1.7; }
.footer-title { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--space-md); color: var(--text-primary); }
.footer-links a { display: block; padding: 6px 0; color: var(--text-secondary); font-size: 0.875rem; transition: color var(--transition-fast); }
.footer-links a:hover { color: var(--gold-500); }
.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.813rem;
  color: var(--text-tertiary);
}
.footer-social { display: flex; gap: var(--space-sm); }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.footer-social a:hover { border-color: var(--gold-400); color: var(--gold-600); }

/* --- Hero Section --- */
.hero {
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
}
.hero-title { margin-bottom: var(--space-sm); }
.hero-subtitle { color: var(--text-secondary); font-size: 1.063rem; max-width: 600px; margin: 0 auto var(--space-lg); }
.hero-actions { display: flex; justify-content: center; gap: var(--space-md); flex-wrap: wrap; }

/* --- Notification Ticker --- */
.notification-ticker {
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.813rem;
  overflow: hidden;
}
[data-theme="dark"] .notification-ticker { background: rgba(212,160,23,0.1); border-color: rgba(212,160,23,0.2); }
.notification-ticker .tag {
  background: var(--gold-500);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.688rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* --- Popular Searches --- */
.popular-tags { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.popular-tag {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  font-size: 0.813rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.popular-tag:hover { background: var(--gold-50); color: var(--gold-700); }

/* --- Calculator Card --- */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}
.calc-card:hover { box-shadow: var(--shadow-gold); border-color: var(--gold-200); }
.calc-card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--gold-50);
  color: var(--gold-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}
[data-theme="dark"] .calc-card-icon { background: rgba(212,160,23,0.1); }
.calc-result {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-md);
  text-align: center;
}
.calc-result-label { font-size: 0.75rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; }
.calc-result-value { font-size: 1.5rem; font-weight: 800; font-family: var(--font-primary); color: var(--gold-600); margin-top: 4px; }

/* --- Blog Card --- */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-image {
  height: 200px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: var(--space-lg); }
.blog-card-tag { display: inline-block; padding: 4px 10px; background: var(--gold-50); color: var(--gold-700); border-radius: var(--radius-full); font-size: 0.688rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: var(--space-sm); }
[data-theme="dark"] .blog-card-tag { background: rgba(212,160,23,0.1); color: var(--gold-400); }
.blog-card-title { font-size: 1.063rem; font-weight: 700; margin-bottom: var(--space-sm); line-height: 1.4; }
.blog-card-excerpt { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }
.blog-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-md); font-size: 0.75rem; color: var(--text-tertiary); }

/* --- Search Bar --- */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 4px;
  max-width: 480px;
  transition: border-color var(--transition-fast);
}
.search-bar:focus-within { border-color: var(--gold-500); }
.search-bar input {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.938rem;
}
.search-bar button {
  padding: 10px 20px;
  background: var(--gradient-gold);
  border-radius: var(--radius-md);
  color: #1A1A1A;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.875rem;
}

/* --- Watchlist Star --- */
.watchlist-star {
  cursor: pointer;
  font-size: 1.125rem;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}
.watchlist-star:hover, .watchlist-star.active { color: var(--gold-500); transform: scale(1.2); }

/* --- Loading Spinner --- */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border-light);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
