@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #9333EA;
  --primary-light: #F3E8FF;
  --primary-dark: #7E22CE;
  --accent: #F472B6;
  --accent-light: #FDF4FF;
  --success: #059669;
  --success-light: #ECFDF5;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --bg: #FFFFFF;
  --bg-soft: #F9FAFB;
  --bg-card: #FFFFFF;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

html { direction: rtl; font-family: 'Tajawal', sans-serif; scroll-behavior: smooth; }
body { color: var(--text-primary); background: var(--bg); line-height: 1.7; overflow-x: hidden; }

h1 { font-size: 32px; font-weight: 700; line-height: 1.3; }
h2 { font-size: 24px; font-weight: 700; line-height: 1.3; }
h3 { font-size: 18px; font-weight: 500; line-height: 1.4; }
p { font-size: 16px; color: var(--text-secondary); }
small { font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

input, select, button, textarea {
  min-height: 48px; font-family: 'Tajawal', sans-serif;
  font-size: 16px !important; border-radius: var(--radius-md);
  border: 1px solid var(--border-strong); padding: 0 16px;
  width: 100%; background: var(--bg); color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
button { cursor: pointer; border: none; font-weight: 700; }

.btn-primary {
  background: var(--primary); color: white; border: none;
  padding: 14px 24px; border-radius: var(--radius-md);
  font-size: 17px; font-weight: 700; cursor: pointer;
  transition: background 0.2s, transform 0.1s; width: 100%; min-height: 52px;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background: white; color: var(--primary); border: 2px solid var(--primary);
  padding: 12px 20px; border-radius: var(--radius-md);
  font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { background: var(--primary-light); }

.btn-whatsapp {
  background: #25D366; color: white; border: none;
  padding: 12px 16px; border-radius: var(--radius-md);
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; transition: background 0.2s; width: 100%;
}
.btn-whatsapp:hover { background: #1fba57; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section-alt { background: var(--bg-soft); }

.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { max-width: 560px; margin: 0 auto; }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm);
}
.card-hover { transition: transform 0.2s, box-shadow 0.2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ---- HEADER ---- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: white; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 64px; max-width: 1100px; margin: 0 auto;
}
.logo { font-size: 20px; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo span { font-size: 22px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-name { font-size: 20px; font-weight: 700; color: var(--primary); }
.logo-tagline { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { position: relative; padding-bottom: 4px; color: var(--text-secondary); font-size: 15px; font-weight: 500; transition: color 0.2s; text-decoration: none; }
.nav-links a::after { content: ''; position: absolute; bottom: -2px; right: 0; left: 0; height: 2px; background: var(--primary); border-radius: 99px; transform: scaleX(0); transition: transform 0.2s ease; }
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--primary); font-weight: 600; }
.nav-links a.active::after { transform: scaleX(1); }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
  min-height: auto; width: auto; border-radius: 0;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; }
.mobile-nav { display: none; background: white; border-top: 1px solid var(--border); padding: 16px 20px; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 12px 0; color: var(--text-secondary); font-size: 16px; border-bottom: 1px solid var(--border); }
.mobile-nav a:last-child { border-bottom: none; }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
  padding: 60px 0 40px; text-align: center;
}
.hero h1 { color: var(--primary); margin-bottom: 12px; font-size: clamp(24px, 5vw, 36px); line-height: 1.4; }
.hero .subtitle { font-size: 18px; color: var(--text-secondary); margin-bottom: 24px; }
.trust-badges { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.badge {
  background: white; padding: 6px 16px; border-radius: 99px;
  font-size: 14px; font-weight: 500; color: var(--success);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}

/* ---- CALCULATOR ---- */
.calc-section { padding: 40px 0; }
.calc-card {
  background: white; border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  overflow: hidden; max-width: 680px; margin: 0 auto;
}
.calc-tabs { display: flex; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.tab-btn {
  flex: 1; padding: 14px 8px; background: none; border: none;
  border-bottom: 3px solid transparent; cursor: pointer;
  font-size: 15px; font-weight: 500; color: var(--text-secondary);
  transition: all 0.2s; min-height: auto; width: auto; border-radius: 0;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: white; }
.tab-panel { display: none; padding: 28px; }
.tab-panel.active { display: block; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 15px; font-weight: 500; color: var(--text-primary); margin-bottom: 8px; }
.form-hint { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.cycle-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hijri-selects { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 10px; }

/* ---- RESULTS ---- */
#result-panel {
  display: none; padding: 28px; border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
#result-panel.show { display: block; animation: slideDown 0.4s ease; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-main {
  background: linear-gradient(135deg, #9333EA, #F472B6);
  border-radius: var(--radius-lg); padding: 24px; text-align: center; margin-bottom: 16px;
}
.result-main .due-label { font-size: 13px; color: rgba(255,255,255,0.85); margin-bottom: 6px; }
.result-main .due-date { font-size: 26px; font-weight: 700; color: #FFFFFF; margin-bottom: 4px; }
.result-main .due-hijri { font-size: 14px; color: rgba(255,255,255,0.9); }

.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.result-item {
  background: #FFFFFF; border: 1px solid #E5E7EB;
  border-radius: var(--radius-md); padding: 16px; text-align: center;
}
.result-item .r-icon { font-size: 24px; margin-bottom: 6px; }
.result-item .r-label { font-size: 12px; color: #6B7280; margin-bottom: 4px; }
.result-item .r-value { font-size: 17px; font-weight: 700; color: #111827; }
.result-item .r-sub { font-size: 12px; color: #9CA3AF; margin-top: 2px; }

.progress-wrap { margin: 12px 0 4px; }
.progress-bar { height: 10px; border-radius: 99px; background: var(--border); overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(to left, var(--accent), var(--primary));
  transition: width 1s ease;
  margin-left: auto;
}
.progress-labels { display: flex; justify-content: space-between; font-size: 12px; color: #6B7280; margin-top: 4px; }

.input-error {
  display: none;
  color: #DC2626;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 8px;
}

.result-actions { display: flex; gap: 10px; margin-top: 16px; }
.result-actions > * { flex: 1; }
.result-actions .btn-secondary {
  background: #9333EA; color: white; border: none;
  display: flex; align-items: center; justify-content: center;
}
.result-actions .btn-secondary:hover { background: #7E22CE; color: white; }

/* ---- STEPS ---- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { text-align: center; padding: 24px; }
.step-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary-light); display: flex;
  align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 28px;
}
.step-num { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.step-card h3 { margin-bottom: 8px; }

/* ---- TRIMESTER CARDS ---- */
.trimester-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trimester-card { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.trimester-header { padding: 20px; text-align: center; }
.t1 .trimester-header { background: #EDE9FE; }
.t2 .trimester-header { background: #FDF2F8; }
.t3 .trimester-header { background: #ECFDF5; }
.trimester-header .t-icon { font-size: 32px; margin-bottom: 8px; }
.trimester-header h3 { margin-bottom: 4px; }
.trimester-weeks { font-size: 13px; color: var(--text-muted); }
.trimester-body { padding: 20px; background: white; }
.trimester-body p { font-size: 14px; margin-bottom: 16px; }

/* ---- TOOLS GRID ---- */
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tool-card {
  display: block; text-align: center; padding: 24px 16px;
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: all 0.2s; color: var(--text-primary);
}
.tool-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--primary); }
.tool-card .t-icon { font-size: 36px; margin-bottom: 12px; }
.tool-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }
.tool-card p { font-size: 13px; color: var(--text-muted); }

/* ---- FAQ ---- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; }
details summary {
  padding: 18px 20px; cursor: pointer; font-weight: 500; font-size: 16px;
  list-style: none; display: flex; justify-content: space-between;
  align-items: center; background: white; color: var(--text-primary);
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; font-size: 22px; color: var(--primary); flex-shrink: 0; margin-right: 12px; }
details[open] summary::after { content: '−'; }
details[open] summary { color: var(--primary); background: var(--primary-light); }
.faq-answer { padding: 0 20px 18px; color: var(--text-secondary); font-size: 15px; line-height: 1.8; background: white; }

/* ---- FOOTER ---- */
.footer { background: #111827; color: rgba(255,255,255,0.8); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { font-size: 20px; font-weight: 700; color: white; margin-bottom: 12px; }
.footer-tagline { font-size: 14px; color: rgba(255,255,255,0.55); line-height: 1.8; }
.footer h4 { color: white; font-size: 15px; margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.65); font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 13px; color: rgba(255,255,255,0.45); }

/* ---- WEEK PAGES ---- */
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-muted); padding: 16px 0; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb .sep { color: var(--border-strong); }
.breadcrumb .current { color: var(--text-primary); font-weight: 500; }
.week-hero { background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%); padding: 40px 0; text-align: center; }
.week-hero h1 { color: var(--primary); margin-bottom: 8px; }
.week-badge { display: inline-block; background: var(--primary); color: white; padding: 4px 16px; border-radius: 99px; font-size: 14px; font-weight: 700; margin-bottom: 16px; }

/* ── Week Illustration ── */
.week-illustration {
  background: linear-gradient(135deg, #FAF5FF, #FDF2F8);
  border: 1px solid #E9D5FF;
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem 1.5rem;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.illustration-baby { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.illustration-baby svg { width: 110px; height: 110px; filter: drop-shadow(0 4px 12px rgba(147,51,234,0.15)); }
.illustration-label { font-size: 12px; color: var(--text-secondary); text-align: center; }
.illustration-divider { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.illustration-divider::before, .illustration-divider::after { content: ''; width: 36px; height: 1px; background: #D8B4FE; }
.illustration-fruit { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fruit-emoji { font-size: 52px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08)); }
.fruit-name { font-size: 14px; font-weight: 600; color: var(--text-primary); text-align: center; }
.illustration-measurements {
  display: flex;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  width: 100%;
  max-width: 340px;
}
.measurement { flex: 1; padding: 12px 6px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.measurement-label { font-size: 10px; color: var(--text-muted); letter-spacing: 0.3px; }
.measurement-value { font-size: 13px; font-weight: 700; color: var(--primary); }
.measurement-divider { width: 1px; background: var(--border); margin: 8px 0; flex-shrink: 0; }
.illustration-disclaimer { font-size: 11px; color: var(--text-muted); text-align: center; font-style: italic; margin: 0; padding: 0 8px; }
@media (min-width: 640px) {
  .week-illustration { flex-direction: row; justify-content: center; flex-wrap: wrap; padding: 2rem; }
  .illustration-measurements { flex-basis: 100%; }
  .illustration-baby svg { width: 130px; height: 130px; }
  .fruit-emoji { font-size: 60px; }
}

.week-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.info-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; box-shadow: var(--shadow-sm); }
.info-card .i-icon { font-size: 28px; margin-bottom: 8px; }
.info-card .i-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.info-card .i-value { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.info-card .i-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.week-content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; margin: 28px 0; }
.content-section { margin-bottom: 28px; }
.content-section h2 { font-size: 20px; margin-bottom: 12px; }
.content-section p { font-size: 16px; line-height: 1.85; }
.tip-box { background: var(--primary-light); border-radius: var(--radius-md); padding: 20px; border-right: 4px solid var(--primary); }
.tip-label { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.tip-box p { color: var(--text-primary); font-size: 15px; }
.week-sidebar .card { margin-bottom: 16px; }
.week-sidebar h3 { font-size: 16px; margin-bottom: 12px; }
.week-nav { display: flex; justify-content: space-between; gap: 12px; padding: 24px 0; border-top: 1px solid var(--border); }
.week-nav a { display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: white; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-secondary); font-size: 14px; font-weight: 500; transition: all 0.2s; }
.week-nav a:hover { border-color: var(--primary); color: var(--primary); }
.week-nav a.disabled { opacity: 0.4; pointer-events: none; }

/* ---- WEEKS GRID PAGE ---- */
.weeks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.week-card { display: block; text-align: center; padding: 16px; background: white; border: 1px solid var(--border); border-radius: var(--radius-md); transition: all 0.2s; color: var(--text-primary); }
.week-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.week-card .wc-num { font-size: 22px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.week-card .wc-fruit { font-size: 22px; margin-bottom: 4px; }
.week-card .wc-size { font-size: 12px; color: var(--text-muted); }
.trimester-label { font-size: 14px; font-weight: 700; color: var(--text-secondary); padding: 20px 0 12px; border-bottom: 2px solid var(--border); margin-bottom: 16px; }

/* ---- OVULATION / PERIOD ---- */
.calc-wide { max-width: 820px; }
.calendar-wrap { margin-top: 24px; }
.cal-month-header { text-align: center; font-size: 18px; font-weight: 700; margin-bottom: 12px; color: var(--text-primary); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day-header { text-align: center; font-size: 12px; font-weight: 700; color: var(--text-muted); padding: 8px 2px; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; }
.cal-day.period { background: #FEE2E2; color: #DC2626; }
.cal-day.fertile { background: #FEF3C7; color: #B45309; }
.cal-day.ovulation { background: #D1FAE5; color: #059669; font-weight: 700; }
.cal-day.today { border: 2px solid var(--primary); }
.cal-day.other-month { opacity: 0.3; }
.cal-legend { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 16px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); }
.legend-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.dot-period { background: #DC2626; }
.dot-fertile { background: #B45309; }
.dot-ovulation { background: #059669; }
.ovulation-result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.ov-result-item { background: white; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; text-align: center; }
.ov-result-item .or-icon { font-size: 26px; margin-bottom: 6px; }
.ov-result-item .or-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.ov-result-item .or-value { font-size: 16px; font-weight: 700; color: var(--text-primary); }

.forecast-list { list-style: none; }
.forecast-item { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: white; border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 10px; }
.forecast-item .fi-date { font-weight: 700; font-size: 16px; }
.forecast-item .fi-duration { font-size: 14px; color: var(--text-secondary); }
.forecast-item .fi-days { background: var(--primary-light); color: var(--primary); padding: 4px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; }

/* ---- SYMPTOMS PAGE ---- */
.symptoms-section { margin-bottom: 2.5rem; }
.symptoms-section > h2 { font-size: 20px; font-weight: 700; line-height: 1.5; white-space: normal; word-break: keep-all; padding: 1rem 1.25rem; background: linear-gradient(135deg, var(--primary-light), var(--accent-light)); border-radius: var(--radius-md); margin-bottom: 1.25rem; }
.symptom-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.symptom-item { display: flex; align-items: flex-start; gap: 12px; padding: 1.25rem; background: white; border: 1px solid var(--border); border-radius: var(--radius-md); }
.symptom-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.symptom-item h4 { font-size: 15px; margin-bottom: 4px; color: var(--text-primary); }
.symptom-item p { font-size: 13px; }
.danger-box { background: #FEF2F2; border: 1px solid #FECACA; border-radius: var(--radius-lg); padding: 24px; margin-top: 32px; }
.danger-box h3 { color: #DC2626; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; font-size: 20px; }
.danger-list { list-style: none; }
.danger-list li { padding: 10px 0; border-bottom: 1px solid #FECACA; font-size: 15px; color: #7F1D1D; display: flex; align-items: center; gap: 10px; }
.danger-list li:last-child { border-bottom: none; }

/* ---- WEEKS JUMP BOX ---- */
.weeks-jump-box { background: white; border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.75rem; margin: 0 auto 2rem; max-width: 600px; text-align: right; box-shadow: var(--shadow-sm); }
.weeks-jump-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.weeks-jump-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 1.25rem; }
.weeks-jump-input-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.weeks-jump-input-wrapper { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.weeks-jump-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.weeks-jump-input { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); font-family: 'Tajawal', sans-serif; font-size: 15px; background: var(--bg-soft); cursor: pointer; min-height: 48px; text-align: right; box-sizing: border-box; }
.weeks-jump-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(147,51,234,0.1); }
.weeks-jump-btn { background: var(--primary); color: white; border: none; border-radius: var(--radius-md); padding: 12px 24px; font-family: 'Tajawal', sans-serif; font-size: 15px; font-weight: 500; cursor: pointer; min-height: 48px; white-space: nowrap; transition: background 0.2s; flex-shrink: 0; }
.weeks-jump-btn:hover { background: var(--primary-dark, #7e22ce); }
.weeks-jump-hint { font-size: 12px; line-height: 1.6; margin-top: 12px; margin-bottom: 0; padding: 10px 12px; background: var(--primary-light); border-radius: var(--radius-sm); color: var(--primary-dark, #6b21a8); }

/* Flatpickr RTL */
.flatpickr-calendar {
  width: 320px !important;
  font-family: 'Tajawal', sans-serif !important;
  direction: rtl !important;
}
.flatpickr-months { direction: rtl; }
.flatpickr-month { width: 100% !important; }
.flatpickr-current-month {
  width: 100% !important;
  display: flex !important;
  flex-direction: row-reverse !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 !important;
  font-size: 15px !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-family: 'Tajawal', sans-serif !important;
  font-size: 15px !important;
}
.flatpickr-current-month input.cur-year {
  font-family: 'Tajawal', sans-serif !important;
  font-size: 15px !important;
}
.flatpickr-day { font-family: 'Tajawal', sans-serif !important; }
.flatpickr-weekday {
  font-family: 'Tajawal', sans-serif !important;
  font-size: 13px !important;
}
.flatpickr-day.selected {
  background: #9333EA !important;
  border-color: #9333EA !important;
}
.flatpickr-day.today {
  border-color: #9333EA !important;
  color: #9333EA !important;
}

/* ---- HOLIDAY DETECTION ---- */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}


.holiday-card {
  margin: 16px 0 0;
  padding: 24px;
  background: linear-gradient(135deg, #FFF8E7, #FFF3CD);
  border: 1px solid #F59E0B;
  border-radius: var(--radius-lg);
  text-align: center;
  animation: slideDown 0.4s ease;
}
.holiday-emoji { font-size: 40px; margin-bottom: 8px; }
.holiday-title { font-size: 18px; font-weight: 700; color: #92400E; margin-bottom: 6px; }
.holiday-message { font-size: 15px; color: #78350F; margin-bottom: 4px; line-height: 1.6; }
.holiday-sub { font-size: 13px; color: #92400E; opacity: 0.85; }

/* ---- BABY NAMES ---- */
.gender-selector-section {
  margin: 20px 0 0;
  padding: 20px;
  background: var(--accent-light);
  border-radius: var(--radius-lg);
  border: 1px solid #F9A8D4;
  text-align: center;
}
.gender-selector-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
}
.gender-pills {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.gender-pill {
  background: white;
  border: 1px solid #F9A8D4;
  border-radius: 99px;
  padding: 8px 20px;
  font-size: 14px;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 40px;
  width: auto;
  color: var(--text-primary);
}
.gender-pill:hover { border-color: var(--accent); color: var(--accent); }
.gender-pill.active { background: var(--accent); color: white; border-color: var(--accent); }

.names-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.name-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  transition: box-shadow 0.2s;
}
.name-card:hover { box-shadow: var(--shadow-md); }
.name-text { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.name-meaning { font-size: 12px; color: var(--text-secondary); line-height: 1.4; margin-bottom: 6px; }
.name-origin { font-size: 11px; color: var(--text-muted); background: var(--bg-soft); padding: 2px 8px; border-radius: 99px; display: inline-block; }

/* ---- RESPONSIVE ---- */
@media (min-width: 768px) {
  .tools-grid { grid-template-columns: repeat(4, 1fr); }
}

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

@media (max-width: 768px) {
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .steps-grid { grid-template-columns: 1fr; }
  .trimester-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .week-info-grid { grid-template-columns: 1fr 1fr; }
  .week-content-grid { grid-template-columns: 1fr; }
  .week-sidebar { display: none; }
  .weeks-grid { grid-template-columns: repeat(3, 1fr); }
  .symptom-list { grid-template-columns: 1fr; }
  .result-actions { flex-direction: column; }
  .hijri-selects { grid-template-columns: 1fr 1fr; }
  .cycle-row { grid-template-columns: 1fr; }
  .ovulation-result-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 24px; }
  .section { padding: 40px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .tab-panel { padding: 20px 16px; }
  #result-panel { padding: 20px 16px; }
  .trust-badges { gap: 8px; }
  .badge { font-size: 13px; padding: 5px 10px; }
  .weeks-grid { grid-template-columns: repeat(2, 1fr); }
  .week-info-grid { grid-template-columns: 1fr; }
  .weeks-jump-input-row { flex-direction: column; }
  .weeks-jump-btn { width: 100%; }
  .names-grid { grid-template-columns: 1fr; }
}
