:root {
  --bg: #f8f8fb;
  --surface: #ffffff;
  --surface2: #f1f1f5;

  --border: rgba(0, 0, 0, 0.06);
  --border2: rgba(0, 0, 0, 0.12);

  --text: #111827;
  --muted: #6b7280;

  --gold: #c9a84c;
  --gold-light: #e8c96d;
  --gold-dim: rgba(201, 168, 76, 0.15);

  --accent: #7c6fcd;
  --accent2: #a599e0;

  --green: #22c55e;

  --radius: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Tajawal", sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

/* ── Noise overlay ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.05;
}

/* ── Glow blobs ── */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.18;
  animation: blobFloat 12s ease-in-out infinite;
}
@keyframes blobFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -20px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 15px) scale(0.95);
  }
}

/* ══ NAVBAR ══ */
#navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  transition: all 0.4s ease;
  padding: 20px 0;
}
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold) 0%, #a07828 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cairo", sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: #0a0a0f;
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.3);
}
.logo-text {
  font-family: "Cairo", sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--gold);
  letter-spacing: -0.01em;
}
.logo-text span {
  color: var(--gold);
}

/* =========================
   Navbar
========================= */

.nav-links{
    display:flex;
    align-items:center;
    gap:32px;
}

.nav-link{
    position:relative;
    color:#111827;   /* الوضع الفاتح */
    font-size:.9rem;
    font-weight:600;
    text-decoration:none;
    padding:6px 4px;
    transition:color .3s ease;
}

/* أثناء الـ Scroll في الوضع الفاتح */
#navbar.scrolled .nav-link{
    color:#111827;
}

/* الوضع الداكن */
body.dark .nav-link{
    color:#ffffff;
}

/* أثناء الـ Scroll في الوضع الداكن */
body.dark #navbar.scrolled .nav-link{
    color:#ffffff;
}

/* Hover */
.nav-link:hover{
    color:var(--gold);
}

/* الرابط النشط */
.nav-link.active{
    color:var(--gold);
    font-weight:700;
}

/* الخط الذهبي أسفل الرابط */
.nav-link::after{
    content:"";
    position:absolute;
    right:0;
    bottom:-3px;
    width:0;
    height:2px;
    background:var(--gold);
    transition:width .3s ease;
}

.nav-link:hover::after,
.nav-link.active::after{
    width:100%;
}

/* زر ابدأ التعلم */
.btn-nav{
    padding:9px 22px;
    border-radius:10px;
    background:var(--gold-dim);
    border:1px solid rgba(201,168,76,.3);
    color:var(--gold-light);
    font-weight:700;
    font-size:.9rem;
    cursor:pointer;
    transition:all .25s;
    font-family:"Tajawal",sans-serif;
}

.btn-nav:hover{
    background:var(--gold);
    color:#0a0a0f;
    box-shadow:0 0 24px rgba(201,168,76,.35);
}

/* ══ MOBILE MENU ══ */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
}
.hamburger:hover {
  border-color: var(--border2);
}

#mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 15, 0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
}
#mobile-overlay.open {
  display: flex;
}
.mob-link {
  font-family: "Cairo", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.mob-link:hover {
  color: var(--gold);
}
.mob-close {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
}


.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold) 0%, #a07828 100%);
  color: #e3e1e1;
  font-weight: 800;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Tajawal", sans-serif;
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(201, 168, 76, 0.45);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid var(--border2);
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Tajawal", sans-serif;
}
.btn-outline:hover {
  background: var(--surface2);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}



/* ══ SECTION HEADER ══ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.section-label::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--gold);
}
.section-title {
  font-family: "Cairo", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 520px;
}

/* ══ CATEGORIES ══ */
#categories {
  padding: 100px 28px;
  background: var(--surface);
  position: relative;
}
#categories::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
}
#categories::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
}
.cats-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.cats-header {
  margin-bottom: 56px;
}
.cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cat-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  cursor: pointer;
  background-size: cover;
  background-position: center;

  color: white;
  transition: all 0.4s ease;
}

/* overlay */
.cat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.232);
  transition: 0.3s;
}

/* يخلي المحتوى فوق */
.cat-card > * {
  position: relative;
  z-index: 2;
}

/* Glow effect */
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--card-glow, transparent);
  opacity: 0;
  transition: 0.3s;
}

.cat-card:hover::before {
  opacity: 1;
}

/* Hover effect */
.cat-card:hover {
  transform: translateY(-8px) scale(1.02);
}

/* hover darker */
/* .cat-card:hover::after {
  background: rgba(0, 0, 0, 0.65);
} */

.cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  transition: transform 0.3s;
}
.cat-card:hover .cat-icon {
  transform: scale(1.1) rotate(-5deg);
}

.cat-num {
  position: absolute;
  top: 24px;
  left: 24px;
  font-family: "Cairo", sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  user-select: none;
}

.cat-name {
  font-size: 1.2rem;
  font-weight: 900;
}

.cat-desc {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 6px;
}

.cat-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.cat-topic-pill {
  background: var(--gold-dim);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border: none;
  color: var(--gold);
}

/* .cat-card:hover .cat-topic-pill {
  border-color: var(--border2);
  color: var(--text);
} */
.cat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.cat-count {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.cat-arrow {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: all 0.25s;
}
.cat-card:hover .cat-arrow {
  background: var(--gold);
  color: #0a0a0f;
  transform: translateX(-4px);
}

/* ══ TOPICS ══ */
#topics {
  padding: 100px 28px;
}
.topics-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.topics-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.topics-toolbar-right {
  flex: 1;
  min-width: 200px;
}
.topics-toolbar-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Search */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 18px;
  transition: all 0.25s;
}
.search-wrap:focus-within {
  border-color: rgba(201, 168, 76, 0.4);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.08);
}
.search-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: "Tajawal", sans-serif;
  font-size: 0.95rem;
  direction: rtl;
}
.search-wrap input::placeholder {
  color: var(--muted);
}
.search-icon {
  color: var(--muted);
  flex-shrink: 0;
}
.clear-btn {
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  padding: 2px;
}
.clear-btn:hover {
  color: var(--text);
}

/* Filter tabs */
.ftab {
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "Tajawal", sans-serif;
  white-space: nowrap;
}
.ftab:hover {
  border-color: var(--border2);
  color: var(--text);
}
.ftab.active {
  background: var(--gold);
  color: #0a0a0f;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
}

/* Topics grid */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.topic-card {
  border-radius: 14px;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.topic-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform 0.3s;
  transform-origin: right;
}
.topic-card:hover {
  transform: translateY(-5px);
  border-color: var(--border2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.topic-card:hover::before {
  transform: scaleX(1);
}

.topic-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.topic-title {
  font-family: "Cairo", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: auto;
  padding-bottom: 18px;
}
.topic-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.topic-time {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}
.topic-go {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.25s;
}
.topic-card:hover .topic-go {
  background: var(--gold-dim);
  border-color: rgba(201, 168, 76, 0.3);
  color: var(--gold);
}

/* Empty state */
#empty-state {
  display: none;
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ══ ABOUT ══ */
#about {
  padding: 100px 28px;
  background: var(--surface);
  position: relative;
}
#about::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
}
.about-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-features {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 40px;
}
.afeature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.afeature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--bg);
  border: 1px solid var(--border);
}
.afeature-title {
  font-family: "Cairo", sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 4px;
}
.afeature-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

/* About Visual — dashboard mockup */
.about-visual {
  position: relative;
}
.dash-mockup {
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}
.dash-bar {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dash-body {
  padding: 24px;
}
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.dash-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.dw-label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.dw-val {
  font-family: "Cairo", sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--gold);
}
.dash-bar2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.dbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.dbar-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.dbar-pct {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 700;
}
.dbar-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.dbar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--accent2));
  transition: width 1.5s ease;
}
.dash-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.dl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.dl-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.dl-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.dl-text {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}
.dl-badge {
  margin-right: auto;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--gold-dim);
  color: var(--gold-light);
  border: 1px solid rgba(201, 168, 76, 0.2);
}

/* floating badge */
.float-badge {
  position: absolute;
  top: -20px;
  left: -24px;
  background: linear-gradient(135deg, var(--gold), #a07828);
  color: #0a0a0f;
  border-radius: 12px;
  padding: 12px 18px;
  font-family: "Cairo", sans-serif;
  font-weight: 900;
  font-size: 0.88rem;
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.35);
  white-space: nowrap;
}

/* ══ MODAL ══ */
#modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#modal-overlay.open {
  display: flex;
}
#modal-box {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 24px;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  animation: modalIn 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-head {
  padding: 32px 36px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  margin-bottom: 0;
}
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
}
.modal-close:hover {
  color: var(--text);
  border-color: var(--border2);
}
.modal-body-wrap {
  padding: 36px;
}
.modal-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.modal-title {
  font-family: "Cairo", sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 8px;
}
.modal-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.modal-content {
  color: var(--muted);
  line-height: 1.85;
  font-size: 1rem;
}
.modal-content p {
  margin-bottom: 16px;
}
.modal-content h3 {
  font-family: "Cairo", sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.modal-content strong {
  color: var(--text);
  font-weight: 700;
}
.modal-footer {
  padding: 24px 36px 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


/* ══ SCROLL REVEAL ══ */
.sr {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.sr.vis {
  opacity: 1;
  transform: none;
}
.sr-delay-1 {
  transition-delay: 0.1s;
}
.sr-delay-2 {
  transition-delay: 0.2s;
}
.sr-delay-3 {
  transition-delay: 0.3s;
}
.sr-delay-4 {
  transition-delay: 0.4s;
}
.sr-delay-5 {
  transition-delay: 0.5s;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 1024px) {
  .feat-grid {
    grid-template-columns: 1fr;
  }
  .feat-main {
    grid-row: auto;
    min-height: 300px;
  }
  .cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}
@media (max-width: 768px) {
  .nav-links,
  .btn-nav {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .cats-grid {
    grid-template-columns: 1fr;
  }
  .topics-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .modal-body-wrap,
  .modal-head,
  .modal-footer {
    padding: 24px;
  }
  .about-visual {
    display: none;
  }
  .footer-socials {
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .feat-grid {
    grid-template-columns: 1fr;
  }
}
/* ===== HERO NEW ===== */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 40px;

  background: url("images/hero-bg.webp");
  background-size: cover;
  background-position: center;
}

/* طبقة فوق الصورة */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
}

/* الكونتينر */
.hero-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;

  align-items: center;
  gap: 40px;
}

/* النص */
.hero-text {
  color: white;
  text-align: right;
}

/* badge */
.hero-badge {
  display: inline-block;
  background: rgba(201, 168, 76, 0.2);
  color: var(--gold);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  margin-bottom: 20px;
}

/* العنوان */
.hero-title {
  font-size: 3rem;
  font-weight: 900;
  font-family: "Cairo", sans-serif;
  margin-bottom: 20px;

  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);

  background: linear-gradient(90deg, #c9a84c, #e8c96d);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* النص */
.hero-desc {
  color: #e5e7eb;
  line-height: 1.8;
  margin-bottom: 30px;
}

/* الأزرار */
.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}

/* stats */
.hero-stats {
  display: flex;
  gap: 40px;
}

.hero-stats .num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold);
}

.hero-stats .label {
  display: block;
  font-size: 0.8rem;
  color: #d1d5db;
}

/* الصورة */
.hero-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* موبايل */
@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
  }

  .hero-text {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }
}
.text-brand-600 {
  background: linear-gradient(90deg, #c9a84c, #e8c96d);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cat-card.quran::after {
  background: rgba(201, 168, 76, 0.6);
}

.cat-card.arabic::after {
  background: rgba(99, 102, 241, 0.6);
}
/* ===== FOOTER NEW ===== */

#footer{
    border-top:1px solid var(--border);
    transition:.35s;
}

/* container */
.footer-container {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

/* brand */
.footer-brand p {
  margin-top: 15px;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* titles */
.footer-links-col h4,
.footer-contact h4 {
  color: white;
  margin-bottom: 14px;
  font-weight: 800;
}

/* links */
.footer-links-col a {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  margin-bottom: 8px;
  font-size: 0.85rem;
  transition: 0.2s;
}

.footer-links-col a:hover {
  color: var(--gold);
}

/* contact */
.footer-contact p {
  font-size: 0.85rem;
  margin-bottom: 8px;
}

/* bottom */
.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: #64748b;
}

/* responsive */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
}

.whatsapp-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 18px;
  border-radius: 30px;
  background: var(--gold);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: 0.3s;
}

.whatsapp-btn:hover {
  background: var(--gold);
  transform: translateY(-2px);
}
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  text-decoration: none;
  transition: 0.3s;
}

.footer-socials a:hover {
  transform: translateY(-3px);
}

/* Hover colors لكل واحدة */
.footer-socials a:nth-child(1):hover {
  background: #22c55e; /* واتساب */
}

.footer-socials a:nth-child(2):hover {
  background: #1877f2; /* فيسبوك */
}

.footer-socials a:nth-child(3):hover {
  background: #0088cc; /* تيليجرام */
}

.footer-socials a:nth-child(4):hover {
  background: #ff0000; /* يوتيوب */
}

.mob-btn {
  display: block;
  width: 220px;
  padding: 14px;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);

  text-align: center;
  font-family: "Cairo", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: white;
  text-decoration: none;

  transition: all 0.3s ease;
}

/* hover */
.mob-btn:hover {
  background: var(--gold);
  color: #0a0a0f;
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(201, 168, 76, 0.4);
}

.mob-btn.active {
  background: var(--gold);
  color: black;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.logo-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
}
.fa-solid,
.fas {
  font-weight: 900;
  margin-top: 11px;
}
.font-semibold {
  padding: 9px 22px;
  border-radius: 10px;
  background: var(--gold-dim);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--gold-light);
  font-weight: 700;
  font-size: 0.9rem;

  transition: all 0.25s;
  font-family: "Tajawal", sans-serif;
}
.text-white {
  padding: 9px 22px;
  border-radius: 10px;
  background: var(--gold-dim);
  border: 1px solid rgba(201, 168, 76, 0.3);

  font-weight: 700;
  font-size: 0.9rem;

  transition: all 0.25s;
  font-family: "Tajawal", sans-serif;
}
.afeature-icon {
  font-weight: 900;
  margin-top: 22px;
}
.m1 {
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 15px;
}

/* =========================
   Dark Mode
========================= */

/* الوضع الليلي */
body.dark{
    --bg:#0f172a;
    --surface:#111827;
    --surface2:#1f2937;

    --border:rgba(255,255,255,.08);
    --border2:rgba(255,255,255,.15);

    --text:#f8fafc;
    --muted:#94a3b8;

    --gold:#d4af37;
    --gold-light:#f5d76e;
    --gold-dim:rgba(212,175,55,.15);

    --accent:#8b7cf8;
    --accent2:#b5a8ff;

    /* Footer */
    --footer-bg:#020617;
    --footer-text:#f8fafc;
}

/* الوضع النهاري */
:root{
    --footer-bg:#ffffff;
    --footer-text:#1f2937;
}

/* انتقالات ناعمة */
body,
#navbar,
#footer,
section,
.card,
.btn,
.social-icon{
    transition:
        background-color .35s ease,
        color .35s ease,
        border-color .35s ease,
        box-shadow .35s ease;
}

body.dark #navbar.scrolled{
    background: rgba(15,23,42,.88);
    backdrop-filter: blur(20px);
}
/* Hero */
body.dark .hero-overlay{
    background:rgba(0,0,0,.72);
}

body:not(.dark) .hero-overlay{
    background:rgba(15,23,42,.45);
}

/* Footer */
#footer{
    background:var(--footer-bg);
    color:var(--footer-text);
    border-top:1px solid var(--border);
}

.footer-col-title{
    color:var(--footer-text);
}

.footer-link,
.footer-copy,
.footer-love,
.footer-brand-desc{
    color:var(--muted);
}

/* Social Icons */
.social-icon{
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;

    background:var(--surface);
    border:1px solid var(--border);
    border-radius:12px;

    color:var(--footer-text);
    text-decoration:none;
    transition:.3s;
}

.social-icon i{
    color:inherit;
    font-size:18px;
}

.social-icon:hover{
    background:var(--gold);
    border-color:var(--gold);
    color:#fff;
    transform:translateY(-4px);
}

.footer-socials a{
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;

    background:var(--surface);
    border:1px solid var(--border);
    border-radius:12px;

    color:var(--footer-text);
    text-decoration:none;
    transition:.3s;
}

.footer-socials a:hover{
    background:var(--gold);
    border-color:var(--gold);
    color:#fff;
    transform:translateY(-4px);
}

.footer-socials a i{
    color:inherit;
    font-size:18px;
}
.social-title{
    color:var(--muted);
}

/* =========================
   Floating Share Button
========================= */

.floating-share{
    position:fixed;
    left:20px;
    bottom:20px;

    width:60px;
    height:60px;

    display:flex;
    align-items:center;
    justify-content:center;

    border:none;
    outline:none;
    border-radius:50%;

    background:#d4af37;
    color:#fff;

    font-size:24px;
    cursor:pointer;

    box-shadow:0 8px 20px rgba(0,0,0,.25);

    z-index:999999;

    transition:.3s;
}

.floating-share:hover{
    transform:scale(1.1);
    background:#c59b28;
}

.floating-share i{
    color:#fff;
}

/* =========================
   Mission Section - Dark Mode
========================= */

body.dark #mission{
    background:#111827 !important;
    color:#ffffff;
}

/* العنوان */
body.dark #mission h2,
body.dark #mission h3,
body.dark #mission h4{
    color:#ffffff !important;
}

/* الفقرات */
body.dark #mission p{
    color:#e5e7eb !important;
}

/* أي نصوص */
body.dark #mission span,
body.dark #mission li,
body.dark #mission strong{
    color:#ffffff !important;
}

/* التغلب على Tailwind */
body.dark #mission .text-gray-900,
body.dark #mission .text-gray-800,
body.dark #mission .text-gray-700,
body.dark #mission .text-gray-600{
    color:#ffffff !important;
}

/* الإبقاء على كلمة "رسالتنا" بالذهبي */
body.dark #mission .text-brand-600{
    background:none !important;
    -webkit-text-fill-color:#d4af37 !important;
    color:#d4af37 !important;
}

/* الكروت البيضاء */
body.dark #mission .bg-white{
    background:#1f2937 !important;
}

/* Mission */
.mission-title{
    color:#111827;
}

.mission-text{
    color:#4b5563;
}

.mission-item{
    color:#1f2937;
}

/* Dark Mode */
body.dark .mission-title{
    color:#fff;
}

body.dark .mission-text{
    color:#fff;
}

body.dark .mission-item{
    color:#fff;
}