/* ========================================
   GOLDPREISLIVE - MAIN STYLESHEET
   Multilingual Gold & Silver Prices Website
   ======================================== */

/* ----------------------------------------
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ---------------------------------------- */
:root {
  /* Primary Colors - Gold Theme */
  --color-gold: #d4af37;
  --color-gold-light: #f4d03f;
  --color-gold-dark: #b8860b;

  /* Secondary Colors - Trust/Financial */
  --color-navy: #1a2744;
  --color-navy-light: #2c3e50;
  --color-silver: #c0c0c0;
  --color-silver-dark: #a8a8a8;

  /* Semantic Colors */
  --color-success: #27ae60;
  --color-warning: #f39c12;
  --color-danger: #e74c3c;
  --color-info: #3498db;

  /* Light Theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --bg-card: #ffffff;
  --text-primary: #1a2744;
  --text-secondary: #5a6a7a;
  --text-muted: #8a9aaa;
  --border-color: #dee2e6;
  --shadow-color: rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-primary:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-arabic: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px var(--shadow-color);
  --shadow-md: 0 4px 6px var(--shadow-color);
  --shadow-lg: 0 10px 15px var(--shadow-color);
  --shadow-xl: 0 20px 25px var(--shadow-color);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Container widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1400px;

  /* Header height */
  --header-height: 70px;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-card: #161b22;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --border-color: #30363d;
  --shadow-color: rgba(0, 0, 0, 0.4);
}

/* ----------------------------------------
   RESET & BASE STYLES
   ---------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal);
}

/* RTL Support for Arabic */
[dir="rtl"] body {
  font-family: var(--font-arabic);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold-light);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

/* ----------------------------------------
   TYPOGRAPHY
   ---------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-5xl);
}
h2 {
  font-size: var(--text-4xl);
}
h3 {
  font-size: var(--text-3xl);
}
h4 {
  font-size: var(--text-2xl);
}
h5 {
  font-size: var(--text-xl);
}
h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--space-4);
}

.text-gold {
  color: var(--color-gold);
}
.text-success {
  color: var(--color-success);
}
.text-danger {
  color: var(--color-danger);
}
.text-muted {
  color: var(--text-muted);
}

/* ----------------------------------------
   LAYOUT UTILITIES
   ---------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-lg {
  max-width: var(--container-2xl);
}

.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-end {
  justify-content: flex-end;
}
.gap-1 {
  gap: var(--space-1);
}
.gap-2 {
  gap: var(--space-2);
}
.gap-3 {
  gap: var(--space-3);
}
.gap-4 {
  gap: var(--space-4);
}
.gap-6 {
  gap: var(--space-6);
}
.gap-8 {
  gap: var(--space-8);
}

.grid {
  display: grid;
}
.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}
.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .lg\:grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ----------------------------------------
   HEADER & NAVIGATION
   ---------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  transition: background-color var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(
    135deg,
    var(--color-gold),
    var(--color-gold-dark)
  );
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.nav {
  display: none;
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
    align-items: center;
    gap: var(--space-6);
  }
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-gold);
  background: rgba(212, 175, 55, 0.1);
}

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

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  padding: var(--space-1);
}

.lang-btn {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background: var(--color-gold);
  color: white;
}

.lang-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--color-gold);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

@media (min-width: 1024px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  padding: var(--space-4);
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
  z-index: 999;
  overflow-y: auto;
}

[dir="rtl"] .mobile-nav {
  transform: translateX(100%);
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-link {
  display: block;
  padding: var(--space-4);
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--color-gold);
}

/* ----------------------------------------
   PRICE CARDS
   ---------------------------------------- */
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.price-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-gold),
    var(--color-gold-light)
  );
}

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

.price-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.price-card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-secondary);
}

.price-card-badge {
  background: linear-gradient(
    135deg,
    var(--color-gold),
    var(--color-gold-dark)
  );
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
}

/* Enhanced Price Display - Shimmer Effect (Most Attractive) */
.price-value {
  font-size: var(--text-4xl);
  font-weight: 700;
  background: linear-gradient(135deg, #FFD700, #FFC107, #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: var(--space-2) 0;
  position: relative;
  transition: transform var(--transition-normal);
}

.price-value::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: shimmerGold 3s ease-in-out infinite;
}

.price-value:hover {
  transform: scale(1.03);
}

.price-value:hover::before {
  animation-play-state: paused;
}

/* Gold Shimmer Animation */
@keyframes shimmerGold {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 100%;
  }
}

/* Silver Price - Silver Shimmer */
.silver .price-value {
  background: linear-gradient(135deg, #C0C0C0, #E8E8E8, #C0C0C0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.silver .price-value::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.7),
    transparent
  );
  animation: shimmerSilver 3s ease-in-out infinite;
}

/* Silver Shimmer Animation */
@keyframes shimmerSilver {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 100%;
  }
}

.price-currency {
  font-size: var(--text-lg);
  color: var(--text-muted);
}

.price-unit {
  font-size: var(--text-sm);
  background: linear-gradient(135deg, #FFD700, #FFC107);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  opacity: 0.8;
}

/* Silver Unit */
.silver .price-unit {
  background: linear-gradient(135deg, #C0C0C0, #E8E8E8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.price-change {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

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

.price-change.down {
  color: var(--color-danger);
}

.price-usd {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-color);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Gold Karat Cards */
.karat-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .karat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .karat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .karat-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.karat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  transition: all var(--transition-normal);
}

.karat-card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
}

.karat-label {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: var(--space-2);
}

.karat-purity {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.karat-price {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.karat-price-usd {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* ----------------------------------------
   PRICE TABLE
   ---------------------------------------- */
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.price-table th,
.price-table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

[dir="rtl"] .price-table th,
[dir="rtl"] .price-table td {
  text-align: right;
}

.price-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-table tr:last-child td {
  border-bottom: none;
}

.price-table tr:hover td {
  background: var(--bg-secondary);
}

.price-table .price-cell {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-primary);
}

/* ----------------------------------------
   CHARTS SECTION
   ---------------------------------------- */
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.chart-title {
  font-size: var(--text-xl);
  font-weight: 700;
}

.chart-tabs {
  display: flex;
  gap: var(--space-2);
}

.chart-tab {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  transition: all var(--transition-fast);
}

.chart-tab:hover,
.chart-tab.active {
  background: var(--color-gold);
  color: white;
}

.chart-canvas {
  width: 100%;
  height: 300px;
}

@media (min-width: 768px) {
  .chart-canvas {
    height: 400px;
  }
}

/* ----------------------------------------
   CALCULATOR
   ---------------------------------------- */
.calculator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 500px;
  margin: 0 auto;
}

.calculator-title {
  text-align: center;
  margin-bottom: var(--space-6);
}

.calculator-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.form-input {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-gold);
}

.form-select {
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
}

.swap-btn {
  align-self: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.swap-btn:hover {
  transform: rotate(180deg);
}

.calculator-result {
  margin-top: var(--space-6);
  padding: var(--space-6);
  background: linear-gradient(
    135deg,
    var(--color-gold),
    var(--color-gold-dark)
  );
  border-radius: var(--radius-lg);
  text-align: center;
  color: white;
}

.result-label {
  font-size: var(--text-sm);
  opacity: 0.9;
  margin-bottom: var(--space-2);
}

.result-value {
  font-size: var(--text-3xl);
  font-weight: 700;
}

/* ----------------------------------------
   NEWS & BLOG
   ---------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-normal);
}

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

.news-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.news-content {
  padding: var(--space-5);
}

.news-category {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: rgba(212, 175, 55, 0.1);
  color: var(--color-gold);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.news-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  line-height: 1.4;
}

.news-excerpt {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ----------------------------------------
   AD PLACEHOLDERS
   ---------------------------------------- */
.ad-placeholder {
  background: var(--bg-secondary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  min-height: 100px;
}

.ad-banner {
  min-height: 90px;
}

.ad-rectangle {
  min-height: 250px;
}

.ad-sidebar {
  min-height: 600px;
}

/* ----------------------------------------
   FOOTER
   ---------------------------------------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-12) 0 var(--space-6);
  margin-top: var(--space-16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

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

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .logo {
  margin-bottom: var(--space-4);
}

.footer-desc {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.footer-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-link {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-gold);
}

.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-copyright {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--color-gold);
  color: white;
}

/* ----------------------------------------
   COOKIE CONSENT BANNER
   ---------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: var(--space-6);
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: var(--container-xl);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .cookie-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-text {
  flex: 1;
}

.cookie-text h4 {
  margin-bottom: var(--space-2);
}

.cookie-text p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 0;
}

.cookie-text a {
  color: var(--color-gold);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* ----------------------------------------
   BUTTONS
   ---------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--color-gold),
    var(--color-gold-dark)
  );
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
}

.btn-outline {
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
}

.btn-outline:hover {
  background: var(--color-gold);
  color: white;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

/* ----------------------------------------
   SECTIONS & PAGES
   ---------------------------------------- */
.section {
  padding: var(--space-12) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto;
}

.page-header {
  background: linear-gradient(
    135deg,
    var(--color-navy),
    var(--color-navy-light)
  );
  padding: var(--space-16) 0;
  text-align: center;
  margin-bottom: var(--space-10);
}

.page-title {
  color: white;
  font-size: var(--text-4xl);
  margin-bottom: var(--space-3);
}

.page-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-lg);
}

/* Hero Section */
.hero {
  padding: var(--space-12) 0 var(--space-16);
  text-align: center;
}

.hero-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .hero-title {
    font-size: var(--text-5xl);
  }
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-6);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
  margin-top: var(--space-10);
}

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

.hero-stat-value {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-gold);
}

.hero-stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Content Pages */
.content-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-8);
}

.content-page h1 {
  margin-bottom: var(--space-6);
}

.content-page h2 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  font-size: var(--text-2xl);
}

.content-page h3 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  font-size: var(--text-xl);
}

.content-page p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.content-page ul {
  list-style: disc;
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

[dir="rtl"] .content-page ul {
  padding-left: 0;
  padding-right: var(--space-6);
}

.content-page li {
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}

.contact-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .contact-info {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-info-item {
  text-align: center;
  padding: var(--space-6);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.contact-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-3);
  background: linear-gradient(
    135deg,
    var(--color-gold),
    var(--color-gold-dark)
  );
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* ----------------------------------------
   LAST UPDATE & REFRESH
   ---------------------------------------- */
.update-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.update-dot {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: var(--radius-full);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.refresh-btn:hover {
  background: var(--color-gold);
  color: white;
}

.refresh-btn.loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ----------------------------------------
   LOADING STATES
   ---------------------------------------- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--bg-tertiary) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-2);
}

.skeleton-price {
  height: 2.5em;
  width: 150px;
}

/* ----------------------------------------
   UTILITIES
   ---------------------------------------- */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

.mt-4 {
  margin-top: var(--space-4);
}
.mt-6 {
  margin-top: var(--space-6);
}
.mt-8 {
  margin-top: var(--space-8);
}
.mb-4 {
  margin-bottom: var(--space-4);
}
.mb-6 {
  margin-bottom: var(--space-6);
}
.mb-8 {
  margin-bottom: var(--space-8);
}

.py-4 {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}
.py-6 {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}
.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.hidden {
  display: none;
}
.visible {
  display: block;
}

@media (max-width: 767px) {
  .hide-mobile {
    display: none;
  }
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none;
  }
}

/* ----------------------------------------
   MOBILE QUICK ACCESS NAVIGATION
   ---------------------------------------- */
.mobile-quick-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 10px var(--shadow-color);
  padding: 0.75rem 0.5rem;
  z-index: 998;
  display: none;
}

@media (max-width: 1023px) {
  .mobile-quick-nav {
    display: block;
  }
}

[dir="rtl"] .mobile-quick-nav {
  direction: rtl;
}

.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.quick-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  text-decoration: none;
  gap: 0.25rem;
}

.quick-nav-btn:hover,
.quick-nav-btn.active {
  background: var(--color-gold);
  color: white;
  transform: translateY(-2px);
}

.quick-nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* Add padding to body when mobile nav is visible */
@media (max-width: 1023px) {
  body {
    padding-bottom: 70px;
  }
}

/* ----------------------------------------
   USD PRICE DISPLAY - Exact same as EUR with shimmer
   ---------------------------------------- */
.price-value-usd {
  font-size: var(--text-4xl);
  font-weight: 700;
  background: linear-gradient(135deg, #FFD700, #FFC107, #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: var(--space-2) 0;
  position: relative;
  transition: transform var(--transition-normal);
}

.price-value-usd::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: shimmerGold 3s ease-in-out infinite;
}

.price-value-usd:hover {
  transform: scale(1.03);
}

.price-value-usd:hover::before {
  animation-play-state: paused;
}

/* Silver cards - lighter color with silver shimmer for both EUR and USD */
.silver .price-value,
.silver .price-value-usd {
  background: linear-gradient(135deg, #C0C0C0, #E8E8E8, #C0C0C0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.silver .price-value::before,
.silver .price-value-usd::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.7),
    transparent
  );
  animation: shimmerSilver 3s ease-in-out infinite;
}


/* Make headline cards clickable */
.price-card.clickable {
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.price-card.clickable:hover {
  text-decoration: none;
}

/* ----------------------------------------
   ENSURE KARAT/WEIGHT BOX STYLES ARE DEFINED
   ---------------------------------------- */
/* General karat box styles if not already defined */
.karat-grid-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.karat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all var(--transition-fast);
}

.karat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-gold);
}

.karat-box.highlight {
  border-color: var(--color-gold);
  background: rgba(212, 175, 55, 0.05);
}

.k-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.k-purity {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* EUR Price in karat boxes */
.k-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin-top: 0.5rem;
}

/* USD Price in karat boxes - SAME as EUR */
.karat-box .k-price-usd {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  font-family: var(--font-mono);
  margin-top: 0.25rem;
}

/* Currency symbols with label */
.karat-box .k-price::before {
  content: 'EUR ';
  font-size: 0.65rem;
  opacity: 0.6;
  margin-right: 3px;
  font-weight: 500;
}

.karat-box .k-price-usd::before {
  content: 'USD ';
  font-size: 0.65rem;
  opacity: 0.6;
  margin-right: 3px;
  font-weight: 500;
}

/* RTL Support - Use ::after instead of ::before */
[dir="rtl"] .karat-box .k-price::before,
[dir="rtl"] .karat-box .k-price-usd::before {
  content: none;
  display: none;
}

[dir="rtl"] .karat-box .k-price::after {
  content: ' EUR';
  font-size: 0.65rem;
  opacity: 0.6;
  margin-left: 3px;
  font-weight: 500;
}

[dir="rtl"] .karat-box .k-price-usd::after {
  content: ' USD';
  font-size: 0.65rem;
  opacity: 0.6;
  margin-left: 3px;
  font-weight: 500;
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .cookie-banner,
  .ad-placeholder,
  .mobile-quick-nav {
    display: none;
  }

  body {
    background: white;
    color: black;
    padding-bottom: 0;
  }
}

/* ----------------------------------------
   GLOBAL MOBILE BOTTOM NAV
   ---------------------------------------- */
@media (max-width: 768px) {
  .mobile-quick-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: block !important;
  }

  .quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 65px;
  }

  .quick-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    gap: 5px;
    transition: all 0.2s;
  }

  .quick-nav-btn:hover {
    background-color: var(--bg-secondary);
  }

  .quick-nav-btn.active {
    color: var(--color-gold);
    background: linear-gradient(to top, rgba(212, 175, 55, 0.1), transparent);
    border-top: 2px solid var(--color-gold);
  }

  .quick-nav-icon {
    font-size: 1.4rem;
    margin-top: 2px;
  }
  
  /* Ensure content isn't hidden behind nav */
  body {
      padding-bottom: 80px !important; 
  }
  
  /* Hide footer bottom strip if needed or adjust */
  .footer-bottom {
      padding-bottom: 80px;
  }
}

@media (min-width: 769px) {
    .mobile-quick-nav {
        display: none !important;
    }
}


/* ----------------------------------------
   GLOBAL MOBILE MENU & BTN INJECTION
   ---------------------------------------- */
@media (max-width: 900px) {
  /* Force Header Actions layout */
  .header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
  }

  /* Mobile Menu Button Style */
  .mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
  }

  .mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
  }
  
  /* Hamburger Animation when open */
  .mobile-menu-btn[aria-expanded='true'] span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .mobile-menu-btn[aria-expanded='true'] span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-btn[aria-expanded='true'] span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Mobile Navigation Drawer */
  .mobile-nav {
    position: fixed;
    top: 0;
    left: 0; /* Changed from right to left for better UX or match expectation */
    width: 280px; /* Max width */
    height: 100vh;
    background: var(--bg-card);
    box-shadow: 2px 0 20px rgba(0,0,0,0.5);
    z-index: 1001; /* Below button */
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Space for header */
  }

  .mobile-nav.open {
    transform: translateX(0);
  }
  
  /* RTL Support for Drawer */
  [lang='ar'] .mobile-nav {
      left: auto;
      right: 0;
      transform: translateX(100%);
  }
  [lang='ar'] .mobile-nav.open {
      transform: translateX(0);
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 10px;
  }

  .mobile-nav-link {
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.2s;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
  }

  .mobile-nav-link:hover, .mobile-nav-link.active {
    background: var(--bg-secondary);
    color: var(--color-gold);
    border-left: 3px solid var(--color-gold);
  }
  
  /* Overlay */
  .mobile-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.5);
      z-index: 1000;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s;
      backdrop-filter: blur(2px);
  }
  .mobile-overlay.visible {
      opacity: 1;
      pointer-events: auto;
  }
}


/* ----------------------------------------
   FORCE LATIN NUMBERS (FIX FOR ARABIC INPUTS)
   ---------------------------------------- */
/* Force all numeric inputs and displays to be LTR and Latin font */
input[type='number'],
.c-input,
.c-res-main,
.c-res-sub,
.table-price,
.usd-value,
.equiv-value,
.multi-item input {
    direction: ltr !important;
    font-family: 'Inter', sans-serif !important; 
    unicode-bidi: isolate !important;
    font-variant-numeric: tabular-nums;
}

/* Price Value Specific Handling */
.price-value {
    font-family: 'Inter', sans-serif !important;
    font-variant-numeric: tabular-nums;
    unicode-bidi: isolate !important;
    /* We don't force LTR globally here to avoid alignment jumps in RTL, 
       but we ensure the content renders as numbers correctly */
}

/* Ensure specifically for Arabic pages */
[lang='ar'] input[type='number'],
[lang='ar'] .c-input {
    direction: ltr !important;
    text-align: left; 
}

/* Fix Price Display Alignment in Arabic 
   Strategy: Keep container RTL so [Price] is Right and [Unit] is Left.
   But force the [Price] span itself to be LTR to show English numbers and correct currency symbol placement.
*/
[lang='ar'] .price-value,
[lang='ar'] .price-value-usd {
    direction: rtl !important; 
    justify-content: flex-start; /* Start from right */
    text-align: right;
    display: flex;
    gap: 5px;
    width: 100%;
}

/* Force the Price Number itself to be LTR English */
[lang='ar'] .price-value > span:not(.price-unit),
[lang='ar'] .price-value-usd > span:not(.price-unit), 
[lang='ar'] .k-price,
[lang='ar'] .k-price-usd {
    direction: ltr !important;
    unicode-bidi: isolate !important;
    font-family: 'Inter', sans-serif !important;
}

/* Ensure unit stays Arabic font */
[lang='ar'] .price-unit {
    font-family: inherit;
    direction: rtl;
}



/* Restore lost styles from previous edit */
.multi-item {
    direction: ltr; 
}
.c-select {
    font-family: 'Inter', sans-serif !important;
}


/* ----------------------------------------
   SILVER CALCULATOR STYLING
   ---------------------------------------- */
.calc-result-box.silver {
    background: linear-gradient(to right, rgba(192, 192, 192, 0.15), rgba(220, 220, 220, 0.05));
    border-color: #A0AEC0; /* Cool Grey / Silver */
    box-shadow: 0 4px 6px rgba(160, 174, 192, 0.1);
}

.calc-result-box.silver .c-res-label {
    color: #718096;
}

.calc-result-box.silver .c-res-main {
    color: #4A5568 !important; /* Dark Slate default */
    background: linear-gradient(135deg, #718096, #cbd5e0, #718096);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 0px transparent; /* Remove gold glow */
}

/* Dark Mode Silver */
[data-theme='dark'] .calc-result-box.silver {
    background: linear-gradient(to right, rgba(113, 128, 150, 0.2), rgba(45, 55, 72, 0.2));
    border-color: #4A5568;
}

[data-theme='dark'] .calc-result-box.silver .c-res-main {
    background: linear-gradient(135deg, #E2E8F0, #A0AEC0, #E2E8F0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* ----------------------------------------
   FIXES FOR SILVER COLORS & DOLLAR
   ---------------------------------------- */

/* 1. Make USD in Silver Calculator Silver/Grey */
.calc-result-box.silver .c-res-sub {
    color: #718096 !important; 
    text-shadow: none !important;
}

[data-theme='dark'] .calc-result-box.silver .c-res-sub {
    color: #CBD5E0 !important;
}

/* 2. Fix 'Gram' unit color based on Page Context */
.page-gold .price-unit {
    color: var(--color-gold) !important;
    -webkit-text-fill-color: var(--color-gold) !important;
    background: none !important;
    font-weight: 500;
}

.page-silver .price-unit {
    color: #718096 !important; /* Silver/Cool Gray */
    -webkit-text-fill-color: #718096 !important;
    background: none !important;
    font-weight: 500;
}

[data-theme='dark'].page-silver .price-unit {
    color: #A0AEC0 !important;
    -webkit-text-fill-color: #A0AEC0 !important;
}



/* ----------------------------------------
   FIX TABLE ALIGNMENT ARABIC
   ---------------------------------------- */
[lang='ar'] .comparison-table th,
[lang='ar'] .comparison-table td {
    text-align: right !important;
}

/* Ensure table prices align right even if they are LTR numbers */
[lang='ar'] .table-price,
[lang='ar'] .table-usd,
[lang='ar'] .comparison-table td[id*='Price'] {
    text-align: right !important;
    /* direction: ltr is inherited from global rule for numbers, 
       but text-align needs to be forced to right for the cell content */
}


/* ----------------------------------------
   FIX MOBILE TITLES (Overflowing Text)
   ---------------------------------------- */
@media (max-width: 768px) {
  .page-title, 
  .hero-title {
    font-size: 1.75rem !important; /* Smaller font for mobile (approx var(--text-2xl)) */
    padding-left: 15px;
    padding-right: 15px;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  
  .page-subtitle,
  .hero-subtitle {
     font-size: 1rem !important;
     padding-left: 15px;
     padding-right: 15px;
  }
  
  .page-header {
      padding-top: 2rem !important;
      padding-bottom: 2rem !important;
  }
  
  /* Fix container padding on mobile if needed */
  .container {
      padding-left: 1rem;
      padding-right: 1rem;
  }
}


/* ----------------------------------------
   FIX HEADER LOGO ON MOBILE
   ---------------------------------------- */
@media (max-width: 600px) {
  /* Hide the text 'Goldpreis Live' or Arabic equivalent on mobile 
     to prevent overlapping with lang switchers */
  .logo span {
    display: none;
  }
  
  /* Ensure the icon 'Au' is visible and aligned */
  .logo {
    gap: 0; 
  }
  
  /* Adjust header padding if needed */
  .header-inner {
      gap: 10px;
  }
}


/* ----------------------------------------
   FIX HEADER LOGO ON MOBILE (REVISED)
   ---------------------------------------- */
@media (max-width: 600px) {
  /* REVEAL TEXT */
  .logo span {
    display: inline-block !important;
    font-size: 0.85rem; /* Adjust size to fit */
    white-space: nowrap;
  }
  
  /* HIDE ICON 'Au' */
  .logo-icon {
    display: none !important;
  }
  
  /* Adjust layout to maximize space for text */
  .logo {
    margin-right: auto; /* Push text to start */
    gap: 0;
  }
  [dir='rtl'] .logo {
      margin-right: 0;
      margin-left: auto;
  }
}


/* ----------------------------------------
   FIX KARAT GRID ON MOBILE (Force 1 Column)
   ---------------------------------------- */
@media (max-width: 600px) {
  .karat-grid-boxes {
    grid-template-columns: 1fr !important;
  }
}


/* ----------------------------------------
   MARKET STATUS BOX
   ---------------------------------------- */
.market-status-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.market-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.market-dot.dot-open {
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
  animation: marketPulse 2s infinite;
}
.market-dot.dot-closed {
  background: var(--color-danger);
  box-shadow: 0 0 8px var(--color-danger);
  animation: marketPulse 2s infinite;
}
@keyframes marketPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
.market-label {
  font-weight: 700;
  font-size: var(--text-sm);
}
.market-label.market-open {
  color: var(--color-success);
}
.market-label.market-closed {
  color: var(--color-danger);
}
.market-separator {
  color: var(--text-muted);
  opacity: 0.5;
}
.market-countdown-label {
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.market-countdown-value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-gold);
  font-size: var(--text-sm);
  letter-spacing: 0.5px;
}
@media (max-width: 480px) {
  .market-status-info {
    gap: var(--space-2);
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-3);
  }
  .market-countdown-value {
    font-size: var(--text-xs);
  }
}
/* ----------------------------------------
   WEIGHT BOX BUY LINKS
   ---------------------------------------- */
a.karat-box-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.karat-box-link .karat-box {
  cursor: pointer;
  position: relative;
}
a.karat-box-link:hover .karat-box {
  transform: translateY(-3px);
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
}
a.karat-box-link .buy-hint {
  display: none;
  font-size: var(--text-xs);
  color: var(--color-gold);
  font-weight: 600;
  margin-top: 0.5rem;
  transition: all var(--transition-fast);
}
a.karat-box-link:hover .buy-hint {
  display: block;
}
