/* ============================================================
   Shared design system for fatmaelbarbary.com
   Ported to match academy.fatmaelbarbary.com (mama-courses)
   ============================================================ */

:root {
  /* Candle */
  --cream: #f1ecdb;
  --cream-alt: #e7e0c9;
  /* Warm Wood */
  --ink: #3c1b0f;
  --ink-soft: #7c6353;
  --ink-faint: #b7a896;

  /* Bow — تربية الأبناء */
  --rose: #a8433f;
  --rose-deep: #7e2625;
  --rose-tint: #e6cec5;

  /* Juniper — القيادة والتخطيط */
  --gold: #4b5730;
  --gold-deep: #292f17;
  --gold-tint: #d9dac3;

  /* Leaf — تطوير الذات */
  --sage: #868859;
  --sage-deep: #5b5e39;
  --sage-tint: #e1e2cc;

  /* Warm Wood (rust variant) — التواصل والعلاقات */
  --lavender: #8a5a3e;
  --lavender-deep: #5c3018;
  --lavender-tint: #ead9c4;

  --error: #a8433f;

  --border: rgba(60, 27, 15, 0.16);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);

  --r-sm: 2px;
  --r-md: 3px;
  --r-lg: 4px;

  --font-body: "Lateef", serif;
  --font-head: "Fustat", serif;
  --font-head-scale: 0.8;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-size: 130%;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
}
p {
  margin: 0;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
input,
textarea,
select {
  font-family: inherit;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

:focus-visible {
  outline: 3px solid var(--lavender-deep);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(241, 236, 219, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
}
.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: calc(1.5rem * var(--font-head-scale));
  color: var(--ink);
  white-space: nowrap;
}
.brand span {
  color: var(--rose-deep);
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.nav-links a {
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  border-color: var(--rose);
}
.nav-links a.nav-academy {
  color: var(--rose-deep);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.nav-mobile {
  display: none;
}
.nav-mobile.open {
  display: block;
}
.nav-mobile .wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0 20px;
}
.nav-mobile > .wrap > a {
  display: block;
  padding: 10px 2px;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--border);
}
.nav-mobile .nav-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding-top: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--rose-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn-primary:disabled {
  opacity: 0.6;
  transform: none;
  box-shadow: none;
  cursor: default;
}
.btn-ghost {
  color: var(--ink);
}
.btn-ghost:hover {
  color: var(--rose-deep);
}
.btn-outline {
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--cream);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}
.btn-block {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 40px;
}
.hero-text h1 {
  font-size: calc(clamp(2.3rem, 4.2vw, 3.4rem) * var(--font-head-scale));
  line-height: 1.28;
  color: var(--ink);
  max-width: 18ch;
}
.hero-sub {
  margin-top: 22px;
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-stat b {
  display: block;
  font-family: var(--font-head);
  font-size: calc(1.6rem * var(--font-head-scale));
  color: var(--ink);
}
.hero-stat span {
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.hero-tag {
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--rose-deep);
  background: var(--rose-tint);
  padding: 5px 14px;
  border-radius: var(--r-sm);
  margin-bottom: 18px;
}

/* ---------- Section heads ---------- */
.section {
  padding: 48px 0;
}
.section-head {
  margin-bottom: 28px;
  max-width: 56ch;
}
.section-head.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head h2 {
  font-size: calc(clamp(1.5rem, 2.6vw, 2rem) * var(--font-head-scale));
}
.section-head p {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 1rem;
}
.section-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

/* ---------- Generic card ---------- */
.card {
  background: var(--cream-alt);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Course-style tinted cards ---------- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.course-card {
  border-radius: var(--r-lg);
  border: 1.5px solid var(--ink);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.course-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
}
.course-card.rose {
  background: var(--rose-tint);
}
.course-card.gold {
  background: var(--gold-tint);
}
.course-card.sage {
  background: var(--sage-tint);
}
.course-card.lavender {
  background: var(--lavender-tint);
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  white-space: nowrap;
}
.course-card h3 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.5;
}
.course-desc {
  font-size: 0.92rem;
  color: var(--ink-soft);
  flex-grow: 1;
}
.card-meta {
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  gap: 10px;
  flex-wrap: wrap;
}
.price {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: calc(1.3rem * var(--font-head-scale));
}
.price small {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-faint);
}

/* ---------- Bio card ---------- */
.bio-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  align-items: center;
}
.bio-avatar {
  width: 76px;
  height: 76px;
  border-radius: 44% 56% 62% 38% / 48% 42% 58% 52%;
  background: var(--rose-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.bio-avatar span {
  font-family: var(--font-head);
  font-size: calc(2rem * var(--font-head-scale));
  font-weight: 700;
  color: var(--rose-deep);
}
.bio-card h3 {
  font-size: calc(1.15rem * var(--font-head-scale));
}
.bio-role {
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.bio-desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.bio-link {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--rose-deep);
  margin-top: 4px;
}

/* ---------- Toggle-in-card (certifications / terms) ---------- */
.toggle-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  text-align: right;
}
.toggle-card-head h3 {
  font-size: calc(1.1rem * var(--font-head-scale));
}
.toggle-card-action {
  color: var(--rose-deep);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.toggle-card-body {
  margin-top: 16px;
  display: none;
}
.toggle-card-body.open {
  display: block;
}
.toggle-card-body ul {
  list-style: disc;
  padding-right: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toggle-card-body li,
.toggle-card-body p {
  color: var(--ink-soft);
}

/* ---------- Steps ---------- */
.steps-grid {
  display: grid;
  gap: 18px;
}
.step-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--cream-alt);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--rose-deep);
  color: var(--cream);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: calc(1.1rem * var(--font-head-scale));
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-body h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.step-body p {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ---------- Plain bullet list ---------- */
.plain-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plain-list li {
  position: relative;
  padding-right: 22px;
  color: var(--ink-soft);
}
.plain-list li::before {
  content: "•";
  position: absolute;
  right: 0;
  color: var(--rose-deep);
  font-weight: 800;
}

/* ---------- Highlight card (schedule / price) ---------- */
.highlight-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.98rem;
}
.highlight-row:last-of-type {
  border-bottom: none;
}
.highlight-row b {
  color: var(--ink);
}
.price-tag {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1.5px solid var(--ink);
}
.price-tag .amount {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: calc(2rem * var(--font-head-scale));
  color: var(--ink);
}
.price-tag .note {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 4px;
}
.urgency-note {
  text-align: center;
  font-size: 0.88rem;
  color: var(--rose-deep);
  font-weight: 700;
  margin-top: 12px;
}

/* ---------- Video ---------- */
.video-wrap {
  background: #000;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video-wrap video {
  width: 100%;
  display: block;
}

/* ---------- Testimonials ---------- */
.testimonial-carousel {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.testimonial-track {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.testimonial-track::-webkit-scrollbar {
  display: none;
}
.testimonial-card {
  position: relative;
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: min(85vw, 340px);
  display: flex;
  flex-direction: column;
}
.testimonial-card .quote-mark {
  font-family: var(--font-head);
  font-size: calc(2.6rem * var(--font-head-scale));
  color: var(--lavender);
  line-height: 1;
}
.testimonial-card p {
  font-size: 0.92rem;
  color: var(--ink);
  margin-top: 6px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  overflow: hidden;
}
.testimonial-card p.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.testimonial-card cite {
  display: block;
  margin-top: 14px;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--ink-faint);
}
.read-more-btn {
  display: none;
  align-self: flex-start;
  margin-top: 8px;
  padding: 0;
  color: var(--rose-deep);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
}
.read-more-btn:hover {
  color: var(--rose);
}
.carousel-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--ink);
  background: var(--cream);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition:
    background 0.15s,
    color 0.15s;
}
.carousel-btn:hover {
  background: var(--ink);
  color: var(--cream);
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.carousel-dots .dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  background: var(--ink-faint);
}
.carousel-dots .dot.active {
  background: var(--rose-deep);
  transform: scale(1.3);
}
@media (max-width: 600px) {
  .carousel-btn {
    display: none;
  }
}

/* ---------- FAQ ---------- */
.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child {
  padding-top: 0;
}
.faq-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.faq-question {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.faq-answer {
  color: var(--ink-soft);
}

/* ---------- Forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.field label .req {
  color: var(--rose-deep);
  margin-left: 2px;
}
.field input[type="text"],
.field textarea,
.field select {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--cream);
  color: var(--ink);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  direction: rtl;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.field input[type="text"]:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--rose-deep);
  outline: none;
}
.field input.invalid {
  border-color: var(--error);
}
.field textarea {
  resize: vertical;
  min-height: 90px;
}
.field-error {
  font-size: 0.82rem;
  color: var(--error);
  display: none;
}
.field-hint {
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.form-card {
  max-width: 480px;
  margin: 0 auto;
}
.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.chip-input {
  display: none;
}
.chip-label {
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--cream);
  transition: all 0.15s ease;
}
.chip-label:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.chip-input:checked + .chip-label {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.privacy-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 14px;
  line-height: 1.6;
}
.location-status {
  font-size: 0.78rem;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.dot-pulse {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.dot-pulse span {
  width: 4px;
  height: 4px;
  background: var(--ink-faint);
  border-radius: 50%;
  animation: pulse 1.2s infinite ease-in-out;
}
.dot-pulse span:nth-child(2) {
  animation-delay: 0.2s;
}
.dot-pulse span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes pulse {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ---------- Accordion (details) ---------- */
details.acc {
  background: var(--cream-alt);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
details.acc + details.acc {
  margin-top: 12px;
}
details.acc summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
details.acc summary::-webkit-details-marker {
  display: none;
}
details.acc summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.3rem;
  color: var(--rose-deep);
  line-height: 1;
  transition: transform 0.15s;
}
details.acc[open] summary::after {
  transform: rotate(45deg);
}
details.acc[open] summary {
  border-bottom: 1px solid var(--border);
}
.acc-body {
  padding: 4px 20px 20px;
  color: var(--ink-soft);
}
.acc-body ul {
  padding-right: 20px;
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Fade-in on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 56px 0 28px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(241, 236, 219, 0.14);
}
.footer-brand {
  font-family: var(--font-head);
  font-size: calc(1.4rem * var(--font-head-scale));
  font-weight: 700;
}
.footer-tag {
  margin-top: 12px;
  font-size: 0.88rem;
  color: rgba(241, 236, 219, 0.65);
  max-width: 32ch;
}
.footer-col h4 {
  font-size: 0.85rem;
  color: rgba(241, 236, 219, 0.55);
  margin-bottom: 14px;
  font-weight: 700;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  padding: 5px 0;
  color: rgba(241, 236, 219, 0.88);
}
.footer-col a:hover {
  color: var(--rose);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: rgba(241, 236, 219, 0.55);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links,
  .nav > .wrap > .nav-actions {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .hero-text h1 {
    max-width: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .wrap {
    padding: 0 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    gap: 20px;
  }
}
