/* IhramPath — mobile-first styles. Logical properties used throughout for RTL. */
:root {
  --bg: #f7f5ef;
  --card: #ffffff;
  --ink: #1f2a24;
  --muted: #5c6b62;
  --brand: #0e6b4f;
  --brand-dark: #0a523d;
  --gold: #b98a1d;
  --gold-soft: #f6ecd4;
  --line: #e3ddd0;
  --danger: #b3261e;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20, 40, 30, 0.08), 0 4px 14px rgba(20, 40, 30, 0.06);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Segoe UI", "Noto Naskh Arabic", "Amiri", "Traditional Arabic", Tahoma, sans-serif;
  --font-ur: "Jameel Noori Nastaleeq", "Noto Nastaliq Urdu", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

html[lang="ar"] body { font-family: var(--font-ar); }
html[lang="ur"] body { font-family: var(--font-ur); line-height: 2; }

/* Arabic-script content (duas) always uses an Arabic-friendly stack */
.ar-text {
  font-family: var(--font-ar);
  direction: rtl;
  text-align: center;
  unicode-bidi: isolate;
}

.wrap { max-width: 1024px; margin-inline: auto; padding-inline: 1rem; }

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: #fff; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  background: var(--gold-soft); color: var(--brand-dark);
  display: grid; place-items: center; font-size: 1.4rem; font-weight: 700;
}
.brand-name { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.2px; }
.main-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-inline-start: auto; }
.main-nav a {
  color: #eaf4ee; text-decoration: none; padding: 0.45rem 0.7rem;
  border-radius: 8px; font-size: 0.95rem;
}
.main-nav a:hover, .main-nav a:focus-visible { background: rgba(255,255,255,0.16); color: #fff; }
.lang-picker { display: flex; align-items: center; gap: 0.4rem; }
.lang-picker label { font-size: 0.85rem; color: #dcefе6; }
.lang-picker select {
  font: inherit; padding: 0.4rem 0.6rem; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.12); color: #fff;
}
.lang-picker select option { color: #111; }

/* ---------- Hero ---------- */
.hero {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.6rem; margin-block: 1.25rem;
  border-top: 4px solid var(--gold);
}
.hero h1 { margin: 0 0 0.4rem; font-size: clamp(1.5rem, 4.5vw, 2.1rem); color: var(--brand-dark); }
.hero p { margin: 0.25rem 0; color: var(--muted); }
.hero .subline { font-size: 1.05rem; color: var(--ink); }

/* ---------- Sections & cards ---------- */
section.block {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.4rem; margin-block: 1.25rem;
}
section.block h2 { margin: 0 0 0.6rem; color: var(--brand-dark); font-size: 1.35rem; }
.section-intro { color: var(--muted); margin-top: 0; }

/* ---------- Forms ---------- */
.field { margin-block: 0.9rem; }
.field > label, fieldset > legend { font-weight: 600; display: block; margin-bottom: 0.35rem; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem; margin-block: 0.9rem; }
legend { padding-inline: 0.4rem; font-weight: 600; }
input[type="date"], select {
  font: inherit; padding: 0.6rem 0.7rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); width: 100%; max-width: 320px;
}
input[type="date"]:focus-visible, select:focus-visible,
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.radio-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.radio-card {
  border: 2px solid var(--line); border-radius: 10px; padding: 0.7rem 1.1rem;
  cursor: pointer; display: flex; align-items: center; gap: 0.5rem; font-weight: 600;
  background: #fff; transition: border-color 0.15s, background 0.15s;
}
.radio-card input { accent-color: var(--brand); width: 1.1rem; height: 1.1rem; }
.radio-card:has(input:checked) { border-color: var(--brand); background: #eef7f2; }
.radio-card:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.check-row { display: grid; gap: 0.55rem; margin-top: 0.4rem; }
.check-row label { display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer; }
.check-row input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: var(--brand); margin-top: 0.2rem; flex: none; }

.btn {
  font: inherit; font-weight: 700; border: none; border-radius: 10px; cursor: pointer;
  padding: 0.75rem 1.4rem; display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--brand-dark); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-row { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1rem; }

.form-errors {
  background: #fdecea; border: 1px solid #f5c6c2; color: var(--danger);
  border-radius: 10px; padding: 0.8rem 1rem; margin-top: 1rem;
}
.form-errors ul { margin: 0.3rem 0 0; padding-inline-start: 1.2rem; }
.empty-state { color: var(--muted); border: 2px dashed var(--line); border-radius: 10px; padding: 1.4rem; text-align: center; }

/* ---------- Plan output ---------- */
.plan-meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.4rem; }
.tips-box {
  background: var(--gold-soft); border: 1px solid #e7d3a0; border-radius: 10px;
  padding: 0.9rem 1.1rem; margin-block: 1rem;
}
.tips-box h3 { margin: 0 0 0.4rem; font-size: 1.05rem; color: #7a5c0e; }
.tips-box ul { margin: 0.2rem 0; padding-inline-start: 1.2rem; }
.tips-box li { margin-block: 0.25rem; }
.day-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem;
  margin-block: 0.8rem; background: #fff;
}
.day-card.sacred { border-inline-start: 5px solid var(--gold); background: #fffdf5; }
.day-head { display: flex; gap: 0.7rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 0.4rem; }
.day-num {
  background: var(--brand); color: #fff; font-weight: 700; font-size: 0.85rem;
  border-radius: 999px; padding: 0.15rem 0.7rem; white-space: nowrap;
}
.day-card.sacred .day-num { background: var(--gold); color: #3d2f05; }
.day-title { font-weight: 700; font-size: 1.08rem; }
.day-date { color: var(--muted); font-size: 0.9rem; margin-inline-start: auto; }
.day-notes { margin: 0.4rem 0; padding-inline-start: 1.2rem; color: var(--ink); }
.day-notes li { margin-block: 0.2rem; }
.mini-steps { margin: 0.5rem 0 0; padding: 0; list-style: none; }
.mini-steps li {
  padding: 0.45rem 0.7rem; background: #f2f7f4; border-radius: 8px;
  margin-block: 0.3rem; font-size: 0.95rem;
}
.mini-steps strong { color: var(--brand-dark); }

/* ---------- Ritual guide ---------- */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tab {
  font: inherit; font-weight: 700; padding: 0.55rem 1.1rem; border-radius: 999px;
  border: 2px solid var(--line); background: #fff; color: var(--muted); cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.step { border: 1px solid var(--line); border-radius: 10px; margin-block: 0.6rem; overflow: hidden; }
.step summary {
  cursor: pointer; padding: 0.85rem 1rem; font-weight: 700; list-style: none;
  display: flex; gap: 0.7rem; align-items: center; background: #fbfaf7;
}
.step summary::-webkit-details-marker { display: none; }
.step summary:hover { background: #f4f1e8; }
.step-num {
  background: var(--brand); color: #fff; border-radius: 50%; width: 1.9rem; height: 1.9rem;
  display: inline-grid; place-items: center; font-size: 0.95rem; flex: none;
}
.step-body { padding: 0 1.1rem 1rem; color: var(--ink); }
.step-time { font-size: 0.85rem; color: var(--muted); margin: 0.2rem 0 0.5rem; }
.step-body p { margin: 0; }

/* ---------- Checklists ---------- */
.filter-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.chip {
  font: inherit; font-size: 0.9rem; padding: 0.4rem 0.9rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; color: var(--muted);
}
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.progress { display: flex; align-items: center; gap: 0.7rem; margin: 0.8rem 0; font-size: 0.95rem; }
.progress-track { flex: 1; height: 10px; background: #ece7d9; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); width: 0%; transition: width 0.25s; }
.pack-cat { margin-block: 1.1rem; }
.pack-cat > h3 {
  font-size: 1.02rem; color: var(--brand-dark); margin: 0 0 0.4rem;
  padding-bottom: 0.3rem; border-bottom: 2px solid var(--gold-soft);
}
.pack-item, .doc-item {
  display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.5rem 0.2rem;
  border-bottom: 1px dotted var(--line); cursor: pointer;
}
.pack-item:last-child, .doc-item:last-child { border-bottom: none; }
.pack-item input, .doc-item input {
  width: 1.3rem; height: 1.3rem; accent-color: var(--brand); margin-top: 0.2rem; flex: none; cursor: pointer;
}
.pack-item .nm { font-weight: 600; }
.pack-item .nt, .doc-item .nt { display: block; font-size: 0.88rem; color: var(--muted); font-weight: 400; }
.pack-item.done .nm { text-decoration: line-through; color: var(--muted); }
.badge {
  font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 0.1rem 0.55rem;
  margin-inline-start: 0.4rem; vertical-align: middle; white-space: nowrap;
}
.badge-ihram { background: var(--gold-soft); color: #7a5c0e; border: 1px solid #e0c988; }
.doc-item .nm { font-weight: 600; }
.doc-item.done .nm { text-decoration: line-through; color: var(--muted); }

/* ---------- Duas ---------- */
.dua-grid { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
.dua-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; background: #fffdf8;
}
.dua-card h3 { margin: 0 0 0.4rem; color: var(--brand-dark); font-size: 1.02rem; }
.dua-ar { font-size: 1.35rem; line-height: 2.1; margin: 0.3rem 0; color: #123; }
.dua-meaning { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- Disclaimer / footer ---------- */
.disclaimer {
  border: 2px solid var(--gold); background: #fffdf5; border-radius: var(--radius);
  padding: 1.2rem 1.4rem; margin-block: 1.25rem;
}
.disclaimer h2 { color: #7a5c0e; margin-top: 0; font-size: 1.15rem; }
.site-footer {
  background: var(--brand-dark); color: #d7e8de; padding: 1.6rem 0 2rem; margin-top: 2rem;
  font-size: 0.92rem;
}
.site-footer p { margin: 0.3rem 0; }
.site-footer a { color: #fff; }

/* Ad-slot placeholders (monetization-ready; no real ads) */
.ad-slot {
  border: 1.5px dashed #9db8aa; border-radius: 8px; color: #9db8aa;
  text-align: center; padding: 0.9rem; margin-block: 1rem; font-size: 0.85rem;
  background: rgba(255,255,255,0.03);
}

/* Skip link */
.skip-link {
  position: absolute; inset-inline-start: 0.5rem; top: -3rem; z-index: 100;
  background: #fff; color: var(--brand-dark); padding: 0.5rem 1rem; border-radius: 8px;
  transition: top 0.15s;
}
.skip-link:focus { top: 0.5rem; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .dua-grid { grid-template-columns: 1fr 1fr; }
  .check-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .wrap { padding-inline: 1.5rem; }
  .hero { padding: 2.2rem; }
}

/* (Print styles live in print.css, linked with media="print".) */
