:root {
  --ink: #12202a;
  --ink-soft: #3d4d56;
  --teal: #16803c;
  --teal-deep: #0d4d24;
  --teal-mid: #2ea043;
  --gold: #c9971a;
  --gold-bright: #e8c547;
  --sand: #eef6ee;
  --paper: #fffcf7;
  --line: rgba(18, 32, 42, 0.1);
  --shadow: 0 18px 40px rgba(18, 32, 42, 0.08);
  --radius: 18px;
  --nav-h: 76px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", "Noto Sans Arabic", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  min-height: 100vh;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.container {
  width: min(1140px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(13, 77, 36, 0.22);
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-full {
  height: 46px;
  width: auto;
  display: block;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--ink-soft);
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--sand);
  color: var(--teal-deep);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover {
  background: var(--teal-deep);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: #1a1404;
}

.btn-gold:hover {
  background: var(--gold-bright);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--sand);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--gold-bright) 22%, transparent), transparent 32%),
    linear-gradient(160deg, var(--teal-deep) 0%, var(--teal) 48%, var(--ink) 100%);
  color: #fff;
  padding: 72px 0 88px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 30% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.25;
  margin-bottom: 16px;
}

.hero p.lead {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.84);
  max-width: 38ch;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  gap: 28px;
}

.hero-stats b {
  display: block;
  font-size: 1.45rem;
}

.hero-stats span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.hero-card {
  background: rgba(255, 252, 247, 0.96);
  color: var(--ink);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.22);
}

.hero-card h3 {
  margin-bottom: 14px;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.bar {
  height: 9px;
  background: #eadfca;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}

.bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #27a3a3);
  border-radius: inherit;
}

.mini-course {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.dot {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

section {
  padding: 72px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: 1.9rem;
  line-height: 1.3;
}

.muted {
  color: var(--ink-soft);
}

.grid-3,
.grid-4,
.courses-grid {
  display: grid;
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.courses-grid {
  grid-template-columns: repeat(3, 1fr);
}

.card,
.course-card,
.feature,
.stat-box,
.form-card,
.dash-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature,
.stat-box {
  padding: 22px;
}

.feature h3,
.stat-box h3 {
  margin: 10px 0 8px;
}

.icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--sand);
  color: var(--teal);
}

.course-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.course-cover {
  height: 128px;
  padding: 18px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.8rem;
  font-weight: 700;
}

.course-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.course-body h3 {
  font-size: 1.12rem;
  line-height: 1.45;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.course-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
}

.price {
  font-weight: 800;
  color: var(--teal-deep);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}

.chip.active,
.chip:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.page-hero {
  background: linear-gradient(180deg, #eef6f4, var(--paper));
  padding: 48px 0 20px;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.detail-cover {
  height: 180px;
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.module {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.module input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.form-card {
  padding: 28px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 1rem;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  background: #fdeeee;
  color: #8a1f1f;
  display: none;
}

.alert.show {
  display: block;
}

.alert.ok {
  background: #e7f6ef;
  color: #145c38;
}

.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.progress-ring-label {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft);
}

.site-footer {
  background: #0d1a20;
  color: rgba(255, 255, 255, 0.82);
  padding: 40px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.site-footer a:hover {
  color: var(--gold-bright);
}

.copy {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
}

.quote {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 24px;
}

.quote p {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .hero-grid,
  .split,
  .grid-3,
  .grid-4,
  .courses-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links,
  .nav-actions {
    display: none;
  }

  .nav.open .nav-links,
  .nav.open .nav-actions {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    right: 0;
    left: 0;
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    align-items: stretch;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 40%),
    linear-gradient(160deg, var(--teal-deep), var(--ink));
}

.admin-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.admin-side {
  background: var(--ink);
  color: #fff;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-side .logo {
  color: #fff;
  margin-bottom: 8px;
}

.admin-side nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.side-link {
  text-align: right;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.78);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.side-link.active,
.side-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold-bright);
}

.side-foot .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

.admin-main {
  padding: 28px;
  background: var(--paper);
}

.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin-table th {
  background: var(--sand);
  font-size: 0.9rem;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn.danger {
  color: #8a1f1f;
  border-color: #f0c9c9;
}

.enroll-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.color-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.color-field input[type="color"] {
  height: 42px;
  padding: 4px;
  margin: 0;
}

.theme-preview {
  border: 1px dashed var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--p-paper, var(--paper));
  color: var(--p-ink, var(--ink));
}

.preview-hero {
  background: linear-gradient(90deg, var(--p-teal, var(--teal)), var(--teal-deep));
  color: #fff;
  padding: 18px;
  font-weight: 800;
}

.preview-row {
  display: flex;
  gap: 10px;
  padding: 14px;
}

.preview-btn,
.preview-gold {
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.9rem;
}

.preview-btn {
  background: var(--p-teal, var(--teal));
  color: #fff;
}

.preview-gold {
  background: var(--p-gold, var(--gold));
  color: #1a1404;
}

.cert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.certificate {
  background:
    radial-gradient(circle at 10% 15%, rgba(232, 197, 71, 0.18), transparent 28%),
    linear-gradient(180deg, #fffdf8, #f7f1e4);
  border: 12px solid var(--teal-deep);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.cert-inner {
  border: 1px solid color-mix(in srgb, var(--gold) 55%, #fff);
  padding: 36px 28px;
  text-align: center;
}

.cert-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.cert-kicker {
  letter-spacing: 0.3em;
  color: var(--teal);
  font-weight: 800;
}

.cert-inner h1 {
  font-size: 1.1rem;
  margin: 10px 0;
  color: var(--ink-soft);
  font-weight: 600;
}

.cert-name {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--teal-deep);
  margin: 6px 0 10px;
}

.cert-course {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 8px 0 22px;
}

.cert-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.cert-meta span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.cert-verify {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.video-wrap {
  position: relative;
  padding-top: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lecture-video {
  width: 100%;
  border-radius: 14px;
  background: #111;
}

.lecture-body {
  line-height: 1.9;
  font-size: 1.05rem;
}

@media (max-width: 900px) {
  .two-col,
  .cert-meta {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-main {
    padding: 16px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .cert-actions,
  .menu-toggle {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .certificate {
    box-shadow: none;
  }
}
