/* ============================================================
   Hajj4All — Design tokens & global styles
   Palette: warm desert sand + deep teal + ka'aba black + gold
   ============================================================ */
:root {
  --sand-50: #faf6ef;
  --sand-100: #f4ece0;
  --sand-200: #e8dcc6;
  --sand-300: #d7c4a3;
  --sand-400: #b99a6b;

  --ink-1: #1a1814;
  --ink-2: #4a443a;
  --ink-3: #7a7266;
  --ink-4: #a69d8f;

  --primary:      #0f4f47;  /* deep teal, like kiswa-stitching green */
  --primary-2:    #0a3833;
  --primary-soft: #d9e7e4;

  --gold:   #b48a3c;
  --gold-2: #8a6622;
  --gold-soft: #f3e9d2;

  --kaaba: #1a1814;

  --danger: #9a3b2c;
  --danger-soft: #f5d9d2;
  --warn: #b8792a;
  --warn-soft: #f7e7cd;
  --ok: #3a6d4a;
  --ok-soft: #d4e5d9;

  --line:     #e8dcc6;
  --line-2:   #d7c4a3;
  --surface:  #fffdf8;
  --surface-2:#faf6ef;

  --shadow-sm: 0 1px 2px rgba(26,24,20,0.04), 0 1px 3px rgba(26,24,20,0.06);
  --shadow-md: 0 4px 12px rgba(26,24,20,0.06), 0 2px 4px rgba(26,24,20,0.04);
  --shadow-lg: 0 20px 40px rgba(26,24,20,0.08), 0 8px 16px rgba(26,24,20,0.05);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  --ff-body: 'IBM Plex Sans Arabic', -apple-system, sans-serif;
  --ff-display: 'Amiri', 'IBM Plex Sans Arabic', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  color: var(--ink-1);
  background: var(--sand-50);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01";
}

/* Subtle islamic-pattern bg texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(180,138,60,0.04) 0, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(15,79,71,0.03) 0, transparent 40%);
  pointer-events: none;
  z-index: -1;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ================= HEADER ================= */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--ff-display); font-weight: 700;
  color: var(--primary-2); text-decoration: none; letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--primary-2);
  flex-shrink: 0;
}
.brand-name {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-size: 1.25rem; line-height: 1;
}
.brand-name .bn-lead { font-weight: 700; color: var(--primary-2); }
.brand-name .bn-dot  { color: var(--gold); font-weight: 400; transform: translateY(-1px); }
.brand-name .bn-tail { font-weight: 500; color: var(--primary-2); opacity: 0.88; }
@media (max-width: 520px) {
  .brand-name { font-size: 1.1rem; }
  .brand-mark svg { width: 30px; height: 30px; }
}
.nav { display: flex; gap: 6px; align-items: center; }
.nav-item {
  padding: 8px 14px; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  transition: all 0.2s;
}
.nav-item:hover { background: var(--sand-100); color: var(--primary); }
.lang-switch {
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--ink-2); text-decoration: none;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em;
  margin-right: 6px;
}
.lang-switch:hover { background: var(--sand-100); }

@media (max-width: 860px) {
  .nav { display: none; }
}

/* ================= HERO ================= */
.hero { padding: 40px 24px 32px; }
.hero-grid {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px;
  align-items: stretch;
  margin-bottom: 32px;
}
.hero-greeting {
  font-family: var(--ff-display);
  color: var(--gold-2); font-size: 1.25rem; margin-bottom: 10px;
}
.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.2; font-weight: 700;
  color: var(--ink-1);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.hero-sub {
  font-size: 1.12rem; color: var(--ink-2);
  max-width: 56ch; text-wrap: pretty;
  margin-bottom: 28px;
}
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-family: var(--ff-body); font-weight: 600; font-size: 0.98rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink-1); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--sand-100); }
.btn-sm { padding: 8px 14px; font-size: 0.86rem; }

/* Countdown */
.countdown {
  background: linear-gradient(160deg, var(--kaaba) 0%, #2a2720 100%);
  color: #fff9e8;
  padding: 28px;
  border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
}
.countdown::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(180,138,60,0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,138,60,0.14) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.3;
  mask: linear-gradient(to bottom, transparent, black 40%);
  -webkit-mask: linear-gradient(to bottom, transparent, black 40%);
}
.countdown > * { position: relative; }
.countdown-label { font-size: 0.88rem; color: var(--gold); letter-spacing: 0.04em; margin-bottom: 6px; font-weight: 500; }
.countdown-hajj-date {
  font-family: var(--ff-display); font-size: 1.4rem; font-weight: 700;
  color: #fff9e8;
}
.countdown-boxes {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.countdown-box {
  background: rgba(255,249,232,0.07);
  border: 1px solid rgba(180,138,60,0.25);
  padding: 14px 8px; border-radius: 12px; text-align: center;
}
.countdown-num {
  font-family: var(--ff-display); font-size: 2rem; font-weight: 700;
  line-height: 1; color: var(--gold); font-feature-settings: "tnum";
}
.countdown-unit { font-size: 0.75rem; color: var(--sand-300); margin-top: 4px; }
.countdown-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; border-top: 1px solid rgba(180,138,60,0.2);
  font-size: 0.85rem; color: var(--sand-300);
}
.countdown-temp { display: flex; align-items: center; gap: 6px; color: var(--gold); }

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

/* Quick tiles */
.quick-tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none; color: var(--ink-1);
  transition: all 0.2s;
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
}
.tile:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.tile-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center;
  margin-bottom: 10px;
}
.tile-label { font-family: var(--ff-display); font-weight: 700; font-size: 1.1rem; }
.tile-hint { font-size: 0.84rem; color: var(--ink-3); }

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

/* ================= STAGES RAIL ================= */
.stages-rail {
  margin-top: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.stages-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.stages-head h3 { font-family: var(--ff-display); font-size: 1.25rem; font-weight: 700; }
.stages-progress { font-size: 0.9rem; color: var(--primary-2); background: var(--primary-soft); padding: 5px 12px; border-radius: 999px; font-weight: 500; }

.stages-list {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  position: relative;
}
.stages-list::before {
  content: ''; position: absolute; top: 20px; right: 6%; left: 6%;
  height: 2px; background: var(--line-2);
  z-index: 0;
}
.stage {
  position: relative; z-index: 1; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-top: 2px;
}
.stage-dot {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--sand-100); border: 2px solid var(--line-2);
  display: grid; place-items: center;
  font-family: var(--ff-display); font-weight: 700; color: var(--ink-3);
  font-size: 1rem;
  transition: all 0.3s;
}
.stage.done .stage-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.stage.current .stage-dot { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-2); box-shadow: 0 0 0 4px rgba(180,138,60,0.15); }
.stage-name { font-weight: 600; font-size: 0.94rem; }
.stage-count { font-size: 0.78rem; color: var(--ink-3); }
@media (max-width: 720px) {
  .stages-list { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .stages-list::before { display: none; }
}

/* ================= SECTION ================= */
.section { padding: 64px 24px; }
.section-head { text-align: center; margin-bottom: 36px; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em;
  color: var(--gold-2); text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 700; color: var(--ink-1);
  letter-spacing: -0.01em; margin-bottom: 12px;
  text-wrap: balance;
}
.section-sub {
  font-size: 1.05rem; color: var(--ink-2); max-width: 62ch; margin: 0 auto;
  text-wrap: pretty;
}

/* Panel + Card + Field */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  transition: all 0.2s;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 500; color: var(--ink-2); }
.field input, .field select {
  font-family: inherit; font-size: 0.98rem;
  padding: 11px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-1);
  transition: all 0.2s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ================= CHECKLIST ================= */
.checklist-wrap {
  display: grid; grid-template-columns: 260px 1fr; gap: 24px;
  align-items: start;
}
.checklist-side {
  position: sticky; top: 96px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.side-title { font-size: 0.78rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.profile-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.profile-chip {
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2);
  color: var(--ink-2); font-family: inherit; font-size: 0.88rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.profile-chip:hover { border-color: var(--primary); }
.profile-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.side-divider { height: 1px; background: var(--line); margin: 14px 0; }

.checklist-main { display: flex; flex-direction: column; gap: 12px; }
.phase-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.phase-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  cursor: pointer; user-select: none;
  background: var(--surface);
}
.phase-head:hover { background: var(--sand-50); }
.phase-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--sand-100); color: var(--primary);
  display: grid; place-items: center;
  font-family: var(--ff-display); font-weight: 700; font-size: 1rem;
  flex-shrink: 0;
}
.phase-block.open .phase-mark { background: var(--primary); color: #fff; }
.phase-title-wrap { flex: 1; min-width: 0; }
.phase-title { font-family: var(--ff-display); font-size: 1.18rem; font-weight: 700; }
.phase-sub { font-size: 0.84rem; color: var(--ink-3); margin-top: 2px; }
.phase-progress {
  font-size: 0.82rem; color: var(--ink-3);
  background: var(--sand-100); padding: 4px 10px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.phase-caret { color: var(--ink-3); transition: transform 0.3s; flex-shrink: 0; }
.phase-block.open .phase-caret { transform: rotate(180deg); }
.phase-items {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease;
  border-top: 1px solid transparent;
}
.phase-block.open .phase-items {
  max-height: 2000px;
  border-top-color: var(--line);
}
.check-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 20px; cursor: pointer; user-select: none;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.check-item:last-child { border-bottom: none; }
.check-item:hover { background: var(--sand-50); }
.check-box {
  width: 22px; height: 22px; border-radius: 6px;
  border: 1.8px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center;
  flex-shrink: 0; transition: all 0.2s;
  margin-top: 2px;
}
.check-box svg { opacity: 0; color: #fff; }
.check-item.done .check-box { background: var(--primary); border-color: var(--primary); }
.check-item.done .check-box svg { opacity: 1; }
.check-item.done .check-text { color: var(--ink-3); text-decoration: line-through; }
.check-content { flex: 1; }
.check-text { font-size: 0.98rem; font-weight: 500; color: var(--ink-1); line-height: 1.5; }
.check-note { font-size: 0.82rem; color: var(--ink-3); margin-top: 2px; }
.check-critical {
  font-size: 0.7rem; font-weight: 600; color: var(--danger);
  background: var(--danger-soft);
  padding: 2px 8px; border-radius: 999px; margin-right: 8px;
  display: inline-block; vertical-align: middle;
}

@media (max-width: 860px) {
  .checklist-wrap { grid-template-columns: 1fr; }
  .checklist-side { position: static; }
}

/* ================= TODAY ================= */
.today-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.today-main { display: flex; flex-direction: column; gap: 14px; }
.day-tab {
  padding: 10px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2);
  font-family: inherit; font-size: 0.9rem; font-weight: 500;
  color: var(--ink-2); cursor: pointer; transition: all 0.2s;
}
.day-tab:hover { border-color: var(--primary); }
.day-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.day-head-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff9e8; padding: 22px 24px; border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
.day-head-card::before {
  content: ''; position: absolute; top: -40px; left: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(180,138,60,0.25), transparent 70%);
}
.day-head-card > * { position: relative; }
.day-head-label { font-size: 0.82rem; color: var(--gold); letter-spacing: 0.06em; margin-bottom: 4px; }
.day-head-title { font-family: var(--ff-display); font-size: 1.9rem; font-weight: 700; }

.step {
  display: flex; gap: 16px; padding: 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step-time {
  width: 72px; flex-shrink: 0; padding-top: 2px;
  font-family: var(--ff-display); font-weight: 700; color: var(--gold-2);
  font-size: 1rem; text-align: right;
  border-left: 2px solid var(--gold-soft);
  padding-left: 16px;
}
.step-body h4 { font-family: var(--ff-display); font-size: 1.12rem; margin-bottom: 4px; }
.step-body p { color: var(--ink-2); font-size: 0.95rem; }

.prayer-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px;
  position: sticky; top: 96px;
}
.prayer-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.prayer-head h3 { font-family: var(--ff-display); font-size: 1.15rem; }
.prayer-city { font-size: 0.82rem; color: var(--ink-3); }
.prayer-list { display: flex; flex-direction: column; gap: 2px; }
.prayer-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 4px;
}
.prayer-row.next {
  background: var(--gold-soft); border-radius: 8px;
  padding: 9px 10px;
  color: var(--gold-2);
}
.prayer-name { font-weight: 500; }
.prayer-time { font-family: var(--ff-display); font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) { .today-wrap { grid-template-columns: 1fr; } .prayer-card { position: static; } }

/* ================= MAP ================= */
.map-wrap {
  display: grid; grid-template-columns: 1fr 340px; gap: 24px;
  align-items: start;
}
.map-canvas {
  background:
    radial-gradient(ellipse at 30% 40%, rgba(216,196,163,0.4), transparent 60%),
    linear-gradient(135deg, #f4ede0 0%, #ead9b9 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm) inset;
}
.map-canvas::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 60% 70%, rgba(122,114,102,0.12) 0, transparent 35%),
    radial-gradient(circle at 25% 25%, rgba(122,114,102,0.10) 0, transparent 30%);
}
.map-svg { width: 100%; height: 100%; }

.map-pin {
  cursor: pointer;
  transition: all 0.3s;
}
.map-pin-circle { fill: var(--primary); stroke: #fff; stroke-width: 0.35; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2)); transition: all 0.3s; }
.map-pin-text { fill: #fff; font-family: var(--ff-display); font-weight: 700; font-size: 2.2px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.map-pin:hover .map-pin-circle { fill: var(--gold); transform-box: fill-box; transform-origin: center; }
.map-pin.active .map-pin-circle { fill: var(--gold); r: 3.5; }

.map-line { stroke: var(--primary); stroke-width: 0.25; stroke-dasharray: 0.6 0.6; fill: none; opacity: 0.5; }

.map-legend {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px;
  max-height: 600px; overflow-y: auto;
}
.map-legend-item {
  display: flex; gap: 12px; padding: 12px; border-radius: 12px;
  cursor: pointer; transition: background 0.2s;
  border-bottom: 1px solid var(--line);
}
.map-legend-item:last-child { border-bottom: none; }
.map-legend-item:hover { background: var(--sand-50); }
.map-legend-item.active { background: var(--primary-soft); }
.ml-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--ff-display); font-weight: 700;
  font-size: 0.9rem;
}
.map-legend-item.active .ml-num { background: var(--gold); }
.ml-body { flex: 1; }
.ml-title { font-family: var(--ff-display); font-weight: 700; font-size: 1rem; margin-bottom: 2px; }
.ml-meta { font-size: 0.8rem; color: var(--ink-3); }
.ml-desc { font-size: 0.88rem; color: var(--ink-2); margin-top: 6px; display: none; line-height: 1.55; }
.map-legend-item.active .ml-desc { display: block; }

@media (max-width: 900px) { .map-wrap { grid-template-columns: 1fr; } }

/* ================= COUNTER ================= */
.counter-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; margin: 0 auto; }
.counter-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px;
  text-align: center;
}
.counter-kind {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--gold-2); background: var(--gold-soft);
  padding: 3px 12px; border-radius: 999px; margin-bottom: 8px;
}
.counter-title { font-family: var(--ff-display); font-size: 1.08rem; color: var(--ink-2); margin-bottom: 20px; }
.counter-ring {
  position: relative; width: 180px; height: 180px; margin: 0 auto;
}
.counter-ring svg { transform: rotate(-90deg); }
.counter-ring-bg { fill: none; stroke: var(--sand-100); stroke-width: 8; }
.counter-ring-fill { fill: none; stroke: var(--primary); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.4s ease; }
.counter-num-wrap {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.counter-current { font-family: var(--ff-display); font-size: 3.6rem; font-weight: 700; line-height: 1; color: var(--primary); font-feature-settings: "tnum"; }
.counter-of { font-size: 0.85rem; color: var(--ink-3); margin-top: 4px; }

.counter-controls { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.counter-btn {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line-2);
  color: var(--ink-1); cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.15s;
}
.counter-btn:hover { border-color: var(--primary); }
.counter-btn.primary {
  width: 64px; height: 64px;
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.counter-btn.primary:hover { background: var(--primary-2); transform: scale(1.04); }
.counter-btn:active { transform: scale(0.95); }

@media (max-width: 720px) { .counter-wrap { grid-template-columns: 1fr; } }

/* ================= DUAS ================= */
.duas-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.duas-nav {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px;
  position: sticky; top: 96px;
}
.dua-tab {
  padding: 10px 14px; border-radius: 10px;
  background: transparent; border: none; color: var(--ink-2);
  font-family: inherit; font-size: 0.94rem; font-weight: 500;
  cursor: pointer; text-align: right; transition: all 0.2s;
}
.dua-tab:hover { background: var(--sand-50); color: var(--primary); }
.dua-tab.active { background: var(--primary-soft); color: var(--primary-2); font-weight: 600; }

.dua-display {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px;
}
.dua-moment { font-size: 0.86rem; color: var(--gold-2); margin-bottom: 8px; }
.dua-heading { font-family: var(--ff-display); font-size: 1.9rem; font-weight: 700; margin-bottom: 24px; color: var(--ink-1); }
.dua-arabic {
  font-family: var(--ff-display); font-size: 1.75rem;
  line-height: 2; color: var(--primary-2);
  padding: 22px 26px; background: var(--sand-50);
  border-radius: var(--radius); border-right: 3px solid var(--gold);
  margin-bottom: 20px;
  text-wrap: balance;
}
.dua-translit { font-style: italic; color: var(--ink-3); margin-bottom: 14px; font-size: 1rem; direction: ltr; text-align: left; font-family: 'Amiri', serif; }
.dua-meaning { color: var(--ink-2); line-height: 1.8; text-wrap: pretty; }
@media (max-width: 820px) { .duas-wrap { grid-template-columns: 1fr; } .duas-nav { position: static; flex-direction: row; overflow-x: auto; flex-wrap: nowrap; } .dua-tab { white-space: nowrap; } }

/* ================= PILGRIM CARD ================= */
.pcard {
  width: 100%; max-width: 420px;
  background: linear-gradient(135deg, var(--kaaba) 0%, #2a2720 100%);
  color: #fff9e8;
  border-radius: 20px;
  padding: 24px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.pcard::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(180,138,60,0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,138,60,0.13) 1px, transparent 1px);
  background-size: 20px 20px;
  mask: linear-gradient(135deg, transparent, black 50%);
  -webkit-mask: linear-gradient(135deg, transparent, black 50%);
}
.pcard > * { position: relative; }
.pcard-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; }
.pcard-label { font-size: 0.72rem; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 6px; }
.pcard-name { font-family: var(--ff-display); font-size: 1.5rem; font-weight: 700; }
.pcard-qr {
  width: 62px; height: 62px; background: #fff9e8; border-radius: 10px;
  color: var(--kaaba); display: grid; place-items: center; padding: 8px;
}
.pcard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.pcard-field-label { font-size: 0.68rem; color: var(--sand-300); letter-spacing: 0.04em; margin-bottom: 2px; }
.pcard-field-val { font-family: var(--ff-display); font-size: 1.02rem; color: #fff9e8; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.pcard-bottom { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid rgba(180,138,60,0.25); font-size: 0.8rem; color: var(--sand-300); }
.pcard-bottom strong { color: var(--gold); font-family: var(--ff-display); }

/* ================= BUDGET ================= */
.calc-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 980px; margin: 0 auto; }
.calc-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.calc-out {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff9e8; border-radius: var(--radius-lg); padding: 32px;
  position: relative; overflow: hidden;
}
.calc-out::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(180,138,60,0.3), transparent 70%);
}
.calc-out > * { position: relative; }
.calc-out-label { font-size: 0.85rem; color: var(--gold); letter-spacing: 0.06em; margin-bottom: 8px; }
.calc-out-total { font-family: var(--ff-display); font-size: 3.2rem; font-weight: 700; line-height: 1; margin-bottom: 24px; font-feature-settings: "tnum"; }
.calc-break { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.break-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed rgba(180,138,60,0.3); font-size: 0.94rem; }
.break-row:last-child { border-bottom: none; }
.break-label { color: var(--sand-300); }
.break-val { font-family: var(--ff-display); font-weight: 600; color: #fff9e8; font-variant-numeric: tabular-nums; }
.calc-save {
  padding: 14px 16px; background: rgba(180,138,60,0.16);
  border-radius: 12px; font-size: 0.92rem; text-align: center;
  border: 1px solid rgba(180,138,60,0.3);
}
.calc-save strong { color: var(--gold); font-family: var(--ff-display); font-size: 1.3rem; display: block; margin: 4px 0; }
@media (max-width: 860px) { .calc-wrap { grid-template-columns: 1fr; } }

/* ================= FAQ ================= */
.faq { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.faq-item-v2 {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.faq-q-v2 {
  padding: 16px 20px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  font-family: var(--ff-display); font-weight: 700; font-size: 1.08rem;
  user-select: none;
}
.faq-caret { color: var(--ink-3); transition: transform 0.3s; flex-shrink: 0; }
.faq-item-v2.open .faq-caret { transform: rotate(180deg); }
.faq-a-v2 {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
  color: var(--ink-2); line-height: 1.75;
}
.faq-item-v2.open .faq-a-v2 { max-height: 400px; padding: 0 20px 18px; }

/* ================= FOOTER ================= */
.footer {
  background: var(--kaaba); color: var(--sand-200);
  padding: 56px 24px 28px; margin-top: 80px;
  position: relative; overflow: hidden;
}
.footer::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(180,138,60,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,138,60,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask: linear-gradient(to bottom, black, transparent);
  -webkit-mask: linear-gradient(to bottom, black, transparent);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  position: relative;
}
.footer-brand-block h3 { font-family: var(--ff-display); color: var(--gold); font-size: 1.5rem; margin-bottom: 10px; }
.footer-brand-block p { color: var(--sand-300); max-width: 42ch; line-height: 1.7; }
.footer h4 { font-family: var(--ff-display); color: var(--gold); margin-bottom: 12px; font-size: 1rem; }
.footer a { display: block; color: var(--sand-300); text-decoration: none; font-size: 0.9rem; padding: 4px 0; transition: color 0.2s; }
.footer a:hover { color: var(--gold); }
.footer-bottom {
  max-width: 1200px; margin: 36px auto 0; padding-top: 22px;
  border-top: 1px solid rgba(180,138,60,0.2);
  font-size: 0.82rem; color: var(--ink-4); text-align: center; line-height: 1.7;
  position: relative;
}
@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-inner { grid-template-columns: 1fr; } }

/* Print */
@media print {
  .no-print, .header, .footer, .checklist-side, .prayer-card, .counter-wrap, .calc-form, .duas-nav { display: none !important; }
  body, .section { background: #fff; padding: 0; }
  .phase-block, .phase-items { max-height: none !important; overflow: visible !important; border-top-color: var(--line) !important; }
  .phase-block.open .phase-items, .phase-items { max-height: none !important; border-top: 1px solid var(--line); }
  .phase-caret { display: none; }
}

/* ============ HAJJ4ALL ADDITIONS ============ */
.h4a-box{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:24px;margin:16px 0;}
.h4a-muted{font-size:.85rem;color:var(--text-2);}
.h4a-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;}
.h4a-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:20px;transition:all .2s;color:var(--text-1);}
.h4a-card:hover{transform:translateY(-3px);box-shadow:0 4px 16px rgba(0,0,0,.08);border-color:var(--accent);}
.h4a-card h3{font-size:.95rem;margin-bottom:4px;}
.h4a-tag{display:inline-block;margin-top:8px;padding:3px 10px;border-radius:6px;font-size:.72rem;font-weight:500;background:rgba(var(--accent-rgb),.08);color:var(--accent);}
.btn-accent{background:var(--accent);color:white;}
.btn-accent:hover{opacity:.9;}
#sync-code::placeholder{color:var(--text-3);}
@media print{.h4a-box,.h4a-grid,.h4a-card,#videos,#guides,[style*="background:var(--accent)"]{display:none!important;}}
