/* Core design tokens, layout, typography, hero/splash and section components. */
:root {
  /* Legacy token names are kept because scripts (PDF export) and protected
     chatbot styles read them; their values now come from the brand palette.
     The full design system (spacing, type, radii, semantic colours, dark
     theme) lives in css/brand-system.css. */
  --teal:       #C98291; /* primary brand: dusty rose */
  --teal-dark:  #A95770; /* deep rose: actions, links */
  --teal-deeper:#7E3D58; /* rose-plum: accent text */
  --teal-pale:  #F8E8EC; /* pale pink surface */
  --teal-light: #EBC9D1;
  --amber:      #C98A2E;
  --amber-pale: #FDF4E3;
  --rose:       #B42318; /* urgent medical red (never brand pink) */
  --rose-pale:  #FEF3F2;
  --green:      #829B88; /* sage */
  --green-pale: #EEF3EF;
  --navy:       #493642; /* deep plum headings */
  --text:       #40383C;
  --muted:      #6E6268;
  --border:     #EDE1E4;
  --bg:         #FFFCFA;
  --shadow:     0 1px 2px rgba(73, 54, 66, .04), 0 8px 24px rgba(73, 54, 66, .06);
  --shadow-lg:  0 2px 6px rgba(73, 54, 66, .05), 0 18px 40px rgba(73, 54, 66, .10);
  --white:      #FFFFFF;
}

html.dark-mode {
  --text:       #e0e0e0;
  --muted:      #b0b0b0;
  --border:     #333333;
  --bg:         #1a1a1a;
  --shadow:     0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg:  0 8px 40px rgba(0, 0, 0, 0.6);
  --white:      #2a2a2a;
}
*, *::before, *::after { box-sizing: border-box; margin:0; padding:0; }
html { scroll-padding-top: 70px; }
/* Smooth scrolling is enabled by js/amoma-hub.js once the page has loaded, so the browser's own
   jump to a #fragment / scroll restoration on refresh is instant instead of an animated slide. */
html.smooth-scroll { scroll-behavior: smooth; }
body {
  font-family: 'Tajawal', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

nav {
position: sticky; top:0; z-index:1000;
background: rgba(252,248,243,0.96);
-webkit-backdrop-filter: blur(14px);
backdrop-filter: blur(14px);
border-bottom: 2px solid var(--teal-pale);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 40px;
height: 68px;
box-shadow: 0 2px 12px rgba(240, 98, 146,0.12);
transition: background 0.3s, border-color 0.3s;
}

html.dark-mode nav {
  background: rgba(30, 30, 30, 0.97);
  border-bottom-color: rgba(240, 98, 146, 0.2);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.nav-logo {
display: flex; align-items: center; gap: 10px;
text-decoration: none;
font-size: 21px; font-weight: 900;
color: #6A244D;
letter-spacing: 0;
white-space: nowrap;
animation: navLogoIn .6s ease-out both;
}
.nav-logo-img {
width: 44px; height: 44px;
object-fit: contain; flex-shrink: 0;
transition: transform .35s ease, filter .35s ease;
}
.nav-logo:hover .nav-logo-img,
.nav-logo:focus-visible .nav-logo-img { transform: scale(1.07) rotate(-3deg); filter: drop-shadow(0 3px 8px rgba(106,36,77,.28)); }
.nav-logo .nav-logo-text { transition: color .3s ease; }
.nav-logo:hover .nav-logo-text { color: #D27A8B; }
.nav-logo .dot { color: #D27A8B; }
html.dark-mode .nav-logo { color: #f3d9e2; }
html.dark-mode .nav-logo:hover .nav-logo-text { color: #e79aae; }
@keyframes navLogoIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) {
  .nav-logo { animation: none; }
  .nav-logo-img, .nav-logo .nav-logo-text { transition: none; }
}
 .logo-wrapper { display: flex; align-items: center; gap: 15px; flex-direction: row-reverse; width: 100%; justify-content: space-between; }
.nav-controls { display: flex; align-items: center; gap: 8px; direction: ltr; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width:768px) {
  nav { padding:0 10px; }
  .logo-wrapper { gap: 4px; }
  .nav-controls { gap: 2px; }
  .ask-btn { padding: 4px 8px !important; font-size: 11px !important; }
  .nav-logo { font-size: 15px !important; gap: 6px; }
  .nav-logo-img { width: 32px; height: 32px; }
}
.nav-links { display:flex; gap:4px; list-style:none; }
.nav-links a {
text-decoration:none; color:var(--muted);
font-size:14px; font-weight:600;
padding: 8px 13px; border-radius:8px;
transition: all .2s;
}
.nav-links a:hover { background:var(--teal-pale); color:var(--teal-deeper); }
.nav-cta {
background: linear-gradient(135deg, var(--teal), var(--teal-dark)) !important;
color: white !important;
border-radius: 10px !important;
box-shadow: 0 4px 14px rgba(240, 98, 146,0.35);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(240, 98, 146,0.5) !important; }

.theme-toggle {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all .3s;
  color: var(--text);
  display: flex;
  align-items: center;
}
.theme-toggle:hover {
  background: var(--teal-pale);
  transform: rotate(20deg);
}
.theme-toggle:focus {
  outline: 2px solid var(--teal-dark);
  outline-offset: 2px;
}

.btn {
display:inline-flex; align-items:center; gap:8px;
padding:13px 26px; border-radius:12px;
font-family:'Tajawal',sans-serif;
font-size:15px; font-weight:700;
text-decoration:none; cursor:pointer; border:none;
transition: all .25s;
}
.btn-teal {
background: linear-gradient(135deg, var(--teal), var(--teal-dark));
color: white;
box-shadow: 0 6px 20px rgba(240, 98, 146,0.4);
}
.btn-teal:hover { transform:translateY(-2px); box-shadow:0 10px 28px rgba(240, 98, 146,0.55); }
.btn-ghost {
background:rgba(255,255,255,0.15);
color:rgba(255,255,255,0.98);
border:1px solid rgba(255,255,255,0.4);
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
}
.btn-ghost:hover { background:rgba(255,255,255,0.25); transform:translateY(-2px); }
/* Splash hero used for the first screen */
.splash-hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(8px, 1.4vw, 16px);
  overflow: hidden;
  background: linear-gradient(148deg, #FCF8F3 0%, #ffeef4 50%, #fce4ec 100%);
}

.splash-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(240, 98, 146, 0.12) 0%, transparent 32%),
    radial-gradient(circle at 82% 78%, rgba(233, 30, 99, 0.1) 0%, transparent 30%),
    radial-gradient(circle at 42% 48%, rgba(252, 228, 236, 0.7) 0%, transparent 38%);
}

.splash-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.splash-ambient > span {
  position: absolute;
  border-radius: 999px;
  filter: blur(28px);
}

.splash-ambient .blob-1 {
  top: -12%;
  left: -8%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(240, 98, 146, 0.12) 0%, transparent 70%);
}

.splash-ambient .blob-2 {
  bottom: -10%;
  right: -6%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(233, 30, 99, 0.1) 0%, transparent 70%);
}

.splash-ambient .blob-3 {
  top: 38%;
  left: 30%;
  width: 40vw;
  height: 40vw;
  filter: blur(48px);
  background: radial-gradient(circle, rgba(252, 228, 236, 0.6) 0%, transparent 70%);
}

.splash-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  padding: 0 16px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.splash-side {
  flex-shrink: 0;
  width: 44px;
  min-height: 1px;
}

.splash-side.is-left,
.splash-side.is-right {
  display: none;
}

.splash-copy {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.splash-heart {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8bbd0, #f48fb1);
  box-shadow: 0 4px 20px rgba(233, 30, 99, 0.22);
}

.splash-portrait-wrap {
  position: relative;
  width: clamp(168px, 46vw, 210px);
  height: clamp(168px, 46vw, 210px);
}

.splash-portrait-glow,
.splash-portrait-ring {
  display: none;
  position: absolute;
  inset: -5px;
  border-radius: 50%;
}

.splash-portrait-glow {
  background: linear-gradient(135deg, #f06292, #e91e63, #f48fb1);
  opacity: 0.45;
}

.splash-portrait-ring {
  inset: -2px;
  background: linear-gradient(148deg, #FCF8F3, #fce4ec);
}

.splash-portrait-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 8px 18px rgba(233, 30, 99, 0.16));
}

.splash-portrait {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.splash-portrait-shade {
  display: none;
}

.splash-logo-piece {
  position: absolute;
  inset: 0;
  object-fit: contain;
  pointer-events: none;
}

.splash-logo-baby {
  opacity: 0;
  transform: translate(42px, 18px) scale(0.84) rotate(8deg);
  transform-origin: 68% 58%;
}

.splash-logo-smile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/* Units are the logo's own 1024-unit space: 8.6 ≈ 2.25px on the 268px desktop logo. */
.splash-logo-smile path {
  fill: none;
  stroke: #fce6ef;
  stroke-width: 8.6;
  stroke-linecap: round;
  opacity: 0;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

/* توقيت الابتسامة يُدار من JavaScript ومربوط بحركة الطفل */

.splash-title {
  margin: 0;
  direction: rtl;
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 9vw, 3.4rem);
  line-height: 1.35;
  padding-top: 0.08em;
  background: linear-gradient(125deg, #f06292 0%, #e91e63 55%, #c2185b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.splash-subtitle {
  margin: -4px 0 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #5c404c;
  font-size: clamp(0.88rem, 3vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.splash-divider {
  width: 44px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f48fb1, #f06292);
  opacity: 0.5;
}

.splash-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.splash-hint {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: #7b1c3e;
  opacity: 0.82;
  text-align: center;
}

.splash-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fce4ec;
  border: 1.5px solid rgba(233, 30, 99, 0.16);
  appearance: none;
  cursor: pointer;
  color: #880e4f;
  font-family: 'Poetsen One', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.08);
}

.splash-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(233, 30, 99, 0.12);
}

.splash-badge:focus-visible {
  outline: 2px solid rgba(194, 24, 91, 0.45);
  outline-offset: 3px;
}

.splash-badge .check {
  font-size: 0.88rem;
  line-height: 1;
}

.splash-stage {
  will-change: opacity, transform, box-shadow;
}

.splash-side-content {
  display: none;
}

.splash-side-content h2 {
  margin: 0;
  direction: rtl;
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: clamp(2.2rem, 3.4vw, 3rem);
  line-height: 1.28;
  color: #c2185b;
  letter-spacing: -0.01em;
}

.splash-side-content p {
  margin: 10px 0 0;
  direction: rtl;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.75;
  color: #7b1c3e;
}

.splash-float {
  animation: splash-float 5.2s ease-in-out infinite;
}

@keyframes splash-float {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@media (min-width: 768px) {
  .splash-shell {
    gap: 32px;
    direction: ltr;
  }

  .splash-side.is-left,
  .splash-side.is-right,
  .splash-side-content {
    display: flex;
  }

  .splash-side.is-left,
  .splash-side.is-right {
    align-items: center;
    justify-content: center;
  }

  .splash-side-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    max-width: 180px;
    text-align: right;
  }

  .splash-side.is-right {
    margin-inline-start: clamp(12px, 2vw, 24px);
    margin-inline-end: clamp(12px, 3vw, 32px);
  }

  .splash-side.is-left {
    margin-inline-start: clamp(8px, 2vw, 20px);
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .splash-shell {
    gap: 18px;
    padding-inline: 24px;
  }

  .splash-copy {
    max-width: 320px;
  }

  .splash-side-content {
    max-width: 150px;
  }

  .splash-side-content h2 {
    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  }

  .splash-side-content p {
    font-size: 0.84rem;
    line-height: 1.65;
  }

  .splash-badges {
    gap: 10px;
  }
}

@media (max-width: 767px) {
  .splash-shell {
    flex-direction: column;
    gap: 16px;
    padding: 6px 18px 18px;
  }

  .splash-hero {
    padding-top: 10px;
  }

  .splash-copy {
    max-width: 100%;
  }

  .splash-hint {
    font-size: 0.8rem;
  }

  .splash-side.is-right {
    display: flex;
    width: 100%;
    max-width: 420px;
    transform: none !important;
    margin: 2px 0 0;
  }

  .splash-side-content {
    display: flex;
    width: 100%;
    max-width: none;
    align-items: center;
    text-align: center;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(194, 24, 91, 0.12);
    box-shadow: 0 8px 24px rgba(233, 30, 99, 0.08);
  }

  .splash-side-content h2 {
    font-size: clamp(1.4rem, 7vw, 1.9rem);
  }

  .splash-side-content p {
    font-size: 0.8rem;
    line-height: 1.6;
  }

  .splash-badges {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .splash-badge {
    justify-content: center;
  }
}

.journey-picker {
  position: relative;
  z-index: 2;
  margin: -34px auto 0;
  padding: 0 20px 34px;
  max-width: 1120px;
}

.journey-picker-inner {
  background: var(--white);
  border: 1px solid rgba(240, 98, 146, 0.18);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 18px 50px rgba(136, 14, 79, 0.12);
  text-align: center;
}

.journey-picker-kicker {
  color: var(--teal-deeper);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}

.journey-picker-title {
  color: var(--navy);
  font-family: 'Cairo', sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 900;
  margin: 4px 0 8px;
}

.journey-picker-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
}

.journey-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.journey-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 138px;
  padding: 18px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  color: var(--text);
  text-decoration: none;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}

.journey-option:hover,
.journey-option:focus-visible {
  transform: translateY(-5px);
  border-color: var(--teal);
  box-shadow: 0 12px 26px rgba(240, 98, 146, .18);
  outline: none;
}

.journey-option-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--teal-pale);
  font-size: 25px;
}

.journey-option strong {
  color: var(--teal-deeper);
  font-size: 15px;
}

.journey-option span:last-child {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.family-planning-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 auto 26px;
  max-width: 820px;
  padding: 16px 20px;
  border-right: 4px solid var(--teal);
  border-radius: 16px;
  background: linear-gradient(110deg, var(--teal-pale), #fff);
  color: var(--text);
  font-size: 14px;
  line-height: 1.9;
}

.family-planning-intro-icon {
  flex: 0 0 auto;
  font-size: 28px;
}

.family-duration-chart {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid #ead5e8;
}

.family-duration-title {
  color: #4a2943;
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 18px;
  text-align: center;
}

.family-duration-list {
  display: grid;
  gap: 4px;
  direction: rtl;
}

.family-duration-row {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) minmax(0, 2.4fr) minmax(64px, .65fr);
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: background .2s, transform .2s, padding .2s;
}

.family-duration-row:hover,
.family-duration-row:focus-visible {
  background: var(--teal-pale);
  transform: translateX(-2px);
  outline: none;
}

.family-duration-name {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.family-duration-track {
  position: relative;
  height: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: #f5e9e8;
  box-shadow: inset 0 1px 2px rgba(74, 0, 36, .04);
}

.family-duration-bar {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, #7b1f58, #9a3b72);
  box-shadow: 0 2px 5px rgba(123, 31, 88, .16);
}

.family-duration-row:nth-child(2) .family-duration-bar { background: #8b3b69; }
.family-duration-row:nth-child(3) .family-duration-bar { background: #a95676; }
.family-duration-row:nth-child(4) .family-duration-bar { background: #c16a83; }
.family-duration-row:nth-child(5) .family-duration-bar { background: #d18491; }
.family-duration-row:nth-child(6) .family-duration-bar { background: #d99a9f; }

.family-duration-value {
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}

.family-duration-row + .family-duration-row {
  border-top: 0;
}

.family-duration-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin-top: 14px;
  text-align: center;
}

.family-form-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 760px;
  margin: 34px auto 16px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-right: 4px solid var(--teal);
  border-radius: 16px;
  background: linear-gradient(110deg, var(--teal-pale), #fff);
}

.family-form-intro-icon {
  flex: 0 0 auto;
  font-size: 28px;
}

.family-form-intro h3 {
  color: var(--teal-deeper);
  font-size: 19px;
  font-weight: 900;
  margin: 0 0 4px;
}

.family-form-intro p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

.family-form-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.family-form-divider::before,
.family-form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.family-method-link {
  display: block;
  scroll-margin-top: 90px;
}

@media (max-width: 767px) {
  .family-duration-row {
    grid-template-columns: minmax(92px, 1fr) minmax(0, 1.7fr) minmax(54px, .6fr);
    gap: 7px;
  }

  .family-duration-name {
    font-size: 12px;
  }

  .family-duration-value {
    font-size: 11px;
  }

  .family-form-intro {
    align-items: flex-start;
    padding-inline: 14px;
  }
}

.edd-result-card {
  margin-top: 20px;
  padding: 22px 18px;
  border-radius: 24px;
  background: linear-gradient(145deg, #e8f5e9, #f4fbf2);
  border: 1px solid #c8e6c9;
  text-align: center;
}

.edd-result-card .edd-label {
  color: #52715a;
  font-size: 14px;
  margin-bottom: 8px;
}

.edd-result-card .edd-date {
  color: #285b3b;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  font-weight: 900;
  margin-bottom: 8px;
}

.edd-result-card .edd-weeks {
  color: #52715a;
  font-size: 14px;
}

.edd-progress {
  height: 10px;
  margin: 18px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--white);
}

.edd-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #285b3b;
  transition: width .5s ease;
}

.edd-progress-label {
  color: #52715a;
  font-size: 12px;
}

.pregnancy-journey {
  margin-top: 18px;
  padding: 22px 14px 8px;
  border-radius: 22px;
  background: var(--white);
  text-align: right;
}

.pregnancy-journey-title {
  color: var(--teal-deeper);
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 16px;
}

.pregnancy-journey-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 18px;
}

.pregnancy-journey-legend span::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 5px;
}

.pregnancy-journey-legend .trimester-one::before { background: #d77c91; }
.pregnancy-journey-legend .trimester-two::before { background: #d3a345; }
.pregnancy-journey-legend .trimester-three::before { background: #82a98e; }

.pregnancy-timeline {
  --pt-top: 58px;
  --pt-mk: 40px;
  position: relative;
  direction: rtl;
  padding: var(--pt-top) 0 26px;
}

.pregnancy-timeline-line {
  position: absolute;
  top: calc(var(--pt-top) + var(--pt-mk) / 2 - 5px);
  right: 4%;
  left: 4%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(to left, #d77c91 0 30%, #d3a345 30% 68%, #82a98e 68% 100%);
}

.pregnancy-timeline-markers {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pregnancy-week-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--pt-mk);
  height: var(--pt-mk);
  padding: 0;
  border-radius: 50%;
  background: var(--teal-deeper);
  border: 3px solid var(--white);
  color: white;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(74, 0, 36, .15);
  transition: transform .2s, box-shadow .2s, background-color .2s;
  touch-action: manipulation;
}
/* larger invisible tap area for touch */
.pregnancy-week-marker::before {
  content: '';
  position: absolute;
  inset: -6px -4px -22px;
  border-radius: 14px;
}
.pregnancy-week-marker:hover { transform: translateY(-2px) scale(1.08); box-shadow: 0 6px 14px rgba(74, 0, 36, .25); }
.pregnancy-week-marker:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.pregnancy-week-marker.is-selected { background: var(--teal-dark); }
.pregnancy-week-marker.is-current {
  box-shadow: 0 0 0 3px var(--teal), 0 0 0 7px var(--teal-light), 0 6px 14px rgba(74, 0, 36, .25);
}

.pregnancy-week-marker small {
  position: absolute;
  top: calc(100% + 4px);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.pregnancy-week-marker.is-current small { color: var(--teal-dark); font-weight: 800; }

.pregnancy-current-marker {
  position: absolute;
  z-index: 3;
  top: 4px;
  left: 0;
  width: 0;
  height: calc(var(--pt-top) + var(--pt-mk) / 2 - 4px);
  display: none;
  pointer-events: none;
  transition: left .45s cubic-bezier(.2,.8,.2,1);
}
.pregnancy-current-marker .pcm-badge {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(calc(-50% + var(--pcm-shift, 0px)));
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--teal-deeper);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(74, 0, 36, .22);
}
.pregnancy-current-marker .pcm-guide {
  position: absolute;
  top: 24px;
  left: -1px;
  width: 2px;
  height: calc(100% - 24px - var(--pt-mk) / 2 - 3px);
  background: var(--teal-deeper);
}
.pregnancy-current-marker .pcm-guide::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -4px;
  border: 5px solid transparent;
  border-top-color: var(--teal-deeper);
  border-bottom: 0;
}
.pregnancy-current-marker .pcm-dot {
  position: absolute;
  bottom: -7px;
  left: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--teal-deeper);
  box-shadow: 0 0 0 3px var(--teal-light);
}
.pregnancy-current-marker.on-milestone .pcm-dot { display: none; }
@media (prefers-reduced-motion: reduce) {
  .pregnancy-current-marker, .pregnancy-week-marker, .pregnancy-weekly-item { transition: none !important; }
}

.pregnancy-weekly-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.pregnancy-weekly-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 4px;
  border-radius: 16px;
  scroll-margin-top: 90px;
  scroll-margin-bottom: 24px;
  border-inline-start: 4px solid transparent;
  transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.pregnancy-weekly-item:focus { outline: none; }
.pregnancy-weekly-item.is-highlighted {
  background: var(--teal-pale);
  border-inline-start-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal-light);
}
.pregnancy-weekly-item.is-highlighted .pregnancy-weekly-number {
  background: var(--teal-dark);
  box-shadow: 0 0 0 3px var(--teal-light);
}

.pregnancy-weekly-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal-deeper);
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.pregnancy-weekly-item strong {
  display: block;
  color: var(--teal-deeper);
  font-size: 14px;
}

.pregnancy-weekly-item p {
  color: var(--text);
  font-size: 13px;
  margin: 2px 0 0;
}

.pregnancy-weekly-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  transition: background .2s, transform .2s;
}

.pregnancy-weekly-link:hover,
.pregnancy-weekly-link:focus-visible {
  background: var(--teal-pale);
  transform: translateX(-3px);
  outline: none;
}

.pregnancy-weekly-source {
  color: var(--muted) !important;
  font-size: 11px !important;
}

@media (max-width: 767px) {
  .journey-picker {
    margin-top: -18px;
    padding-inline: 12px;
  }

  .journey-picker-inner {
    padding: 22px 14px;
    border-radius: 22px;
  }

  .journey-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .journey-option {
    min-height: 128px;
    padding: 14px 8px;
  }

  .family-planning-intro {
    align-items: flex-start;
  }

  .pregnancy-journey {
    padding-inline: 8px;
  }

  .pregnancy-timeline { --pt-mk: 34px; }
  .pregnancy-week-marker { font-size: 12px; }
  .pregnancy-current-marker .pcm-badge { font-size: 11px; padding: 3px 9px; }
}

/* صندوق التنبيه الصوتي */
.speech-tip-box {
  background: var(--amber-pale);
  border: 2px dashed var(--amber);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 15px rgba(255, 183, 77, 0.15);
  margin-top: 40px;
}

/* تنسيق زر القارئ الصوتي */
.speech-btn {
  background: var(--teal-pale);
  color: var(--teal-deeper);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(240, 98, 146, 0.2);
}
.speech-btn:hover {
  background: var(--teal);
  color: white;
  transform: scale(1.1);
}
.speech-btn.playing {
  background: var(--rose-pale);
  animation: pulse 1.5s infinite;
}
.fav-btn {
  background: var(--amber-pale);
  color: #e65100;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 183, 77, 0.2);
}
.fav-btn:hover {
  background: var(--amber);
  color: white;
  transform: scale(1.1);
}
.fav-btn.saved {
  background: var(--amber);
  color: white;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(239, 83, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 83, 80, 0); }
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  width: 100%;
}

/* ستايل نموذج تنظيم الأسرة */
.fp-form {
  background: var(--white);
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-top: 24px;
}
.fp-group {
  margin-bottom: 18px;
  text-align: right;
}
.fp-group label {
  display: block;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  font-size: 14px;
}
.fp-group select,
.fp-group input,
.fp-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border 0.2s;
}
.fp-group select { cursor: pointer; }
.fp-group textarea { resize: vertical; min-height: 100px; }
.fp-group select:focus,
.fp-group input:focus,
.fp-group textarea:focus {
  border-color: var(--teal);
}

.stats-ribbon {
background: linear-gradient(90deg, var(--teal-deeper), var(--teal-dark));
color: white;
padding: 24px 48px;
}
.stats-inner {
max-width:1100px; margin:0 auto;
display:grid; grid-template-columns: repeat(4,1fr);
gap:16px; text-align:center;
}
.stat-num { font-size:30px; font-weight:900; display:block; }
.stat-lbl { font-size:12px; opacity:.8; margin-top:2px; font-weight:500; }

.sec { padding: 72px 48px; }
.sec-inner { max-width:1200px; margin:0 auto; }
.sec-pill {
display:inline-flex; align-items:center; gap:7px;
background:var(--teal-pale); color:var(--teal-deeper);
font-size:12px; font-weight:800;
letter-spacing:1.2px; text-transform:uppercase;
padding:5px 14px; border-radius:20px;
margin-bottom:14px;
}
.sec-title {
font-size:clamp(22px,3vw,34px);
font-weight:900; color:var(--navy);
margin-bottom:10px; line-height:1.3;
}
.sec-sub { font-size:15px; color:var(--muted); max-width:540px; margin-bottom:44px; }

.toc-link {
  background: var(--white); border: 1px solid var(--border); color: var(--teal-deeper);
  padding: 10px 20px; border-radius: 14px; text-decoration: none; font-weight: 700;
  font-size: 14px; transition: all 0.2s; box-shadow: 0 2px 8px rgba(240, 98, 146, 0.05);
  display: inline-flex; align-items: center; gap: 8px;
}
.toc-link:hover {
  background: var(--teal-pale); transform: translateY(-3px); border-color: var(--teal);
  box-shadow: 0 6px 15px rgba(240, 98, 146, 0.15);
}

.benefits-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(230px,1fr));
gap: 18px;
}
.bcard {
background:var(--white);
border:1px solid var(--border);
border-radius:18px; padding:26px 22px;
transition: all .25s; position:relative; overflow:hidden;
}
.bcard::after {
content:''; position:absolute;
top:0; right:0; width:5px; height:100%;
border-radius:0 18px 18px 0;
}
.bcard.c1::after { background:var(--teal); }
.bcard.c2::after { background:var(--amber); }
.bcard.c3::after { background:var(--green); }
.bcard.c4::after { background:#ab47bc; }
.bcard:hover { transform:translateY(-5px); box-shadow:var(--shadow-lg); }
.bcard-icon {
width:52px; height:52px; border-radius:14px;
display:flex; align-items:center; justify-content:center;
font-size:26px; margin-bottom:16px;
}
.c1 .bcard-icon { background:var(--teal-pale); }
.c2 .bcard-icon { background:var(--amber-pale); }
.c3 .bcard-icon { background:var(--green-pale); }
.c4 .bcard-icon { background:#f3e5f5; }
.bcard h4 { font-size:16px; font-weight:800; color:var(--navy); margin-bottom:8px; }
.bcard p  { font-size:14px; color:var(--muted); line-height:1.7; }

.tabs-wrap { margin-bottom:28px; display:flex; gap:8px; flex-wrap:wrap; }
.tab-btn {
padding:10px 22px; border-radius:10px; border:2px solid;
font-family:'Tajawal',sans-serif; font-size:14px; font-weight:700;
cursor:pointer; transition:all .2s;
}
.tab-btn.safe  { border-color:var(--teal);  color:var(--teal-dark);  background:var(--teal-pale); }
.tab-btn.avoid { border-color:var(--rose);  color:var(--rose);       background:var(--rose-pale); }
.tab-btn.safe.active  { background:var(--teal); color:white; }
.tab-btn.avoid.active { background:var(--rose); color:white; }
.tab-panel { display:none; }
.tab-panel.active { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; }
.ex-card {
background:var(--white);
border:1px solid var(--border);
border-radius:14px; padding:18px 20px;
display:flex; gap:14px; align-items:flex-start;
transition: box-shadow .2s;
}
.ex-card:hover { box-shadow:var(--shadow); }
.ex-card-icon {
width:46px; height:46px; border-radius:12px;
display:flex; align-items:center; justify-content:center;
font-size:22px; flex-shrink:0;
}
.safe-panel  .ex-card-icon { background:var(--teal-pale); }
.avoid-panel .ex-card-icon { background:var(--rose-pale); }
.ex-card h4 { font-size:15px; font-weight:700; color:var(--navy); margin-bottom:4px; }
.ex-card p  { font-size:13px; color:var(--muted); line-height:1.65; }

.tips-grid {
display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:16px;
}
.tip-card {
background:var(--white);
border-right: 4px solid var(--teal);
border-radius:12px; padding:18px 20px;
box-shadow:var(--shadow);
}
.tip-card h4 { font-size:14px; font-weight:800; color:var(--teal-deeper); margin-bottom:6px; }
.tip-card h4 {
display:flex;
align-items:center;
gap:8px;
}
.tip-card p  { font-size:13px; color:var(--muted); line-height:1.65; }

.warn-banner {
background: linear-gradient(135deg, #d32f2f, #c62828);
border-radius:18px; padding:36px 40px;
color:white; margin-bottom:28px;
position:relative; overflow:hidden;
}
.warn-banner::before {
content:""; width:150px; height:150px; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18v-6a5 5 0 1 1 10 0v6'/%3E%3Cpath d='M5 21a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1z'/%3E%3Cpath d='M21 12h1M18.5 4.5 18 5M2 12h1M12 2v1M4.93 4.93l.7.7M12 12v6'/%3E%3C/svg%3E") center/contain no-repeat;
position:absolute; left:-16px; top:-16px;
opacity:.07; line-height:1;
}
.warn-banner h3 { font-size:22px; font-weight:900; color:#ffcdd2; margin-bottom:8px; }
.warn-banner p  { font-size:15px; color:rgba(255,255,255,0.9); }
.warn-grid {
display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
gap:14px;
}
.warn-item {
background:var(--rose-pale); border:1px solid #ef9a9a;
border-radius:14px; padding:20px 16px;
display:flex; flex-direction:column;
align-items:center; text-align:center; gap:10px;
}
.warn-item span:first-child { font-size:34px; }
.warn-item span:last-child  { font-size:14px; font-weight:700; color:#b71c1c; }

.timeline { display:flex; flex-direction:column; gap:0; position:relative; }
.timeline::before {
content:''; position:absolute;
right:28px; top:0; bottom:0; width:3px;
background: linear-gradient(to bottom, var(--amber), var(--teal));
}
.tl-row {
display:flex; gap:22px; align-items:flex-start;
padding:24px 0; position:relative;
}
.tl-dot {
width:58px; height:58px; border-radius:50%;
display:flex; align-items:center; justify-content:center;
font-size:24px; flex-shrink:0; z-index:1;
border:3px solid white; box-shadow:var(--shadow);
}
.tl-row:nth-child(1) .tl-dot { background:var(--amber-pale); }
.tl-row:nth-child(2) .tl-dot { background:var(--teal-pale); }
.tl-row:nth-child(3) .tl-dot { background:var(--green-pale); }
.tl-tag {
display:inline-block; font-size:12px; font-weight:800;
padding:4px 11px; border-radius:12px; margin-bottom:8px;
}
.tl-row:nth-child(1) .tl-tag { background:#ffe0b2; color:#e65100; }
.tl-row:nth-child(2) .tl-tag { background:var(--teal-pale); color:var(--teal-deeper); }
.tl-row:nth-child(3) .tl-tag { background:var(--green-pale); color:#2e7d32; }
#postpartum-problems .card-header h4 {
display:flex;
align-items:center;
gap:8px;
}
#baby-care .card-header h4,
#family-planning .card-header h4 {
display:flex;
align-items:center;
gap:8px;
}
.tl-row h4 { font-size:17px; font-weight:800; color:var(--navy); margin-bottom:6px; }
.tl-row p  { font-size:14px; color:var(--muted); line-height:1.7; }

.vids-bg { background:var(--navy); }
.vids-bg .sec-pill { background:rgba(240, 98, 146, 0.2); color:#f8bbd0; }
.vids-bg .sec-title { color:white; }
.vids-bg .sec-sub   { color:rgba(255,255,255,0.6); }
.vids-grid {
display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
gap:18px;
}
.vid-card {
background:rgba(255,255,255,0.06);
border:1px solid rgba(255,255,255,0.1);
border-radius:16px; overflow:hidden;
text-decoration:none; display:block;
transition:all .25s;
}
.vid-card:hover { transform:translateY(-4px); border-color:var(--teal); background:rgba(255,255,255,0.1); }
.vid-thumb {
background: linear-gradient(135deg, rgba(240, 98, 146, 0.3), rgba(136, 14, 79, 0.4));
height:120px; display:flex; align-items:center; justify-content:center;
font-size:44px; position:relative;
}
.play-btn {
position:absolute; width:50px; height:50px;
background:var(--teal); border-radius:50%;
display:flex; align-items:center; justify-content:center;
box-shadow:0 6px 20px rgba(240, 98, 146, 0.5);
}
.play-btn svg { width:20px; height:20px; fill:white; margin-right:-3px; }
.vid-body { padding:16px; }
.vid-title { font-size:14px; font-weight:700; color:white; margin-bottom:5px; line-height:1.45; }
.vid-ch    { font-size:12px; color:rgba(255,255,255,0.5); }

.schedule-table {
width:100%; border-collapse:collapse;
border-radius:14px; overflow:hidden;
box-shadow:var(--shadow);
}
.schedule-table th {
background: linear-gradient(135deg, var(--teal), var(--teal-dark));
color:white; padding:14px 12px;
font-size:14px; font-weight:700; text-align:center;
}
.schedule-table td {
padding:13px 12px; text-align:center;
font-size:13px; border-bottom:1px solid var(--border);
vertical-align:top;
}
.schedule-table tr:nth-child(even) td { background:var(--bg); }
.schedule-table tr:last-child td { border-bottom:none; }
.day-label { font-weight:800; color:var(--teal-deeper); font-size:14px; }
.ex-tag {
display:inline-block; padding:3px 9px;
border-radius:12px; font-size:12px; font-weight:600;
margin:2px;
}
.ex-tag.t { background:var(--teal-pale); color:var(--teal-deeper); }
.ex-tag.r { background:var(--rose-pale); color:#c62828; }
.ex-tag.g { background:var(--green-pale); color:#2e7d32; }
.ex-tag.a { background:var(--amber-pale); color:#e65100; }
.rest-day { color:var(--muted); font-style:italic; }
.intensity-badge {
display:inline-block; padding:4px 10px;
border-radius:10px; font-size:12px; font-weight:700;
}
.low    { background:#fce4ec; color:var(--teal-deeper); }
.medium { background:#fff8e1; color:#f57f17; }
.high   { background:#ffebee; color:#c62828; }
.rest   { background:#f5f5f5; color:#666; }

footer {
background: var(--navy);
color: white;
text-align: center;
padding: 24px;
font-size: 13px;
line-height: 1.7;
}
