/* ══════════════════════════════════════════════════════════════
   Hefni Media — Components CSS
   Header, Footer, Navbar, Cards, Accordion, Modal
   ══════════════════════════════════════════════════════════════ */

/* ── Navbar — Floating Pill (owais.media style) ─────────────────── */

.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  width: calc(100% - 32px);
  max-width: 1180px;
  border-radius: 9999px;
  background: rgba(15, 42, 67, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.4s ease, box-shadow 0.4s ease, top 0.3s ease, border-color 0.4s ease;
}

/* الحالة بعد السكرول أو على صفحات بدون hero */
.navbar.scrolled {
  background: rgba(15, 42, 67, 0.92);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.06);
  top: 10px;
}

/* ── الداخل ──────────────────────────────────────────────────────── */
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  gap: 12px;
  min-height: 68px;
}

/* ── Logo: صورة دائرية + اسم البراند ───────────────────────────── */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.navbar-profile {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(212, 169, 78, 0.6);
  flex-shrink: 0;
  transition: border-color 0.2s, transform 0.2s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.navbar-logo:hover .navbar-profile {
  border-color: var(--color-accent);
  transform: scale(1.06);
}

.navbar-logo img:not(.navbar-profile) {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.navbar-logo-text {
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-display);
  letter-spacing: -0.2px;
  white-space: nowrap;
}

/* ── روابط التنقل ───────────────────────────────────────────────── */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.navbar-link {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 9999px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.navbar-link:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.navbar-link.active { color: var(--color-accent); }

/* زر الاستشارة بالواتساب */
.navbar-wa-consult {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #25D366 !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 9999px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.navbar-wa-consult svg { fill: #25D366; }
.navbar-wa-consult:hover {
  color: #1ebe5d !important;
  background: rgba(37, 211, 102, 0.12) !important;
}

/* زر CTA — أبيض solid مثل owais.media */
.navbar-cta {
  background: #fff;
  color: var(--color-primary) !important;
  padding: 9px 22px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-display);
  transition: all 0.22s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.navbar-cta:hover {
  background: var(--color-accent);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(212, 169, 78, 0.4);
}

/* ── Hamburger (mobile) ─────────────────────────────────────────── */
.navbar-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 9999px;
  transition: background 0.15s;
  line-height: 0;
}
.navbar-toggle:hover { background: rgba(255, 255, 255, 0.22); }

/* ── Mobile dropdown ────────────────────────────────────────────── */
@media (max-width: 820px) {
  .navbar-inner { padding: 8px 16px; min-height: 60px; }
  .navbar-toggle { display: block; }

  .navbar-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    background: rgba(15, 42, 67, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    flex-direction: column;
    padding: 12px 16px 18px;
    gap: 2px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  }
  .navbar-nav.open { display: flex; }

  .navbar-link,
  .navbar-wa-consult {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
  }
  .navbar-cta {
    width: 100%;
    text-align: center;
    margin-top: 6px;
    padding: 12px 22px;
  }
}


/* ── Hero Section ───────────────────────────────────────────────── */
.hero {
  background: var(--color-primary);
  color: #fff;
  /* top(16) + navbar(68) + breathing(60) = 144px */
  padding: 144px 0 80px;
  position: relative;
  overflow: hidden;
}


/* Decorative radial glow */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(212,169,78,0.14) 0%, transparent 62%);
  pointer-events: none;
}

/* Subtle grid texture */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) { .hero-inner { grid-template-columns: 55fr 45fr; } }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212,169,78,0.15);
  color: var(--color-accent);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 99px;
  border: 1px solid rgba(212,169,78,0.28);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.hero-title {
  color: #fff;
  margin-bottom: 22px;
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  line-height: 1.16;
}
.hero-title span { color: var(--color-accent); }

.hero-subtitle {
  color: rgba(255,255,255,0.72);
  font-size: 1.08rem;
  margin-bottom: 36px;
  line-height: 1.85;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-accent);
  font-family: var(--font-display);
  line-height: 1;
}
.hero-stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* صورة الهيرو */
.hero-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-image {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.hero-image-overlay {
  position: absolute;
  bottom: -16px;
  right: -16px;
  background: var(--color-accent);
  color: #fff;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(212,169,78,0.35);
  max-width: 190px;
  line-height: 1.5;
  font-family: var(--font-display);
}
@media (max-width: 767px) { .hero-image-overlay { display: none; } }

/* ── Course Card ────────────────────────────────────────────────── */
.course-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.course-card-image { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.course-card-image-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-accent); font-size: 3rem;
}
.course-card-body { padding: 22px; }
.course-card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; font-family: var(--font-display); }
.course-card-meta { display: flex; gap: 16px; font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 14px; }
.course-card-price { display: flex; align-items: baseline; gap: 8px; }
.price-current   { font-size: 1.45rem; font-weight: 800; color: var(--color-accent); }
.price-original  { font-size: 0.95rem; color: var(--color-text-muted); text-decoration: line-through; }

/* ── FAQ Accordion ──────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-question {
  width: 100%; text-align: right;
  background: none; border: none;
  padding: 20px 0;
  font-size: 1rem; font-weight: 600;
  cursor: pointer; color: var(--color-text);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--font-display);
  transition: color 0.15s;
}
.faq-question:hover { color: var(--color-accent); }
.faq-icon { flex-shrink: 0; font-size: 1.2rem; color: var(--color-accent); transition: transform var(--transition); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s; padding: 0; }
.faq-answer-inner { padding-bottom: 18px; color: var(--color-text-muted); line-height: 1.85; }
.faq-item.open .faq-answer { max-height: 500px; }

/* ── Modal ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--color-bg);
  border-radius: 14px;
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  padding: 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  transform: scale(0.94);
  transition: transform 0.2s;
}
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--color-text-muted); line-height: 1; }
.modal-close:hover { color: var(--color-error); }

/* ── Footer ─────────────────────────────────────────────────────── */
footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.72);
  padding: 52px 0 26px;
}
.footer-top { display: grid; grid-template-columns: 1fr; gap: 36px; margin-bottom: 36px; }
@media (min-width: 640px) { .footer-top { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand-name { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 8px; font-family: var(--font-display); }
.footer-brand-desc { font-size: 0.9rem; line-height: 1.75; }
.footer-heading { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 14px; font-family: var(--font-display); }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 0.9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--color-accent); }
.footer-socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.footer-social-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: rgba(255,255,255,0.08);
  transition: background var(--transition);
}
.footer-social-icon:hover { background: rgba(212,169,78,0.22); }
.footer-social-icon img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 26px;
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center; gap: 8px;
  font-size: 0.84rem;
}
.footer-credit { display: flex; align-items: center; gap: 6px; }
.footer-credit a { color: var(--color-accent); font-weight: 600; }

/* ── OTP ────────────────────────────────────────────────────────── */
.otp-step { display: none; }
.otp-step.active { display: block; }
.otp-method-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #25D366; color: #fff;
  font-size: 0.85rem; padding: 4px 12px; border-radius: 99px; font-weight: 600;
}
.otp-inputs { display: flex; gap: 8px; justify-content: center; direction: ltr; }
.otp-digit {
  width: 48px; height: 56px;
  text-align: center; font-size: 1.4rem; font-weight: 700;
  border: 2px solid var(--color-border); border-radius: var(--radius);
  background: var(--color-bg);
}
.otp-digit:focus { border-color: var(--color-accent); outline: none; }

/* ── Curriculum ─────────────────────────────────────────────────── */
.curriculum-section { margin-bottom: 12px; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.curriculum-section-header {
  background: var(--color-bg-alt); padding: 14px 16px;
  font-weight: 600; font-family: var(--font-display);
  display: flex; justify-content: space-between; cursor: pointer;
}
.curriculum-lessons { padding: 0 8px; }
.curriculum-lesson {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px; border-bottom: 1px solid var(--color-border); font-size: 0.9rem;
}
.curriculum-lesson:last-child { border-bottom: none; }
.lesson-icon { font-size: 1rem; flex-shrink: 0; }
.lesson-title { flex: 1; }
.lesson-duration { color: var(--color-text-muted); font-size: 0.8rem; white-space: nowrap; }

/* ── Checkout ───────────────────────────────────────────────────── */
.payment-methods { display: flex; flex-direction: column; gap: 12px; }
.payment-option {
  border: 2px solid var(--color-border); border-radius: var(--radius);
  padding: 16px; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  display: flex; align-items: center; gap: 12px;
}
.payment-option:hover { border-color: var(--color-accent); }
.payment-option.selected { border-color: var(--color-accent); background: rgba(212,169,78,0.05); }
.payment-icon  { font-size: 1.5rem; }
.payment-label { font-weight: 600; font-family: var(--font-display); }
.payment-desc  { font-size: 0.85rem; color: var(--color-text-muted); }

/* ── Sticky Sidebar ─────────────────────────────────────────────── */
.sticky-sidebar { position: sticky; top: 84px; }

/* ── Responsive Tables ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: right; }
th { background: var(--color-bg-alt); font-weight: 600; font-size: 0.9rem; font-family: var(--font-display); }
td { border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
tr:hover td { background: var(--color-bg-alt); }

/* ── Progress Bar ───────────────────────────────────────────────── */
.progress-bar { height: 6px; background: var(--color-border); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--color-accent); border-radius: 99px; transition: width 0.4s ease; }

/* ── File Upload ────────────────────────────────────────────────── */
.file-upload-zone {
  border: 2px dashed var(--color-border); border-radius: var(--radius);
  padding: 32px; text-align: center; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.file-upload-zone:hover, .file-upload-zone.drag-over {
  border-color: var(--color-accent); background: rgba(212,169,78,0.04);
}
.file-upload-zone input[type="file"] { display: none; }

/* ── Price Box ──────────────────────────────────────────────────── */
.price-box {
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: 14px; padding: 24px; box-shadow: var(--shadow);
}
.price-box-current {
  font-size: 2.2rem; font-weight: 800; color: var(--color-accent);
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-display);
}
.price-box-currency { font-size: 1rem; font-weight: 600; }
.price-box-original { color: var(--color-text-muted); text-decoration: line-through; font-size: 1rem; }
.price-box-save {
  display: inline-block; background: #dcfce7; color: #166534;
  font-size: 0.8rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; margin-right: 8px;
}
