/* ============================================================
   THE PATH TO WATER — Layout
   Hero, navigation, TOC drawer, content area, footer, disclaimer
   ============================================================ */

/* ── Hero Section ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(170deg, #faf8f4 0%, #f0ece5 40%, #e8e3db 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(45,106,79,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-bismillah {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.3s forwards;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.6s forwards;
}

.hero-subtitle {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.8s forwards;
}

.hero-arabic {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.9s forwards;
  font-family: var(--serif);
}

.hero-desc {
  max-width: 600px;
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s ease 1s forwards;
}

.hero-level {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s ease 1.1s forwards;
}

.hero-scroll {
  opacity: 0;
  animation: fadeUp 1s ease 1.4s forwards;
  cursor: pointer;
  color: var(--text-lighter);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}
.hero-scroll:hover { color: var(--accent); }

.hero-scroll svg {
  display: block;
  margin: 0.5rem auto 0;
  animation: bobDown 2s ease-in-out infinite;
}


/* ── Navigation Bar ── */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,248,244,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0;
  transition: box-shadow 0.3s;
}
.nav-bar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.06); }

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.5rem;
}

.nav-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.nav-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle svg { width: 16px; height: 16px; }

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

/* ── Site-Wide Page Navigation ── */
.page-nav-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s;
}
.page-nav-toggle:hover { background: var(--accent); color: #fff; }
.page-nav-toggle svg { width: 16px; height: 16px; }

.page-nav-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(44,42,38,0.3);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.page-nav-overlay.open { opacity: 1; pointer-events: all; }

.page-nav-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(380px, 85vw);
  background: var(--bg);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  padding: 2rem 1.5rem;
}
.page-nav-overlay.open .page-nav-drawer { transform: translateX(0); }

.page-nav-drawer h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.page-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.page-nav-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s;
}
.page-nav-close:hover { background: var(--border-light); }

.page-nav-list { list-style: none; }
.page-nav-list li { margin-bottom: 0.3rem; }

.page-nav-list a {
  display: block;
  padding: 0.8rem 1rem;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all 0.2s;
  line-height: 1.4;
}
.page-nav-list a:hover { background: var(--bg-aside); color: var(--text); }
.page-nav-list a.active {
  background: var(--bg-barakah);
  color: var(--accent);
  font-weight: 600;
}

.page-nav-list .page-nav-label {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
}
.page-nav-list a:hover .page-nav-label { color: var(--accent); }
.page-nav-list a.active .page-nav-label { color: var(--accent); }

.page-nav-list .page-nav-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-lighter);
  margin-top: 0.15rem;
}


/* ── Table of Contents Drawer ── */
.toc-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(44,42,38,0.3);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.toc-overlay.open { opacity: 1; pointer-events: all; }

.toc-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(380px, 85vw);
  background: var(--bg);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  padding: 2rem 1.5rem;
}
.toc-overlay.open .toc-drawer { transform: translateX(0); }

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.toc-header h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
}

.toc-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s;
}
.toc-close:hover { background: var(--border-light); }

.toc-list { list-style: none; }
.toc-list li { margin-bottom: 0.15rem; }

.toc-list a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.92rem;
  border-radius: 8px;
  transition: all 0.2s;
  line-height: 1.4;
}
.toc-list a:hover { background: var(--bg-aside); color: var(--text); }
.toc-list a .toc-num {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.5rem;
  font-size: 0.85rem;
}


/* ── Main Content Area ── */
.content {
  max-width: 740px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}


/* ── Section (Article) Blocks ── */
.section {
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.section.visible { opacity: 1; transform: translateY(0); }

.section-num {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.section h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

.section h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.section p {
  margin-bottom: 1.1rem;
  color: var(--text);
  line-height: 1.8;
}


/* ── Disclaimer ── */
.disclaimer {
  max-width: 740px;
  margin: 0 auto 0;
  padding: 1.5rem;
  background: var(--bg-aside);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
  text-align: center;
}
.disclaimer strong { color: var(--text); }


/* ── Divider ── */
.divider {
  width: 60px;
  height: 2px;
  background: var(--border);
  margin: 3rem auto;
}


/* ── Footer ── */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-lighter);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-light);
  margin-top: 2rem;
}
