/* RamadanPro - Core Stylesheet */
/* Premium Islamic Aesthetic: Deep Emerald, Gold Accents, Soft Cream Background */

/* --- Google Fonts Integration --- */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Custom Property Tokens --- */
:root {
  --font-latin: 'Inter', sans-serif;
  --font-arabic: 'Amiri', serif;
  
  /* Color Palette */
  --bg-color: #FFFBEB; /* Cream background */
  --text-color: #1F2937; /* Dark Slate Gray */
  --primary-emerald: #059669; /* Emerald Green */
  --primary-emerald-hover: #047857;
  --primary-emerald-light: #D1FAE5;
  --accent-gold: #D97706; /* Golden Ochre */
  --accent-gold-hover: #B45309;
  --accent-gold-light: #FEF3C7;
  
  --card-bg: #FFFFFF;
  --card-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.08), 0 8px 10px -6px rgba(5, 150, 105, 0.05);
  --border-color: #F3F4F6;
  --border-gold: #F59E0B;
  
  --success-green: #10B981;
  --error-red: #EF4444;
  --transition-speed: 0.3s;
}

/* --- Dark Mode Override Tokens --- */
[data-theme="dark"] {
  --bg-color: #07130E; /* Deep Dark Emerald-Slate */
  --text-color: #FFFBEB; /* Soft Cream text */
  --primary-emerald: #10B981; /* Lighter/Vibrant Emerald */
  --primary-emerald-hover: #34D399;
  --primary-emerald-light: #065F46;
  --accent-gold: #F59E0B;
  --accent-gold-hover: #FBBF24;
  --accent-gold-light: #78350F;
  
  --card-bg: #0E241B; /* Solid deep card green */
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 5px 15px -5px rgba(16, 185, 129, 0.1);
  --border-color: #163B2C;
  --border-gold: #D97706;
}

/* --- Base Resets & Layout --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

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

body {
  font-family: var(--font-latin);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

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

[dir="rtl"] .font-title {
  font-family: var(--font-arabic);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.font-serif {
  font-family: var(--font-arabic);
}

/* --- Premium Background Elements --- */
.svg-bg-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
}
[data-theme="dark"] .svg-bg-stars {
  opacity: 0.18;
}

/* --- Global Utilities --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.section-padding {
  padding: 5rem 0;
}

/* --- Header / Navigation Bar --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 251, 235, 0.85); /* Glassmorphic cream */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217, 119, 6, 0.15);
}

[data-theme="dark"] header {
  background-color: rgba(7, 19, 14, 0.85);
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--primary-emerald);
  font-size: 1.5rem;
  font-weight: 800;
}

.logo svg {
  fill: var(--accent-gold);
  width: 2.2rem;
  height: 2.2rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition-speed);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-emerald);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* --- Button Styling --- */
.btn-primary {
  background-color: var(--primary-emerald);
  color: #FFFFFF;
  border: none;
  border-radius: 9999px;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.2);
  transition: all var(--transition-speed);
}

.btn-primary:hover {
  background-color: var(--primary-emerald-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(5, 150, 105, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-emerald);
  border: 2px solid var(--primary-emerald);
  border-radius: 9999px;
  padding: 0.5rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-speed);
}

.btn-secondary:hover {
  background-color: var(--primary-emerald-light);
  transform: translateY(-1px);
}

.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(217, 119, 6, 0.25);
  transition: background-color var(--transition-speed);
}

.theme-toggle-btn:hover {
  background-color: rgba(217, 119, 6, 0.08);
}

.lang-select {
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  padding: 0.35rem 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}

/* --- Hero Section & Countdowns --- */
.hero-section {
  text-align: center;
  padding: 4rem 0 2rem;
  position: relative;
}

.badge {
  background-color: var(--accent-gold-light);
  color: var(--accent-gold);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.hero-title {
  font-size: 2.75rem;
  color: var(--primary-emerald);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 2.5rem;
  opacity: 0.85;
}

/* Primary Ramadan Countdown Card */
.main-countdown-card {
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(5, 150, 105, 0.05) 100%);
  border: 2px solid var(--border-gold);
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.main-countdown-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.countdown-label {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.countdown-digits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.countdown-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.countdown-number {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary-emerald);
  font-family: var(--font-latin);
}

.countdown-unit {
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.7;
  margin-top: 0.5rem;
  text-transform: uppercase;
}

/* Secondary Eid Cards */
.eid-countdowns-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.eid-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.eid-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.eid-timer {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-emerald);
}

.eid-date {
  font-size: 0.8rem;
  opacity: 0.65;
}

/* --- Premium Grid & Cards System --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.card-title {
  font-size: 1.35rem;
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title svg {
  fill: var(--accent-gold);
  width: 1.5rem;
  height: 1.5rem;
}

/* --- Prayer Calculator Section --- */
.prayer-calculator-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-wrapper {
  position: relative;
}

.search-input-container {
  display: flex;
  gap: 0.75rem;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.01);
}

.search-input:focus {
  border-color: var(--primary-emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Autocomplete Suggestion Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  margin-top: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-height: 250px;
  overflow-y: auto;
  z-index: 50;
  list-style: none;
}

.autocomplete-item {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-speed);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background-color: var(--primary-emerald-light);
  color: var(--primary-emerald-hover);
}

/* Next Prayer Banner */
.next-prayer-banner {
  background-color: var(--accent-gold-light);
  border-left: 5px solid var(--accent-gold);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

[dir="rtl"] .next-prayer-banner {
  border-left: none;
  border-right: 5px solid var(--accent-gold);
}

.next-prayer-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold-hover);
}

.next-prayer-time {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-color);
}

/* Prayer Timings grid */
.prayer-times-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.prayer-time-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prayer-time-card.current {
  background-color: #D1FAE5; /* Soft glowing emerald */
  border: 2px solid var(--success-green);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .prayer-time-card.current {
  background-color: #064E3B;
  border: 2px solid var(--primary-emerald);
}

.prayer-name {
  font-weight: 700;
  font-size: 1rem;
  opacity: 0.85;
}

.prayer-time-card.current .prayer-name {
  color: var(--primary-emerald-hover);
}
[data-theme="dark"] .prayer-time-card.current .prayer-name {
  color: #34D399;
}

.prayer-time-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-emerald);
  font-family: var(--font-latin);
}

.prayer-time-card.current .prayer-time-value {
  transform: scale(1.05);
}

/* --- Iftar & Suhur Highlight Cards --- */
.iftar-suhur-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.milestone-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.milestone-icon {
  background-color: var(--accent-gold-light);
  border-radius: 50%;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.milestone-icon svg {
  fill: var(--accent-gold);
  width: 1.75rem;
  height: 1.75rem;
}

.milestone-info {
  display: flex;
  flex-direction: column;
}

.milestone-label {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.7;
}

.milestone-time {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-emerald);
  font-family: var(--font-latin);
}

.milestone-countdown {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
}

/* --- Ramadan 30-Day Calendar Table --- */
.table-wrapper {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

[dir="rtl"] .calendar-table {
  text-align: right;
}

.calendar-table th {
  background-color: var(--primary-emerald);
  color: #FFFFFF;
  font-weight: 700;
  padding: 1rem;
  font-size: 0.95rem;
}

.calendar-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
  font-weight: 500;
}

.calendar-table tbody tr:hover {
  background-color: rgba(5, 150, 105, 0.03);
}

.calendar-table tbody tr.today-highlight {
  background-color: var(--accent-gold-light) !important;
  border: 2px solid var(--accent-gold);
}

.calendar-table tbody tr.today-highlight td {
  font-weight: 700;
}

/* --- Qibla Compass Graphics --- */
.compass-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
}

.compass-rim {
  width: 220px;
  height: 220px;
  border: 4px solid var(--primary-emerald);
  border-radius: 50%;
  position: relative;
  background-color: var(--card-bg);
  box-shadow: inset 0 0 20px rgba(5, 150, 105, 0.15), var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.compass-rose {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  pointer-events: none;
}

.rose-n { position: absolute; top: 8px; color: var(--accent-gold); }
.rose-s { position: absolute; bottom: 8px; }
.rose-e { position: absolute; right: 10px; }
.rose-w { position: absolute; left: 10px; }

.qibla-needle {
  width: 8px;
  height: 180px;
  position: relative;
  z-index: 10;
  transform: rotate(0deg);
  transition: transform 1.2s cubic-bezier(0.25, 0.1, 0.25, 1.2);
}

/* Needle visual design */
.qibla-needle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 90px solid var(--accent-gold); /* Mecca Pointer */
}

.qibla-needle::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 90px solid var(--primary-emerald);
}

.compass-center {
  width: 16px;
  height: 16px;
  background-color: var(--card-bg);
  border: 3px solid var(--accent-gold);
  border-radius: 50%;
  position: absolute;
  z-index: 20;
}

.compass-info-box {
  margin-top: 1.5rem;
  text-align: center;
  font-weight: 700;
  color: var(--accent-gold-hover);
  font-size: 1.1rem;
}

/* --- Zakat Calculator Form --- */
.zakat-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

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

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.85;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  color: var(--text-color);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary-emerald);
}

.zakat-result-box {
  background-color: var(--primary-emerald-light);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px dashed var(--primary-emerald);
}

[data-theme="dark"] .zakat-result-box {
  background-color: #064E3B;
}

.zakat-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.zakat-grand-total {
  font-size: 1.85rem;
  color: var(--accent-gold-hover);
  font-family: var(--font-latin);
}

.nisab-badge-info {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(5, 150, 105, 0.15);
  padding-top: 0.5rem;
}

/* --- Tasbih Counter Widget --- */
.tasbih-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.tasbih-main-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 6px solid var(--primary-emerald);
  background-color: var(--card-bg);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: transform 0.1s ease;
}

.tasbih-main-circle:active {
  transform: scale(0.96);
}

.tasbih-main-circle::before {
  content: "";
  position: absolute;
  width: 208px;
  height: 208px;
  border: 2px dashed var(--accent-gold);
  border-radius: 50%;
  pointer-events: none;
}

.tasbih-count {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary-emerald);
  line-height: 1;
  font-family: var(--font-latin);
}

.tasbih-target {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-top: 0.25rem;
}

.tasbih-controls {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.tasbih-preset-btn {
  background-color: var(--border-color);
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-color);
  flex-grow: 1;
  text-align: center;
  transition: all var(--transition-speed);
}

.tasbih-preset-btn.active {
  background-color: var(--accent-gold-light);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

/* --- Daily Hadith Display --- */
.hadith-quote-box {
  position: relative;
  padding: 1.5rem;
  background-color: var(--primary-emerald-light);
  border-radius: 1rem;
  border-left: 4px solid var(--primary-emerald);
  margin-bottom: 1.25rem;
}

[dir="rtl"] .hadith-quote-box {
  border-left: none;
  border-right: 4px solid var(--primary-emerald);
}

[data-theme="dark"] .hadith-quote-box {
  background-color: #064E3B;
}

.hadith-arabic {
  font-family: var(--font-arabic);
  font-size: 1.65rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.25rem;
  line-height: 1.6;
  color: var(--text-color);
}

.hadith-translation {
  font-style: italic;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.hadith-source {
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
  color: var(--accent-gold);
}
[dir="rtl"] .hadith-source {
  text-align: left;
}

/* --- Hijri Date Converter Layout --- */
.tabs-header {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.5rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-color);
  border-bottom: 3px solid transparent;
}

.tab-btn.active {
  border-bottom-color: var(--primary-emerald);
  color: var(--primary-emerald);
}

/* --- Single Ad Bar (clean horizontal strip) --- */
.ad-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, #0a1610 0%, #111f18 50%, #0a1610 100%);
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: 0.6rem;
  padding: 0.7rem 1.5rem 0.7rem 5.5rem;
  margin: 1rem 0 1.5rem;
  min-height: 42px;
}
.ad-bar .ad-label {
  position: absolute;
  top: 0.35rem;
  left: 0.55rem;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 251, 235, 0.35);
  pointer-events: none;
  user-select: none;
}
.ad-bar .ad-sponsored {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-gold);
  white-space: nowrap;
}
.ad-bar .ad-cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: #FFFBEB;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 251, 235, 0.25);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.ad-bar .ad-cta:hover {
  color: var(--accent-gold);
  text-decoration-color: var(--accent-gold);
}
@media (max-width: 600px) {
  .ad-bar {
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1rem 0.8rem;
    text-align: center;
  }
}

/* --- Footer Area --- */
footer {
  background-color: #0B1A13; /* Deep emerald-charcoal footer */
  color: #FFFBEB;
  padding: 3rem 0;
  border-top: 3px solid var(--accent-gold);
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  color: #FFFFFF;
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo svg {
  fill: var(--accent-gold);
  width: 2.2rem;
  height: 2.2rem;
}

.footer-desc {
  font-size: 0.85rem;
  opacity: 0.75;
}

.footer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #FFFBEB;
  text-decoration: none;
  font-size: 0.875rem;
  opacity: 0.8;
  transition: opacity var(--transition-speed), color var(--transition-speed);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary-emerald);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 251, 235, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* --- Responsive Media Queries (Mobile First) --- */
@media (max-width: 1024px) {
  .dashboard-grid {
    gap: 1.25rem;
  }
  .col-8, .col-4, .col-6 {
    grid-column: span 12;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  
  .nav-container {
    height: auto;
    flex-direction: column;
    padding: 1rem 0;
    gap: 1rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .countdown-digits {
    gap: 0.75rem;
  }
  
  .countdown-number {
    font-size: 2.25rem;
  }
  
  .eid-countdowns-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .prayer-times-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
  
  .prayer-time-value {
    font-size: 1.4rem;
  }
  
  .iftar-suhur-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .zakat-form-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .prayer-times-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Print Friendly Styles (Strict overrides for Calendars & PDFs) --- */
@media print {
  body {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    font-family: serif !important;
    font-size: 12pt !important;
  }
  
  header,
  footer,
  .hero-section,
  .badge,
  .main-countdown-card,
  .eid-countdowns-container,
  .next-prayer-banner,
  .search-wrapper,
  .autocomplete-dropdown,
  .btn-primary,
  .btn-secondary,
  .theme-toggle-btn,
  .lang-select,
  .compass-container,
  .zakat-form-grid,
  .tasbih-widget,
  .hadith-quote-box,
  .tabs-header,
  .ad-bar,
  .card-header,
  #map-section,
  .form-group,
  button {
    display: none !important;
  }
  
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .section-padding {
    padding: 0 !important;
  }
  
  .dashboard-grid {
    display: block !important;
  }
  
  .card {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  #calendar-section {
    display: block !important;
    page-break-before: always;
  }
  
  .calendar-title {
    font-size: 18pt !important;
    color: #000000 !important;
    text-align: center !important;
    margin-bottom: 20pt !important;
  }
  
  .calendar-table {
    border: 1px solid #000000 !important;
  }
  
  .calendar-table th {
    background-color: #ECECEC !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
  }
  
  .calendar-table td {
    color: #000000 !important;
    border: 1px solid #000000 !important;
  }
  
  .calendar-table tr.today-highlight {
    background-color: transparent !important;
    font-weight: normal !important;
  }
}
