/* ============================================
   Design System
   ============================================ */
:root {
  --bg: #fafbfd;
  --bg-subtle: #f1f4f9;
  --surface: #ffffff;
  --text: #0f1729;
  --text-secondary: #475467;
  --text-tertiary: #98a2b3;
  --border: #eaecf0;
  --border-subtle: #f2f4f7;
  --brand: #6366f1;
  --brand-light: #818cf8;
  --brand-soft: #eef2ff;
  --brand-dark: #4f46e5;
  --success: #10b981;
  --success-soft: #ecfdf5;
  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --danger-dark: #dc2626;
  --info: #3b82f6;
  --info-soft: #eff6ff;
  --purple: #8b5cf6;
  --purple-soft: #f5f3ff;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --shadow-xs: 0 1px 2px rgba(16,24,40,0.05);
  --shadow-sm: 0 1px 3px rgba(16,24,40,0.1), 0 1px 2px rgba(16,24,40,0.06);
  --shadow-md: 0 4px 8px -2px rgba(16,24,40,0.1), 0 2px 4px -2px rgba(16,24,40,0.06);
  --shadow-lg: 0 12px 16px -4px rgba(16,24,40,0.08), 0 4px 6px -2px rgba(16,24,40,0.03);
  --shadow-xl: 0 20px 24px -4px rgba(16,24,40,0.08), 0 8px 8px -4px rgba(16,24,40,0.03);
  --sidebar-w: 240px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.2s;
  --duration-md: 0.3s;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 80px; }
body {
  min-height: 100vh;
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.rtl { font-family: 'Noto Sans Arabic', system-ui, sans-serif; direction: rtl; text-align: right; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

/* ============================================
   Quick Exit Button
   ============================================ */
.quick-exit {
  position: fixed;
  top: 72px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: all var(--duration) var(--ease);
  cursor: pointer;
}
.quick-exit:hover { background: var(--bg-subtle); border-color: var(--text-tertiary); transform: translateY(-1px); }
.rtl .quick-exit { right: auto; left: 24px; }

/* ============================================
   Floating Emergency Button
   ============================================ */
.fab-emergency {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--danger);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 20px rgba(239,68,68,0.4);
  transition: all var(--duration) var(--ease);
}
.fab-emergency:hover {
  background: var(--danger-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(239,68,68,0.5);
}
.rtl .fab-emergency { right: auto; left: 24px; }

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250,251,253,0.9);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}
.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--brand);
  color: white;
  border-radius: var(--radius-md);
}
.logo-icon-sm { width: 28px; height: 28px; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-switcher {
  display: flex;
  gap: 3px;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}
.lang-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-tertiary);
  transition: all var(--duration) var(--ease);
}
.lang-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.lang-btn:hover:not(.active) { color: var(--text-secondary); }
.nav-cta {
  display: inline-flex;
  padding: 7px 16px;
  background: var(--danger);
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--duration) var(--ease);
}
.nav-cta:hover { background: var(--danger-dark); }

/* ============================================
   Layout: Sidebar + Main
   ============================================ */
.layout {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 60px;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 60px;
  width: var(--sidebar-w);
  height: calc(100vh - 60px);
  flex-shrink: 0;
  padding: 24px 16px;
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
  background: var(--surface);
}
.rtl .sidebar { border-right: none; border-left: 1px solid var(--border-subtle); }
.sidebar-nav { display: flex; flex-direction: column; gap: 20px; }
.sidebar-section { display: flex; flex-direction: column; gap: 2px; }
.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: 0 12px;
  margin-bottom: 4px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
}
.sidebar-link:hover { background: var(--bg-subtle); color: var(--text); }
.sidebar-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.sidebar-link svg { flex-shrink: 0; opacity: 0.7; }
.sidebar-link.active svg { opacity: 1; }

/* Main Content */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 0 40px 80px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}
.btn-lg { padding: 14px 28px; font-size: 0.95rem; }
.btn-primary { background: var(--brand); color: white; box-shadow: 0 1px 2px rgba(99,102,241,0.3); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.35); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-subtle); border-color: var(--text-tertiary); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: var(--danger-dark); transform: translateY(-1px); }
.btn-outline-danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-outline-danger:hover { background: var(--danger-soft); }
.btn-outline { background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border); }
.btn-outline:hover { background: var(--bg-subtle); border-color: var(--text-tertiary); }

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  padding: 60px 0 48px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.hero-orb-1 { width: 400px; height: 400px; background: rgba(99,102,241,0.12); top: -100px; right: -80px; animation: float 20s ease-in-out infinite; }
.hero-orb-2 { width: 300px; height: 300px; background: rgba(16,185,129,0.1); bottom: -80px; left: -60px; animation: float 25s ease-in-out infinite reverse; }
.hero-orb-3 { width: 250px; height: 250px; background: rgba(236,72,153,0.08); top: 50%; left: 50%; animation: float 18s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(30px,-30px) scale(1.05)} 66%{transform:translate(-20px,20px) scale(0.95)} }
.hero-content { position: relative; text-align: center; z-index: 1; }
.hero-badge {
  display: inline-flex;
  padding: 7px 16px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}
.hero h1 { font-size: clamp(2.4rem,5vw,3.6rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 16px; }
.hero-subtitle { max-width: 520px; margin: 0 auto 28px; font-size: 1.05rem; line-height: 1.7; color: var(--text-secondary); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.hero-trust { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-tertiary); font-weight: 500; }
.trust-item svg { color: var(--success); }

/* ============================================
   Section Labels
   ============================================ */
.section { padding: 40px 0; }
.section-desc { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 24px; max-width: 600px; }
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.section-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--brand);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.section-label > span:last-child {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ============================================
   Emergency Card
   ============================================ */
.emergency-card {
  position: relative;
  background: linear-gradient(135deg, #fef2f2, #fff1f2, #fef2f2);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--radius-2xl);
  padding: 40px 32px;
  text-align: center;
  overflow: hidden;
}
.emergency-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
}
.emergency-pulse {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 10px;
  height: 10px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,0.4)} 50%{box-shadow:0 0 0 12px rgba(239,68,68,0)} }
.emergency-content h2 { font-size: 1.3rem; font-weight: 700; color: var(--danger); margin-bottom: 12px; }
.emergency-phone { margin-bottom: 8px; }
.phone-number { font-size: clamp(2.8rem,5vw,4rem); font-weight: 800; color: var(--danger); letter-spacing: 0.04em; display: inline-block; transition: all var(--duration) var(--ease); }
.phone-number:hover { transform: scale(1.05); }
.emergency-sub { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; }
.emergency-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================
   Helplines
   ============================================ */
.hl-copy {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  flex-shrink: 0;
}
.hl-copy:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.hl-copy:active { transform: scale(0.9); }
.helpline-search { max-width: 480px; margin-bottom: 28px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: all var(--duration) var(--ease);
}
.search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search-box svg { color: var(--text-tertiary); flex-shrink: 0; }
.search-box input { border: none; outline: none; background: transparent; font-size: 0.92rem; color: var(--text); width: 100%; font-family: inherit; }
.search-box input::placeholder { color: var(--text-tertiary); }
.helplines-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.helpline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--duration-md) var(--ease);
}
.helpline-item:hover { border-color: transparent; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hl-flag { font-size: 1.5rem; flex-shrink: 0; }
.hl-info { flex: 1; min-width: 0; }
.hl-info h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-info span { font-size: 0.75rem; color: var(--text-tertiary); }
.helpline-item .r-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); display: grid; place-items: center; flex-shrink: 0; }

/* ============================================
   Help Banner
   ============================================ */
.help-banner {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  margin-left: calc(-40px);
  margin-right: calc(-40px);
  height: 200px;
}
.help-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.help-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.85), rgba(139,92,246,0.85));
  display: flex;
  align-items: center;
  justify-content: center;
}
.help-banner-overlay p {
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ============================================
   Self-Care Banner
   ============================================ */
.selfcare-banner {
  overflow: hidden;
  margin-bottom: 20px;
  margin-left: calc(-40px);
  margin-right: calc(-40px);
  height: 180px;
}
.selfcare-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   What to Expect
   ============================================ */
.expect-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
}
.expect-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--brand);
}
.expect-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.expect-steps { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.expect-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.expect-num {
  width: 28px;
  height: 28px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.expect-step p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }
.expect-note {
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ============================================
   Specific Communities
   ============================================ */
.specific-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.specific-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.specific-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.specific-purple { background: #f0e6ff; color: #7c3aed; }
.specific-amber { background: #fff8e1; color: #d97706; }
.specific-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.specific-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; line-height: 1.6; }
.specific-links { display: flex; flex-direction: column; gap: 8px; }
.specific-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  transition: all var(--duration) var(--ease);
}
.specific-link:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.specific-link span:first-child { font-weight: 600; font-size: 0.9rem; }
.specific-link span:last-child { font-size: 0.8rem; color: var(--brand); }
@media (max-width: 640px) { .specific-grid { grid-template-columns: 1fr; } }

/* ============================================
   Safety Plan
   ============================================ */
.safetyplan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
}
.safetyplan-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; line-height: 1.6; }
.safetyplan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px; }
.safetyplan-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
}
.sp-num {
  width: 24px;
  height: 24px;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.sp-content { flex: 1; min-width: 0; }
.sp-content h4 { font-size: 0.88rem; font-weight: 700; margin-bottom: 4px; }
.sp-hint { font-size: 0.78rem; color: var(--text-tertiary); margin-bottom: 8px; line-height: 1.4; }
.sp-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
  background: var(--surface);
  transition: border-color var(--duration) var(--ease);
}
.sp-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.safetyplan-actions { display: flex; gap: 10px; }

/* ============================================
   Warning Signs
   ============================================ */
.warning-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.warning-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  transition: all var(--duration-md) var(--ease);
}
.warning-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.warning-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; margin-bottom: 14px; }
.w-red { background: var(--danger-soft); color: #dc2626; }
.w-amber { background: var(--amber-soft); color: #d97706; }
.w-blue { background: var(--info-soft); color: #2563eb; }
.w-purple { background: var(--purple-soft); color: #7c3aed; }
.warning-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.warning-card p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.55; }

/* ============================================
   How to Help Someone
   ============================================ */
.help-steps { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.help-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: all var(--duration-md) var(--ease);
}
.help-step:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: transparent; }
.step-num {
  width: 36px;
  height: 36px;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.88rem;
  flex-shrink: 0;
}
.step-content h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.step-content p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.55; }

/* ============================================
   Cards
   ============================================ */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  cursor: pointer;
  transition: all var(--duration-md) var(--ease);
  outline: none;
  overflow: hidden;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 3px 3px 0 0; opacity: 0; transition: opacity var(--duration-md) var(--ease); }
.card:hover .card-accent { opacity: 1; }
.card-green .card-accent { background: var(--success); }
.card-blue .card-accent { background: var(--info); }
.card-warm .card-accent { background: var(--warning); }
.card-pink .card-accent { background: var(--purple); }
.card-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; margin-bottom: 16px; transition: transform var(--duration-md) var(--ease-spring); }
.card:hover .card-icon { transform: scale(1.1) rotate(-3deg); }
.card-icon-green { background: var(--success-soft); color: #059669; }
.card-icon-blue { background: var(--info-soft); color: #2563eb; }
.card-icon-warm { background: var(--warning-soft); color: #d97706; }
.card-icon-pink { background: var(--purple-soft); color: #7c3aed; }
.card h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 6px; }
.card p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

/* ============================================
   Resources
   ============================================ */
.resources-list { display: flex; flex-direction: column; gap: 8px; }
.resource-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--duration-md) var(--ease);
}
.resource-item:hover { border-color: transparent; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.r-icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center; flex-shrink: 0; }
.r-red { background: var(--danger-soft); color: #dc2626; }
.r-blue { background: var(--info-soft); color: #2563eb; }
.r-green { background: var(--success-soft); color: #059669; }
.r-purple { background: var(--purple-soft); color: #7c3aed; }
.r-amber { background: var(--amber-soft); color: #d97706; }
.r-info { flex: 1; min-width: 0; }
.r-info h4 { font-size: 0.92rem; font-weight: 600; margin-bottom: 2px; }
.r-info span { font-size: 0.78rem; color: var(--text-tertiary); }
.r-arrow { color: var(--text-tertiary); flex-shrink: 0; transition: transform var(--duration) var(--ease); }
.resource-item:hover .r-arrow { transform: translateX(4px); }
.rtl .resource-item:hover .r-arrow { transform: translateX(-4px); }

/* ============================================
   Breathe
   ============================================ */
.breathe-wrapper { text-align: center; position: relative; }
.breathe-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  border-radius: var(--radius-2xl);
  z-index: 0;
}
.breathe-wrapper > * { position: relative; z-index: 1; }
.breathe-sub { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 32px; }
.breathe-circle-container { position: relative; width: 160px; height: 160px; margin: 0 auto 20px; }
.breathe-ring { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--brand-soft); animation: breatheRing 8s ease-in-out infinite; }
@keyframes breatheRing { 0%,100%{transform:scale(1);opacity:0.5} 40%,60%{transform:scale(1.15);opacity:1} }
.circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  margin: 0 auto;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 8px 32px rgba(99,102,241,0.3);
  animation: breathe 8s ease-in-out infinite;
  cursor: pointer;
  user-select: none;
}
.circle:hover { box-shadow: 0 12px 40px rgba(99,102,241,0.4); }
@keyframes breathe { 0%,100%{transform:scale(1)} 40%,60%{transform:scale(1.18)} }
.circle.paused { animation-play-state: paused; }
.breathe-hint { color: var(--text-tertiary); font-size: 0.85rem; }

/* ============================================
   Self-Care
   ============================================ */
.selfcare-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.selfcare-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  transition: all var(--duration-md) var(--ease);
}
.selfcare-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.sc-icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center; margin-bottom: 14px; }
.sc-blue { background: var(--info-soft); color: #2563eb; }
.sc-green { background: var(--success-soft); color: #059669; }
.sc-warm { background: var(--warning-soft); color: #d97706; }
.sc-pink { background: var(--purple-soft); color: #7c3aed; }
.selfcare-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.selfcare-card p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.55; }

/* ============================================
   Quote
   ============================================ */
.quote-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 44px 36px;
  text-align: center;
  overflow: hidden;
}
.quote-img-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.1;
}
.quote-decoration { position: absolute; top: 20px; left: 28px; color: var(--brand); opacity: 0.12; z-index: 1; }
.rtl .quote-decoration { left: auto; right: 28px; }
.quote-card blockquote { margin-bottom: 24px; }
.quote-actions { display: flex; gap: 10px; justify-content: center; }
.quote-text { font-size: clamp(1.05rem,1.8vw,1.25rem); font-style: italic; line-height: 1.8; margin-bottom: 12px; transition: opacity var(--duration) var(--ease); min-height: 3em; }
.quote-author { color: var(--text-tertiary); font-size: 0.88rem; font-weight: 500; }

/* ============================================
   FAQ
   ============================================ */
.faq-list { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration) var(--ease);
}
.faq-item[open] { box-shadow: var(--shadow-sm); }
.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--text-tertiary);
  transition: transform var(--duration) var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 16px; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.65; }

/* ============================================
   Footer
   ============================================ */
.footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 40px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-disclaimer {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 12px 16px;
  background: var(--amber-soft);
  border-radius: var(--radius-md);
  max-width: 600px;
  margin-bottom: 8px;
}
.footer-disclaimer svg { color: var(--amber); flex-shrink: 0; margin-top: 2px; }
.footer-disclaimer p { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.95rem; }
.footer-message { color: var(--text-secondary); font-size: 0.85rem; max-width: 400px; line-height: 1.6; }
.footer-who { color: var(--text-tertiary); font-size: 0.8rem; max-width: 400px; line-height: 1.5; }
.footer-links { display: flex; gap: 16px; font-size: 0.78rem; color: var(--text-tertiary); }
.footer-made { color: var(--text-tertiary); font-size: 0.78rem; }

/* ============================================
   Animations
   ============================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
  color: var(--text);
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 998;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.mobile-overlay.active { opacity: 1; }

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 24px;
  z-index: 998;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--duration) var(--ease);
  cursor: pointer;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--brand); color: white; border-color: var(--brand); }
.rtl .back-to-top { right: auto; left: 24px; }

/* ============================================
   Focus & Accessibility
   ============================================ */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration:0.01ms!important; animation-iteration-count:1!important; transition-duration:0.01ms!important; scroll-behavior:auto!important; } }

/* ============================================
   Click Feedback
   ============================================ */
.card:active { transform: scale(0.98); }
.warning-card:active { transform: scale(0.98); }
.help-step:active { transform: scale(0.98); }
.selfcare-card:active { transform: scale(0.98); }
.btn:active { transform: scale(0.96); }
.btn-primary:active { background: var(--brand-dark); }
.btn-danger:active { background: var(--danger-dark); }

/* ============================================
   Pulse Animation for Emergency
   ============================================ */
@keyframes emergencyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 15px rgba(239,68,68,0); }
}
.fab-emergency { animation: emergencyPulse 2s ease-in-out infinite; }
.fab-emergency:hover { animation: none; }

/* ============================================
   Card Hover Enhancement
   ============================================ */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--duration-md) var(--ease);
  background: linear-gradient(135deg, rgba(99,102,241,0.03), rgba(139,92,246,0.03));
  pointer-events: none;
}
.card:hover::before { opacity: 1; }

/* ============================================
   Smooth Scrollbar
   ============================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ============================================
   Toast Notification
   ============================================ */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-md) var(--ease);
  z-index: 9999;
  max-width: 90%;
  text-align: center;
}
.toast.visible { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.rtl .toast { direction: rtl; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 60px;
    z-index: 999;
    width: 260px;
    height: calc(100vh - 60px);
    transition: left var(--duration-md) var(--ease);
    box-shadow: none;
  }
  .rtl .sidebar { left: auto; right: -280px; }
  .sidebar.mobile-open {
    left: 0;
    box-shadow: var(--shadow-xl);
  }
  .rtl .sidebar.mobile-open { left: auto; right: 0; }
  .main-content { padding: 0 24px 80px; }
  .mobile-menu-btn { display: block; }
  .help-banner { margin-left: calc(-24px); margin-right: calc(-24px); }
  .selfcare-banner { margin-left: calc(-24px); margin-right: calc(-24px); }
}
@media (max-width: 640px) {
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 2.2rem; }
  .grid { grid-template-columns: 1fr; }
  .helplines-grid { grid-template-columns: 1fr; }
  .selfcare-grid { grid-template-columns: 1fr; }
  .warning-grid { grid-template-columns: 1fr; }
  .emergency-card { padding: 32px 20px; }
  .quote-card { padding: 36px 20px; }
  .fab-emergency { bottom: 16px; right: 16px; padding: 12px 16px; font-size: 0.88rem; }
  .rtl .fab-emergency { right: auto; left: 16px; }
  .lang-switcher { gap: 2px; padding: 2px; }
  .lang-btn { padding: 4px 8px; font-size: 0.72rem; }
  .back-to-top { bottom: 70px; right: 16px; }
  .rtl .back-to-top { right: auto; left: 16px; }
  .help-banner { margin-left: calc(-20px); margin-right: calc(-20px); height: 160px; }
  .selfcare-banner { margin-left: calc(-20px); margin-right: calc(-20px); height: 140px; }
  .quick-exit { top: auto; bottom: 140px; right: 16px; padding: 8px 12px; font-size: 0.78rem; }
  .rtl .quick-exit { right: auto; left: 16px; }
  .safetyplan-grid { grid-template-columns: 1fr; }
}
