/* ==========================================================================
   SawmMate - Ramadan Companion & Fasting Habit Tracker
   Stylesheet: Atmospheric Ramadan Night Sky & Productivity Theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=JetBrains+Mono:wght@400;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --bg-space: #060913;
  --bg-deep: #0b1124;
  --bg-navy: #111a36;
  --bg-card: rgba(18, 26, 52, 0.7);
  --bg-card-hover: rgba(26, 37, 72, 0.85);
  --bg-card-glass: rgba(16, 24, 48, 0.55);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(245, 158, 11, 0.25);
  --border-emerald: rgba(16, 185, 129, 0.3);
  
  /* Palette */
  --gold-primary: #f59e0b;
  --gold-hover: #d97706;
  --gold-light: #fbbf24;
  --gold-pale: #fef3c7;
  --gold-glow: rgba(245, 158, 11, 0.35);
  
  --emerald-primary: #10b981;
  --emerald-light: #34d399;
  --emerald-pale: #d1fae5;
  --emerald-glow: rgba(16, 185, 129, 0.3);

  --indigo-primary: #6366f1;
  --indigo-light: #818cf8;
  --purple-primary: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.35);

  --cyan-primary: #06b6d4;
  --rose-primary: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --shadow-glow-gold: 0 0 30px rgba(245, 158, 11, 0.2);
  --shadow-glow-emerald: 0 0 30px rgba(16, 185, 129, 0.2);

  --font-ui: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-arabic: 'Amiri', 'Traditional Arabic', serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-ui);
  background-color: var(--bg-space);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Atmospheric Starfield Canvas --- */
#star-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.aurora-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(99, 102, 241, 0.08) 35%, rgba(6, 9, 19, 0) 70%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

.aurora-glow-secondary {
  position: fixed;
  bottom: -150px;
  right: -100px;
  width: 800px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, rgba(16, 185, 129, 0.05) 40%, rgba(6, 9, 19, 0) 70%);
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
}

/* --- Layout Container --- */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* --- Header --- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.25rem 1.75rem;
  background: var(--bg-card-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
  position: relative;
  overflow: hidden;
}

.brand-icon-box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  animation: pulse-glow 4s ease-in-out infinite;
}

.brand-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.brand-title span.arabic-sub {
  font-family: var(--font-arabic);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-light);
  -webkit-text-fill-color: var(--gold-light);
}

.brand-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: var(--transition);
}

.badge-location {
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.3);
  cursor: pointer;
}

.badge-location:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.badge-hijri {
  background: rgba(245, 158, 11, 0.15);
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-streak {
  background: rgba(244, 63, 94, 0.15);
  color: #fecdd3;
  border-color: rgba(244, 63, 94, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-navy);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-icon.active {
  color: var(--gold-primary);
  border-color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.15);
}

/* --- Hero Section: Fasting Command Center --- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-countdown-card {
  background: linear-gradient(145deg, rgba(17, 24, 48, 0.85) 0%, rgba(26, 21, 56, 0.75) 100%);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow-gold);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.hero-countdown-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

.status-pill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.fasting-state-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: var(--transition);
}

.fasting-state-pill.fasting {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.fasting-state-pill.eating {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

.fasting-state-pill .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  position: relative;
}

.fasting-state-pill .pulse-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: ring-pulse 2s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
}

.digital-clock-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.countdown-main-wrap {
  text-align: center;
  padding: 1rem 0;
}

.countdown-target-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.countdown-digits {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.countdown-box {
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.15rem;
  min-width: 84px;
  text-align: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.countdown-box .num {
  font-family: var(--font-mono);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.countdown-box .label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

.countdown-sep {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold-primary);
  opacity: 0.7;
  animation: blink 1.5s ease-in-out infinite;
  margin-top: -1.2rem;
}

/* Fasting Progress Bar Card */
.hero-dial-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
  text-align: center;
}

.circular-progress-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  margin: 0.75rem auto;
}

.circular-progress-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 12;
}

.circle-progress {
  fill: none;
  stroke: url(#goldGradient);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.circle-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.circle-percent {
  font-size: 2.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
  line-height: 1;
}

.circle-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.35rem;
}

.progress-milestones {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(10, 15, 30, 0.5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.milestone-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.milestone-item.start {
  text-align: left;
}

.milestone-item.end {
  text-align: right;
}

.milestone-item .time-tag {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.milestone-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Quick Prayer Times Ribbon */
.prayers-ribbon {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
  background: var(--bg-card-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .prayers-ribbon {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
}

.prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: var(--transition);
  position: relative;
}

.prayer-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.prayer-item.active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

.prayer-item.active .prayer-name {
  color: var(--gold-light);
  font-weight: 700;
}

.prayer-item.active .prayer-time {
  color: #ffffff;
  font-weight: 700;
}

.prayer-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.prayer-time {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.prayer-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--gold-primary);
  color: #000;
  font-weight: 700;
  margin-top: 0.35rem;
}

/* Quick Sunnah & Eid Banners */
.quick-banners-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .quick-banners-row {
    grid-template-columns: 1fr;
  }
}

.sunnah-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sunnah-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sunnah-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--emerald-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sunnah-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.eid-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.eid-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.eid-days-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.eid-num {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.eid-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Navigation Tabs --- */
.nav-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-tab.active svg {
  color: var(--gold-light);
}

/* --- Section Views --- */
.tab-view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-view.active {
  display: block;
}

/* --- View 1: Daily Habit Tracker --- */
.habits-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Day Selector Navigator */
.day-navigator-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.day-nav-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.day-title-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.day-num-heading {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}

.ashra-badge {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ashra-1 {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.ashra-2 {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.ashra-3 {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.day-sub-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.btn-nav-day {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.btn-nav-day:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-nav-day:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-today {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--gold-light);
}

/* Fasting Status Banner */
.fasting-status-selector {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.status-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-options-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-opt-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.status-opt-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.status-opt-btn.active.fasted {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: var(--emerald-primary);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.status-opt-btn.active.excused {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border-color: var(--gold-primary);
}

.status-opt-btn.active.missed {
  background: rgba(244, 63, 94, 0.2);
  color: #fca5a5;
  border-color: var(--rose-primary);
}

/* Habit Sections Grid */
.habit-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 860px) {
  .habit-cards-grid {
    grid-template-columns: 1fr;
  }
}

.habit-category-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: var(--transition);
}

.habit-category-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

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

.card-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.card-icon-round {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.card-score {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Prayers List */
.prayers-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.prayer-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.prayer-check-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.prayer-check-row.completed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}

.custom-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-custom {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: transparent;
}

.checkbox-custom.checked {
  background: var(--emerald-primary);
  border-color: var(--emerald-primary);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.check-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.prayer-time-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-left: 0.25rem;
}

.jamaah-toggle-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.jamaah-toggle-btn.active {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  border-color: var(--indigo-primary);
}

/* Taraweeh & Tahajjud Steppers */
.stepper-card-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.stepper-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stepper-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.stepper-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stepper-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-step {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-step:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.step-value-display {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 48px;
  text-align: center;
  color: var(--gold-light);
}

.quick-rakah-presets {
  display: flex;
  gap: 0.35rem;
}

.preset-chip {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.preset-chip:hover, .preset-chip.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--gold-primary);
  color: #ffffff;
}

/* Quran Quick Logger in Daily Tracker */
.quran-daily-box {
  background: rgba(10, 15, 30, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quran-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.num-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-number {
  width: 75px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 1rem;
  text-align: center;
}

.input-number:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

/* Sunnah Challenge & Reflection Card */
.sunnah-challenge-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(20, 27, 54, 0.8) 0%, rgba(35, 25, 60, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.challenge-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.challenge-icon {
  font-size: 1.75rem;
}

.challenge-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-light);
}

.challenge-body-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #f1f5f9;
  padding: 1rem 1.25rem;
  background: rgba(10, 15, 30, 0.4);
  border-left: 4px solid var(--gold-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.reflection-textarea {
  width: 100%;
  min-height: 90px;
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  resize: vertical;
  transition: var(--transition);
}

.reflection-textarea:focus {
  outline: none;
  border-color: var(--purple-primary);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.25);
}

/* --- View 2: 30-Day Ramadan Timetable & Calendar --- */
.calendar-view-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timetable-header-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.timetable-info h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}

.timetable-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-today { background: var(--gold-primary); box-shadow: 0 0 8px var(--gold-primary); }
.dot-fasted { background: var(--emerald-primary); }
.dot-laylat { background: var(--purple-primary); }

.timetable-table-container {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow-x: auto;
  box-shadow: var(--shadow-md);
}

.ramadan-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.ramadan-table th {
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.ramadan-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.ramadan-table tr {
  cursor: pointer;
  transition: var(--transition);
}

.ramadan-table tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.ramadan-table tr.row-today {
  background: rgba(245, 158, 11, 0.12) !important;
  border-left: 4px solid var(--gold-primary);
}

.ramadan-table tr.row-today td {
  color: #ffffff;
  font-weight: 700;
}

.ramadan-table tr.row-odd-night {
  background: rgba(139, 92, 246, 0.06);
}

.cell-day-col {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-ui) !important;
  font-weight: 700;
  color: #ffffff;
}

.badge-laylat-mini {
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.cell-fast-duration {
  color: var(--cyan-primary);
  font-weight: 600;
}

.status-badge-table {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-family: var(--font-ui);
  font-weight: 600;
}

.status-badge-table.fasted {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.status-badge-table.excused {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.status-badge-table.upcoming {
  color: var(--text-dim);
}

/* --- View 3: Quran Khatm Planner --- */
.quran-planner-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quran-overview-card {
  background: linear-gradient(145deg, rgba(17, 24, 48, 0.85) 0%, rgba(20, 36, 56, 0.8) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow-emerald);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.khatm-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .khatm-stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.khatm-metric-box {
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-number {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--emerald-light);
}

/* Quran Linear Progress Bar */
.khatm-progress-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.khatm-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill-emerald {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald-primary) 0%, #34d399 50%, var(--gold-light) 100%);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* Pace Guide Calculator */
.pace-calculator-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pace-selector-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-pace-choice {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.btn-pace-choice:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.btn-pace-choice.active {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: var(--emerald-primary);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.pace-tip-banner {
  background: rgba(6, 182, 212, 0.1);
  border-left: 4px solid var(--cyan-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  color: #cffafe;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* 30-Juz Interactive Grid */
.juz-grid-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.juz-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

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

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

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

.juz-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.juz-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.juz-card.completed {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--emerald-primary);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.juz-card.completed .juz-num-badge {
  background: var(--emerald-primary);
  color: #ffffff;
}

.juz-num-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-light);
  transition: var(--transition);
}

.juz-surah-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
}

.juz-pages-info {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.juz-status-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.juz-card.completed .juz-status-text {
  color: var(--emerald-light);
}

/* --- View 4: Essential Ramadan Du'as --- */
.duas-view-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dua-hero-banner {
  background: linear-gradient(135deg, rgba(26, 21, 56, 0.85) 0%, rgba(18, 26, 52, 0.85) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.dua-cards-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dua-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.dua-card:hover {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: var(--shadow-md);
}

.dua-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.dua-badge-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-light);
}

.dua-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-audio-play {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--gold-pale);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-audio-play:hover {
  background: rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}

.btn-audio-play.playing {
  background: var(--gold-primary);
  color: #000;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.dua-arabic-text {
  font-family: var(--font-arabic);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 2.2;
  text-align: right;
  direction: rtl;
  color: #ffffff;
  padding: 0.5rem 0;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}

.dua-translit-text {
  font-size: 1rem;
  font-style: italic;
  color: #cbd5e1;
  line-height: 1.6;
}

.dua-english-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-left: 3px solid var(--gold-primary);
  padding-left: 1rem;
}

.dua-reference-tag {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* --- View 5: Gamification, Streaks & Badges --- */
.badges-view-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .stats-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-data {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
}

.stat-lbl {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Badges Grid */
.badges-section-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.badges-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1100px) {
  .badges-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

.badge-item-card {
  background: rgba(10, 15, 30, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.badge-item-card.locked {
  opacity: 0.45;
  filter: grayscale(0.8);
}

.badge-item-card.unlocked {
  opacity: 1;
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(145deg, rgba(20, 27, 54, 0.6) 0%, rgba(35, 25, 60, 0.4) 100%);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.badge-item-card.unlocked:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
}

.badge-emblem {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.badge-item-card.unlocked .badge-emblem {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
  border-color: var(--gold-light);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.badge-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.badge-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.badge-state-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.badge-item-card.unlocked .badge-state-tag {
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-light);
}

.badge-item-card.locked .badge-state-tag {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--bg-deep);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 580px;
  width: 100%;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-close-modal:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

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

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-select, .form-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-select:focus, .form-input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.form-select option {
  background: var(--bg-deep);
  color: #ffffff;
}

/* Preset Cities Grid */
.city-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.city-pill {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.city-pill:hover, .city-pill.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--gold-primary);
  color: #ffffff;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--gold-primary) 0%, #d97706 100%);
  color: #000000;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
  filter: brightness(1.1);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  background: rgba(16, 24, 48, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg), 0 0 25px rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition);
  pointer-events: auto;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

@keyframes ring-pulse {
  0% { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* --- Print Stylesheet for 30-Day Timetable --- */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  #star-canvas, .aurora-glow, .aurora-glow-secondary, .app-header, .hero-grid,
  .quick-banners-row, .nav-tabs-wrapper, .modal-overlay, .toast-container,
  .btn-print, .btn-icon, .timetable-legend {
    display: none !important;
  }

  .app-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tab-view {
    display: none !important;
  }

  #view-calendar {
    display: block !important;
  }

  .timetable-header-card {
    background: transparent !important;
    border: none !important;
    padding: 0 0 1rem 0 !important;
    color: #000000 !important;
  }

  .timetable-header-card h2 {
    color: #000000 !important;
    font-size: 1.5rem !important;
  }

  .timetable-table-container {
    background: transparent !important;
    border: 1px solid #000000 !important;
    box-shadow: none !important;
  }

  .ramadan-table th {
    background: #f1f5f9 !important;
    color: #000000 !important;
    border-bottom: 2px solid #000000 !important;
  }

  .ramadan-table td {
    color: #000000 !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  .cell-day-col {
    color: #000000 !important;
  }

  .badge-laylat-mini {
    border: 1px solid #000000 !important;
    color: #000000 !important;
    background: transparent !important;
  }
}

/* ==========================================================================
   Multi-Page Navigation, Content Hub & Universal Responsive Footer
   ========================================================================== */

/* --- Site-Wide Navigation Header --- */
.site-main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-main-nav .nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(18, 26, 52, 0.35);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.site-main-nav .nav-link:hover {
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}

.site-main-nav .nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(16, 185, 129, 0.2));
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

/* --- Breadcrumb Bar --- */
.breadcrumbs-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--bg-card-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.breadcrumbs-bar a {
  color: var(--gold-light);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumbs-bar a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.breadcrumbs-bar .sep {
  color: var(--text-dim);
}

.breadcrumbs-bar .current {
  color: var(--text-main);
  font-weight: 600;
}

/* --- Content Page Layout --- */
.content-page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0.5rem 3rem 0.5rem;
}

.article-hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.article-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-primary), var(--emerald-primary), var(--indigo-primary));
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(245, 158, 11, 0.35);
  margin-bottom: 1rem;
}

.article-main-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.article-lead-text {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 850px;
  margin-bottom: 1.5rem;
}

.article-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.article-meta-item strong {
  color: var(--text-main);
}

/* --- Content Main & Sidebar Layout --- */
.content-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  align-items: start;
}

.content-full-width {
  display: block;
  width: 100%;
}

.article-body-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.article-body-card h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-body-card h2:first-of-type {
  margin-top: 0;
}

.article-body-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.article-body-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.article-body-card p {
  font-size: 1rem;
  line-height: 1.8;
  color: #cbd5e1;
  margin-bottom: 1.25rem;
}

.article-body-card ul, .article-body-card ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: #cbd5e1;
  line-height: 1.8;
}

.article-body-card li {
  margin-bottom: 0.5rem;
}

.article-body-card strong {
  color: #ffffff;
}

/* --- Callout & Highlight Boxes --- */
.callout-box {
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  margin: 1.75rem 0;
  border-left: 4px solid var(--gold-primary);
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--gold-primary);
}

.callout-box.callout-emerald {
  border-left-color: var(--emerald-primary);
  background: rgba(16, 185, 129, 0.08);
}

.callout-box.callout-indigo {
  border-left-color: var(--indigo-light);
  background: rgba(99, 102, 241, 0.08);
}

.callout-box.callout-rose {
  border-left-color: var(--rose-primary);
  background: rgba(244, 63, 94, 0.08);
}

.callout-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.callout-box p:last-child {
  margin-bottom: 0;
}

/* --- Arabic Hadith / Quran Block --- */
.arabic-quote-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(17, 26, 54, 0.9));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 1.75rem 0;
  text-align: center;
}

.arabic-quote-text {
  font-family: var(--font-arabic);
  font-size: 1.75rem;
  line-height: 2.2;
  color: var(--gold-pale);
  direction: rtl;
  margin-bottom: 0.85rem;
}

.arabic-quote-translit {
  font-style: italic;
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
}

.arabic-quote-meaning {
  font-size: 0.95rem;
  font-weight: 500;
  color: #f1f5f9;
  line-height: 1.6;
}

.arabic-quote-source {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Modern Content Tables --- */
.content-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0 2rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(11, 17, 36, 0.6);
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.styled-table th {
  background: rgba(18, 26, 52, 0.9);
  color: var(--gold-light);
  padding: 0.9rem 1.1rem;
  font-weight: 700;
  border-bottom: 2px solid rgba(245, 158, 11, 0.3);
  white-space: nowrap;
}

.styled-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: #cbd5e1;
  line-height: 1.6;
}

.styled-table tr:hover {
  background: rgba(245, 158, 11, 0.04);
}

/* --- Table of Contents & Sidebar Sticky Card --- */
.sidebar-sticky-wrap {
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-nav-list li {
  margin-bottom: 0.5rem;
}

.toc-nav-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  display: block;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border-left: 2px solid transparent;
}

.toc-nav-list a:hover {
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.08);
  border-left-color: var(--gold-primary);
  padding-left: 0.85rem;
}

.sidebar-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-links-list li {
  margin-bottom: 0.65rem;
}

.sidebar-links-list a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.sidebar-links-list a:hover {
  color: var(--gold-light);
  transform: translateX(3px);
}

/* --- FAQ Accordions --- */
.faq-filter-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.faq-filter-btn {
  background: var(--bg-card-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.faq-filter-btn:hover, .faq-filter-btn.active {
  background: rgba(245, 158, 11, 0.2);
  color: #ffffff;
  border-color: var(--gold-primary);
}

.faq-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: rgba(245, 158, 11, 0.3);
}

.faq-question-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 1.25rem 1.5rem;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 1rem;
  transition: var(--transition);
}

.faq-question-btn:hover {
  color: var(--gold-light);
}

.faq-icon-indicator {
  font-size: 1.1rem;
  color: var(--gold-light);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon-indicator {
  transform: rotate(180deg);
}

.faq-answer-pane {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.5rem;
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer-pane {
  max-height: 1000px;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

/* --- Contact & Feedback Page Styles --- */
.contact-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 2rem;
  align-items: stretch;
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}

.contact-channel-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-channel-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.form-group-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
}

.form-group-field input,
.form-group-field select,
.form-group-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(11, 17, 36, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  transition: var(--transition);
}

.form-group-field input:focus,
.form-group-field select:focus,
.form-group-field textarea:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.form-group-field textarea {
  min-height: 120px;
  resize: vertical;
}

/* --- Universal Multi-Column Site Footer --- */
.site-footer {
  margin-top: 4rem;
  padding: 3.5rem 1.5rem 2rem 1.5rem;
  background: linear-gradient(180deg, rgba(11, 17, 36, 0.75) 0%, #05070d 100%);
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 10;
}

.footer-top-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1.1fr 1.1fr 1.1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

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

.footer-brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.footer-brand-title .arabic-small {
  font-family: var(--font-arabic);
  font-size: 1.15rem;
  color: var(--gold-light);
  font-weight: 700;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.footer-founder-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #cbd5e1;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  width: fit-content;
}

.footer-founder-badge strong {
  color: var(--gold-light);
}

.footer-contact-quick {
  font-size: 0.84rem;
  color: var(--text-dim);
}

.footer-contact-quick a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-contact-quick a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: var(--gold-primary);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-links li a:hover {
  color: var(--gold-light);
  transform: translateX(4px);
}

.footer-disclaimer-card {
  max-width: 1200px;
  margin: 0 auto 2.5rem auto;
  background: rgba(18, 26, 52, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.footer-disclaimer-card strong {
  color: var(--gold-light);
}

.footer-bottom-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-bottom-bar a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-bottom-bar a:hover {
  color: var(--gold-light);
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* --- Media Queries for Responsive Multi-Page Design --- */
@media (max-width: 992px) {
  .content-grid-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar-sticky-wrap {
    position: static;
  }
  
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .contact-layout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .article-hero-card {
    padding: 1.5rem;
  }
  
  .article-main-title {
    font-size: 1.6rem;
  }
  
  .article-body-card {
    padding: 1.5rem;
  }
  
  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .site-main-nav {
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
  }
}

