/* ============================================
   SHARED STYLES — המסע אל הלידה
   ============================================ */

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

:root {
  --bg: #FAF6F1;
  --bg2: #F0E8DF;
  --white: #FFFFFF;
  --text: #3D3232;
  --text2: #8C7B6B;
  --accent: #C4956A;
  --accent-dark: #A87B56;
  --accent-light: #EDD9C3;
  --border: #E5DCD3;
  --shadow: 0 4px 24px rgba(61,50,50,0.08);
  --shadow-lg: 0 12px 40px rgba(61,50,50,0.13);
  --radius: 16px;
  --radius-sm: 10px;

  /* Category colors */
  --before-color: #7BA7BC;
  --before-light: #E8F2F7;
  --birth-color: #C4956A;
  --birth-light: #EDD9C3;
  --after-color: #8FAF8F;
  --after-light: #E4EFE4;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Rubik', humanist;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  direction: rtl;
}

h1, h2, h3, h4 {
  font-family: 'Rubik', humanist;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,246,241,0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0;
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  display: flex;
  align-items: stretch;
  height: 64px;
}

.nav-logo {
  font-family: 'Rubik', humanist;
  font-size: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px 0 0;
  margin-left: 24px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--accent); }

.nav-categories {
  display: flex;
  list-style: none;
  gap: 0;
  flex: 1;
}

.nav-categories li { display: flex; }

.nav-categories a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text2);
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  letter-spacing: 0.01em;
}

.nav-categories a:hover {
  color: var(--text);
  background: var(--bg2);
}

.nav-categories a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--accent-light);
}

.nav-categories .cat-before a:hover,
.nav-categories .cat-before a.active { 
  color: var(--before-color); 
  border-bottom-color: var(--before-color);
  background: var(--before-light);
}
.nav-categories .cat-birth a:hover,
.nav-categories .cat-birth a.active { 
  color: var(--birth-color); 
  border-bottom-color: var(--birth-color);
  background: var(--birth-light);
}
.nav-categories .cat-tools a:hover,
.nav-categories .cat-tools a.active {
  color: #A77BBC;
  border-bottom-color: #A77BBC;
  background: #F5EBF8;
}
.nav-categories .cat-after a:hover,
.nav-categories .cat-after a.active { 
  color: var(--after-color); 
  border-bottom-color: var(--after-color);
  background: var(--after-light);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 20px 16px;
  margin-right: auto;
}
.burger span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 8px 0;
}
.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { background: var(--bg2); }
.mobile-menu.open { display: flex; }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.25s;
  cursor: pointer;
  letter-spacing: 0.02em;
  font-family: 'Rubik', humanist;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(196,149,106,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

/* ── SECTIONS ── */
section { padding: 72px 0; }

.section-title {
  text-align: center;
  margin-bottom: 52px;
}
.section-title h2 {
  font-size: clamp(26px, 4vw, 40px);
  margin-bottom: 12px;
}
.section-title p {
  color: var(--text2);
  font-size: 17px;
  max-width: 540px;
  margin: 0 auto;
}
.section-divider {
  width: 56px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  margin: 16px auto 0;
}

/* ── TOPIC CARDS (sub-topics on category pages) ── */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.topic-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--border);
  transition: all 0.28s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.topic-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.28s;
}
.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}
.topic-card:hover::before { opacity: 1; }

.topic-icon { font-size: 36px; }
.topic-card h3 {
  font-family: 'Rubik', humanist;
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
}
.topic-card p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.65;
  flex: 1;
}
.topic-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
  width: fit-content;
}
.badge-soon {
  background: #F3F4F6;
  color: #9CA3AF;
}
.badge-ready {
  background: #D1FAE5;
  color: #065F46;
}
.badge-video {
  background: #FEE2E2;
  color: #991B1B;
}

/* ── FOOTER ── */
footer {
  background: var(--text);
  color: rgba(250,246,241,0.85);
  padding: 48px 0 32px;
  text-align: center;
}
footer .footer-logo {
  font-family: 'Rubik', humanist;
  font-size: 26px;
  color: var(--accent-light);
  margin-bottom: 12px;
}
footer p { font-size: 14px; margin-bottom: 8px; }
footer .footer-love { color: var(--accent); font-size: 20px; margin: 16px 0 8px; }
footer .disclaimer {
  font-size: 12px;
  color: rgba(250,246,241,0.4);
  max-width: 560px;
  margin: 20px auto 0;
  line-height: 1.6;
}

/* ── ANIMATIONS ── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: 0.08s; }
.fade-in-delay-2 { transition-delay: 0.16s; }
.fade-in-delay-3 { transition-delay: 0.24s; }
.fade-in-delay-4 { transition-delay: 0.32s; }
.fade-in-delay-5 { transition-delay: 0.40s; }
.fade-in-delay-6 { transition-delay: 0.48s; }
.fade-in-delay-7 { transition-delay: 0.56s; }
.fade-in-delay-8 { transition-delay: 0.64s; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-categories { display: none; }
  .burger { display: flex; }
  .nav-logo { margin-right: auto; border-left: none; padding-right: 0; }
  section { padding: 56px 0; }
  .topics-grid { grid-template-columns: 1fr; }
}
