/* ============================================================
   NoorAlFajr — Islamic Elements
   Geometric patterns, decorative borders, Arabic ornaments
   ============================================================ */

/* ─── Islamic Geometric Background ─── */
.geometric-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%2310b981' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Hexagonal Islamic lattice pattern */
.pattern-lattice {
  background-color: var(--primary-900);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23f59e0b' fill-opacity='0.1'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.33V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L13.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Star pattern overlay */
.pattern-stars {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23f59e0b' fill-opacity='0.05'%3E%3Ccircle cx='40' cy='40' r='4'/%3E%3Cpath d='M40 0l3 12-3 3-3-3L40 0zm0 80l3-12-3-3-3 3L40 80zM0 40l12 3 3-3-3-3L0 40zm80 0l-12 3-3-3 3-3L80 40z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ─── Crescent Moon Icon ─── */
.crescent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
  font-size: 1.5rem;
  color: white;
  box-shadow: var(--shadow-green);
}

/* ─── Ornamental Divider ─── */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-8) 0;
}
.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-300), transparent);
}
.ornament-divider .ornament-icon {
  font-size: 1.25rem;
  color: var(--gold-500);
  text-shadow: 0 0 10px rgba(245,158,11,0.4);
}

/* ─── Golden Frame ─── */
.gold-frame {
  border: 2px solid var(--gold-400);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  position: relative;
}
.gold-frame::before {
  content: '✦';
  position: absolute;
  top: -0.7rem; left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg-card);
  color: var(--gold-500);
  padding: 0 var(--space-2);
  font-size: 0.9rem;
}

/* ─── Green Border Glow ─── */
.green-glow {
  box-shadow: 0 0 20px rgba(16,185,129,0.3), 0 0 40px rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.4);
}

/* ─── Prayer Direction Lines ─── */
.prayer-mosque-icon {
  font-size: 2.5rem;
  text-align: center;
  filter: drop-shadow(0 2px 8px rgba(16,185,129,0.4));
}

/* ─── Bismillah Banner ─── */
.bismillah-banner {
  background: var(--gradient-dark-brand);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  border-radius: var(--radius-2xl);
  position: relative;
  overflow: hidden;
}
.bismillah-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.bismillah-banner .bismillah-text {
  font-family: 'Scheherazade New', var(--font-arabic);
  font-size: 2rem;
  color: var(--gold-300);
  direction: rtl;
  text-shadow: 0 2px 12px rgba(245,158,11,0.3);
  position: relative;
  z-index: 1;
}
.bismillah-banner .bismillah-sub {
  color: rgba(255,255,255,0.7);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
  position: relative;
  z-index: 1;
}

/* ─── Tasbeeh Counter ─── */
.tasbeeh-counter-circle {
  width: 200px; height: 200px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 0 6px rgba(16,185,129,0.15),
              0 0 0 12px rgba(16,185,129,0.08),
              var(--shadow-xl);
  transition: transform var(--transition-bounce), box-shadow var(--transition-fast);
  user-select: none;
  -webkit-user-select: none;
}
.tasbeeh-counter-circle:active {
  transform: scale(0.92);
  box-shadow: 0 0 0 4px rgba(16,185,129,0.2), var(--shadow-md);
}
.tasbeeh-count { color: white; font-size: var(--text-5xl); font-weight: var(--fw-extrabold); font-family: var(--font-english); line-height: 1; }
.tasbeeh-label { color: rgba(255,255,255,0.85); font-size: var(--text-xs); font-weight: var(--fw-medium); margin-top: 4px; }

/* Bead row */
.bead-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: var(--space-4); }
.bead {
  width: 14px; height: 14px;
  border-radius: var(--radius-full);
  background: var(--gray-200);
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.bead.filled { background: var(--primary-400); transform: scale(1.2); }
.bead.group-end { margin-right: 8px; }

/* ─── Names of Allah Cards ─── */
.name-card {
  perspective: 1000px;
  cursor: pointer;
}
.name-card-inner {
  width: 100%;
  min-height: 140px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.name-card:hover .name-card-inner { transform: rotateY(180deg); }
.name-card-front, .name-card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  text-align: center;
}
.name-card-front {
  background: var(--gradient-brand);
  color: white;
}
.name-card-front .name-arabic {
  font-family: var(--font-arabic);
  font-size: 1.75rem;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.name-card-front .name-number {
  position: absolute; top: var(--space-3); right: var(--space-3);
  background: rgba(255,255,255,0.2);
  color: white;
  width: 24px; height: 24px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: var(--fw-bold);
  font-family: var(--font-english);
}
.name-card-back {
  background: var(--gold-50);
  border: 2px solid var(--gold-200);
  transform: rotateY(180deg);
}
.name-card-back .name-transliteration { color: var(--gold-700); font-weight: var(--fw-semibold); font-size: var(--text-lg); }
.name-card-back .name-meaning { color: var(--gray-600); font-size: var(--text-sm); margin-top: var(--space-2); }

/* ─── Adhkar Progress Tracker ─── */
.adhkar-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-card);
  margin-bottom: var(--space-4);
  transition: all var(--transition-fast);
}
.adhkar-item.done {
  border-color: var(--primary-200);
  background: var(--primary-50);
}
.adhkar-count-badge {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gold-300);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: var(--fw-bold);
  color: var(--gold-700);
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition-bounce);
}
.adhkar-count-badge:hover, .adhkar-count-badge.done {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: white;
  transform: scale(1.1);
}

/* ─── Qibla Compass ─── */
.compass-wrapper {
  position: relative;
  width: 280px; height: 280px;
  margin: 0 auto;
}
.compass-rose {
  width: 100%; height: 100%;
  border-radius: var(--radius-full);
  border: 3px solid var(--primary-200);
  background: radial-gradient(circle, white 0%, var(--primary-50) 100%);
  box-shadow: inset 0 0 30px rgba(16,185,129,0.08), var(--shadow-xl);
  position: relative;
  overflow: hidden;
  transition: transform 0.1s ease;
}
.compass-needle {
  position: absolute;
  top: 50%; left: 50%;
  width: 4px;
  transform-origin: bottom center;
  transform: translate(-50%, -100%) rotate(0deg);
}
.compass-needle-qibla {
  background: var(--gradient-gold);
  height: 120px;
  border-radius: 4px 4px 0 0;
  position: relative;
}
.compass-needle-qibla::after {
  content: '🕋';
  position: absolute;
  top: -30px; left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
}
.compass-north {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  font-weight: var(--fw-bold); font-size: var(--text-sm);
  color: var(--gray-400);
}
.compass-aligned .compass-needle-qibla { background: var(--gradient-brand); }

/* ─── Islamic Calendar Cell ─── */
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}
.cal-day:hover { background: var(--primary-50); }
.cal-day.today {
  background: var(--gradient-brand);
  color: white;
  font-weight: var(--fw-bold);
  box-shadow: var(--shadow-green);
}
.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: var(--radius-full);
  background: var(--gold-500);
}
.cal-day.islamic-event { border: 1px solid var(--gold-300); }
.cal-hijri { font-size: 0.6rem; color: var(--gold-600); }
