/* ===== 1. GLOBAL ROOT VARIABLES (LIGHT THEME) ===== */
:root {
  --bg-main: #f8fafc;        /* Off White / Light Slate */
  --bg-card: #ffffff;        /* Pure White Cards */
  --card-border: #e2e8f0;    /* Soft Gray Border */
  --primary-accent: #0f172a; /* Slate Black */
  --primary-hover: #1e293b;
  --gold-accent: #d97706;    /* Premium Gold Amber */
  --text-main: #0f172a;      /* Dark Text */
  --text-muted: #64748b;     /* Subtitle Text */
  --success: #047857;        /* Emerald Green */
}

/* ===== 2. RESET & BASE STYLES ===== */
* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

html { 
  scroll-behavior: smooth; 
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 3. HEADER & NAVBAR ===== */
header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--card-border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-gold { color: var(--gold-accent); }
.logo-white { color: var(--text-main); }

nav {
  display: flex;
  gap: 15px;
  align-items: center;
}

nav a {
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
  padding: 6px 12px;
  border-radius: 6px;
}

nav a:hover { 
  color: var(--gold-accent); 
}

.btn-travel {
  background: var(--primary-accent) !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  transition: background 0.2s !important;
}

.btn-travel:hover {
  background: var(--primary-hover) !important;
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-accent);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-card);
  padding: 20px;
  gap: 12px;
  border-bottom: 1px solid var(--card-border);
}

.mobile-menu.active { 
  display: flex; 
}

.mobile-menu a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
}

/* ===== 4. COMPACT HERO SECTION ===== */
.hero-section {
  background: #ffffff;
  border-bottom: 1px solid var(--card-border);
  padding: 24px 15px 20px 15px;
  text-align: center;
  width: 100%;
}

.hero-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 auto 6px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.5px;
}

.hero-icon { 
  font-size: 1.5rem; 
}

.hero-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0 auto 14px auto;
  font-weight: 500;
  direction: rtl;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  text-align: center;
}

.hero-status-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto;
}

.live-dot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ecfdf5;
  color: var(--success);
  border: 1px solid #a7f3d0;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseAnimation 1.8s infinite;
}

@keyframes pulseAnimation {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-time-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

#updateTime {
  color: var(--text-main);
  font-weight: 700;
}

/* ===== 5. SINGLE-LINE CONTINUOUS MARQUEE TICKER ===== */
.rates-ticker-wrapper {
  max-width: 1200px;
  margin: 15px auto;
  padding: 0 16px;
  background: #0b0f19;
  border-radius: 14px;
  border: 1px solid #1e293b;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  height: 75px;
}

.rates-ticker-track {
  display: flex;
  width: max-content;
  animation: tickerScroll 26s linear infinite;
}

.rates-ticker-wrapper:hover .rates-ticker-track {
  animation-play-state: paused;
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 12px;
}

.ticker-badge {
  font-size: 13px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.tola-badge {
  background: #ffcc00;
  color: #0b0f19;
}

.gram-badge {
   background: #ffcc00;
  color: #0b0f19;
  
}

.rate-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #151c2c;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid #28334e;
  white-space: nowrap;
}

.rate-pill .k-tag {
  color: #ffcc00;
  font-weight: 800;
  font-size: 14px;
}

.rate-pill .val {
  color: #ffffff;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.3px;
}

@keyframes tickerScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ===== 6. MAIN SECTIONS & HEADINGS ===== */
.section {
  padding: 50px 0;
  background: var(--bg-main);
}

.section-title {
  text-align: center;
  margin-bottom: 35px;
}

.section-title h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-accent);
  margin-bottom: 6px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== 7. CURRENCY GRID ===== */
.currency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.currency-card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s;
}

.currency-card:hover {
  transform: translateX(4px);
}

.currency-flag { 
  font-size: 2.2rem; 
}

.currency-info { 
  flex: 1; 
}

.currency-info h3 {
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 700;
}

.currency-info p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.currency-rate { 
  text-align: right; 
}

.rate-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold-accent);
}

.rate-change {
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 600;
}

/* ===== 8. ZAKAT & CONVERTER CARDS ===== */
.zakat-card, .converter-card {
  max-width: 580px;
  margin: 24px auto;
  padding: 24px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.zakat-header-bar, .converter-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.zakat-header-bar h3, .converter-header-bar h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 700;
}

.zakat-grid, .converter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.zakat-field, .converter-field {
  display: flex;
  flex-direction: column;
}

.zakat-field label, .converter-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 5px;
}

.zakat-field input, 
.converter-field input, 
.converter-field select,
.currency-selector-wrap select {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  background: #f8fafc;
  color: var(--text-main);
  font-weight: 500;
  transition: border-color 0.2s;
}

.zakat-field input:focus, 
.converter-field input:focus, 
.converter-field select:focus {
  border-color: var(--gold-accent);
  background: #ffffff;
}

.zakat-status-box, .converter-status-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  text-align: center;
}

.zakat-result-value, .converter-result-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 6px;
}

.btn-pdf-export {
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  background: var(--primary-accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-pdf-export:hover {
  background: var(--primary-hover);
}

.zakat-disclaimer, .converter-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.4;
  text-align: center;
}

/* ===== 9. TRADINGVIEW CHART WRAPPER ===== */
.chart-wrapper {
  width: 100%;
  max-width: 1100px;
  height: 560px;
  margin: 20px auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  background: #131722;
}

/* ===== 10. FAQ TIPS GRID ===== */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.tip-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.tip-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== 11. FOOTER ===== */
footer {
  background: #ffffff;
  border-top: 1px solid var(--card-border);
  padding: 45px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.footer-brand p { 
  color: var(--text-muted); 
  font-size: 0.85rem; 
}

.footer-links h4, .footer-disclaimer h4 {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-links a:hover { 
  color: var(--gold-accent); 
}

.footer-disclaimer p {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ===== 12. RESPONSIVE & MOBILE ENHANCEMENTS ===== */
@media (max-width: 768px) {
  nav { display: none; }
  .hamburger { display: block; }
  
  .hero-section {
    padding: 16px 12px 14px 12px !important;
  }
  .hero-title {
    font-size: 1.25rem !important;
  }
  .hero-subtitle {
    font-size: 0.85rem !important;
    margin-bottom: 10px !important;
  }
  .hero-status-row {
    gap: 6px !important;
  }
  .live-dot-badge, .hero-time-badge {
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
  }

  .rates-ticker-wrapper {
    height: 70px;
    margin: 10px 12px;
    padding: 0 10px;
  }

  .rate-pill {
    padding: 6px 12px;
  }

  .rate-pill .val {
    font-size: 13px;
  }

  .chart-wrapper {
    height: 420px;
  }
}

@media (max-width: 520px) {
  .zakat-grid, .converter-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .umrah-header-bar {
    flex-direction: column;
    align-items: center !important;
    text-align: center !important;
    gap: 12px;
  }

  .umrah-title-wrap {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }

  .umrah-title-wrap h3 {
    font-size: 1.1rem;
    text-align: center;
  }

  .umrah-title-wrap p {
    text-align: center;
    font-size: 0.8rem;
  }

  .btn-all-umrah {
    margin: 0 auto;
    display: inline-block;
  }

  .umrah-ticker-wrapper {
    height: 80px;
  }

  .city-badge {
    font-size: 18px;
    padding: 5px 8px;
  }

  .pkg-pill {
    padding: 5px 10px;
  }

  .pkg-price {
    font-size: 18px;
  }
}