/* ============================================
   Public Pages — Home / Landing CSS
   Uses variables from admin-theme.css
   ============================================ */

/* ===== Extra Theme Variables for Home ===== */
:root, [data-theme="light"] {
  --hero-bg: linear-gradient(160deg, #0F172A 0%, #1E293B 40%, #1a1a4e 100%);
  --hero-text: #F8FAFC;
  --hero-sub: #94A3B8;
  --gold: #D4A017;
  --gold-soft: rgba(212,160,23,.12);
  --gold-glow: rgba(212,160,23,.3);
  --orb-1: rgba(74,58,255,.25);
  --orb-2: rgba(212,160,23,.2);
  --orb-3: rgba(6,182,212,.15);
  --nav-bg-solid: rgba(255,255,255,.85);
  --nav-text-solid: #1E293B;
  --footer-bg: #0F172A;
  --footer-text: #94A3B8;
  --bg-glass: rgba(255,255,255,.7);
}
[data-theme="dark"] {
  --hero-bg: linear-gradient(160deg, #070B14 0%, #0F1629 40%, #12103a 100%);
  --gold: #FBBF24;
  --gold-soft: rgba(251,191,36,.12);
  --gold-glow: rgba(251,191,36,.25);
  --orb-1: rgba(124,111,255,.2);
  --orb-2: rgba(251,191,36,.12);
  --orb-3: rgba(34,211,238,.1);
  --nav-bg-solid: rgba(15,22,41,.9);
  --nav-text-solid: #F1F5F9;
  --footer-bg: #060911;
  --bg-glass: rgba(17,24,39,.75);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-ar, 'Cairo', sans-serif);
  background: var(--bg);
  color: var(--text-1);
  overflow-x: hidden;
  transition: background .4s, color .4s;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== ANIMATIONS ===== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes orbMove {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -20px); }
  66% { transform: translate(-20px, 15px); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--gold-glow); }
  50% { box-shadow: 0 0 0 16px transparent; }
}
.fade-up { animation: fadeUp .7s ease both; }
.fade-d1 { animation-delay: .1s; }
.fade-d2 { animation-delay: .2s; }
.fade-d3 { animation-delay: .3s; }
.fade-d4 { animation-delay: .4s; }

/* ===== NAVBAR ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; padding: 12px 0; transition: all .3s;
}
.nav.scrolled {
  background: var(--nav-bg-solid);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px; display: flex; align-items: center; gap: 16px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem;
  color: var(--hero-text);
}
.nav.scrolled .nav-logo { color: var(--nav-text-solid); }
.nav-logo-icon {
  width: 38px; height: 38px; background: var(--gold);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; color: #0F172A; font-weight: 900; font-size: 1.1rem;
}
.nav-spacer { flex: 1; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-link {
  padding: 8px 16px; border-radius: 50px;
  font-size: .88rem; font-weight: 500;
  color: var(--hero-text); transition: all .2s; border: 1px solid transparent;
}
.nav.scrolled .nav-link { color: var(--nav-text-solid); }
.nav-link:hover { background: rgba(255,255,255,.1); }
.nav.scrolled .nav-link:hover { background: var(--primary-soft); }
.nav-cta {
  background: var(--gold) !important; color: #0F172A !important;
  font-weight: 700; border: none !important;
  box-shadow: 0 4px 16px var(--gold-glow);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--gold-glow); }

.theme-sw {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08); color: var(--hero-text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; transition: all .2s;
  font-family: inherit;
}
.nav.scrolled .theme-sw { border-color: var(--border); background: var(--bg-2, var(--bg)); color: var(--text-1); }
.theme-sw:hover { background: rgba(255,255,255,.2); transform: scale(1.05); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; background: var(--hero-bg);
  position: relative; display: flex; align-items: center; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
  animation: orbMove 12s ease-in-out infinite;
}
.orb-1 { width: 400px; height: 400px; background: var(--orb-1); top: -10%; right: -5%; }
.orb-2 { width: 300px; height: 300px; background: var(--orb-2); bottom: 10%; left: 5%; animation-delay: -4s; }
.orb-3 { width: 250px; height: 250px; background: var(--orb-3); top: 40%; left: 40%; animation-delay: -8s; }

.hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 120px 24px 80px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center; position: relative; z-index: 2;
}
.hero-content { color: var(--hero-text); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-soft); border: 1px solid var(--gold);
  color: var(--gold); padding: 6px 16px; border-radius: 50px;
  font-size: .78rem; font-weight: 700; margin-bottom: 24px;
  animation: pulse 2.5s ease infinite;
}
.hero-title {
  font-size: 3rem; font-weight: 900;
  line-height: 1.25; margin-bottom: 16px; letter-spacing: -.5px;
}
.highlight { color: var(--gold); position: relative; }
.highlight::after {
  content: ''; position: absolute; bottom: 2px; right: 0; left: 0;
  height: 4px; background: var(--gold); opacity: .3; border-radius: 2px;
}
.hero-desc {
  font-size: 1.1rem; color: var(--hero-sub);
  line-height: 1.8; margin-bottom: 36px; max-width: 480px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-btn {
  padding: 14px 32px; border-radius: 50px; font-size: 1rem;
  font-weight: 700; font-family: var(--font-ar, 'Cairo', sans-serif);
  cursor: pointer; transition: all .25s; border: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.hero-btn-primary {
  background: var(--gold); color: #0F172A;
  box-shadow: 0 6px 24px var(--gold-glow);
}
.hero-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 36px var(--gold-glow); }
.hero-btn-secondary {
  background: rgba(255,255,255,.08); color: var(--hero-text);
  border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(8px);
}
.hero-btn-secondary:hover { background: rgba(255,255,255,.15); transform: translateY(-2px); }

/* Teacher Photo */
.hero-visual { display: flex; justify-content: center; align-items: center; position: relative; }
.teacher-frame { position: relative; width: 380px; height: 380px; }
.teacher-photo {
  width: 100%; height: 100%; border-radius: 30px; overflow: hidden;
  position: relative; z-index: 2; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  border: 3px solid rgba(255,255,255,.1);
}
.teacher-photo img {
  width: 100%;
  height: 100%;
  max-width: unset;
  object-fit: cover;
  object-position: center 13%;
}
.teacher-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1E293B, #334155);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: var(--hero-sub); gap: 12px;
}
.teacher-placeholder .tp-icon { font-size: 5rem; opacity: .6; }
.teacher-placeholder .tp-text { font-size: .85rem; opacity: .5; }

.teacher-frame::before {
  content: ''; position: absolute;
  top: -12px; right: -12px; bottom: -12px; left: -12px;
  border: 2px dashed var(--gold); border-radius: 34px;
  opacity: .2; animation: float 4s ease-in-out infinite;
}

.float-card {
  position: absolute; background: var(--bg-glass);
  backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 12px 18px; z-index: 3;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  animation: float 5s ease-in-out infinite;
}
.float-card-1 { top: 20px; left: -40px; }
.float-card-2 { bottom: 40px; left: -30px; animation-delay: 1.5s; }
.float-card-3 { top: 50%; right: -50px; animation-delay: 3s; }
.fc-num { font-size: 1.4rem; font-weight: 800; color: var(--gold); line-height: 1; }
.fc-label { font-size: .7rem; color: var(--hero-sub); font-weight: 500; }

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  position: relative; z-index: 10; box-shadow: 0 4px 24px rgba(0,0,0,.06);
  transition: background .4s;
}
.stats-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stat-item {
  padding: 28px 24px; text-align: center;
  border-left: 1px solid var(--border); transition: background .2s;
}
.stat-item:last-child { border-left: none; }
.stat-item:hover { background: var(--primary-soft); }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 2px; }
.stat-label { font-size: .82rem; color: var(--text-3); font-weight: 500; }

/* ===== SECTIONS ===== */
.section { padding: 80px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 50px; }
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-soft); color: var(--primary);
  padding: 6px 16px; border-radius: 50px;
  font-size: .78rem; font-weight: 700; margin-bottom: 14px;
}
.section-title { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.section-desc { font-size: 1rem; color: var(--text-2); max-width: 550px; margin: 0 auto; line-height: 1.7; }

/* ===== FEATURES ===== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px 28px; transition: all .3s;
  position: relative; overflow: hidden;
}
.feature::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 100px; height: 100px; background: var(--primary-soft);
  border-radius: 0 0 0 100%; opacity: 0; transition: opacity .3s;
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.1); border-color: var(--primary); }
.feature:hover::before { opacity: 1; }
.feat-ico {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 18px; position: relative; z-index: 1;
}
.feat-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; position: relative; z-index: 1; }
.feat-desc { font-size: .88rem; color: var(--text-2); line-height: 1.7; position: relative; z-index: 1; }

/* ===== ABOUT ===== */
.about { background: var(--bg-2, var(--bg)); transition: background .4s; }
.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 50px; align-items: center; }
.about-photo {
  width: 100%; max-width: 400px; aspect-ratio: 3/4;
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
  border: 3px solid var(--border);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-name { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.about-role { font-size: 1rem; color: var(--gold); font-weight: 600; margin-bottom: 20px; }
.about-text { font-size: .95rem; color: var(--text-2); line-height: 1.9; margin-bottom: 24px; }
.about-highlights { display: flex; flex-wrap: wrap; gap: 10px; }
.about-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 50px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: .82rem; font-weight: 600; color: var(--text-1);
  box-shadow: 0 4px 24px rgba(0,0,0,.06); transition: background .4s;
}

/* ===== CTA ===== */
.cta { background: var(--hero-bg); position: relative; overflow: hidden; }
.cta .orb { opacity: .5; }
.cta-inner {
  max-width: 700px; margin: 0 auto; text-align: center;
  position: relative; z-index: 2; padding: 80px 24px;
}
.cta-title { font-size: 2.2rem; font-weight: 800; color: var(--hero-text); margin-bottom: 14px; }
.cta-desc { font-size: 1.05rem; color: var(--hero-sub); margin-bottom: 32px; line-height: 1.7; }

/* ===== COURSES GRID ===== */
.courses-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.course-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; transition: all .3s;
}
.course-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.1); }
.course-thumb {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg), var(--border));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--text-3);
}
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-info { padding: 18px; }
.course-cat { font-size: .72rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; text-transform: uppercase; }
.course-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.course-meta { display: flex; gap: 12px; font-size: .78rem; color: var(--text-3); }

/* ===== FOOTER ===== */
.footer {
  background: var(--footer-bg); padding: 32px 24px; text-align: center;
  transition: background .4s;
}
.footer-text { color: var(--footer-text); font-size: .82rem; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; }
.footer-link { color: var(--footer-text); font-size: .85rem; transition: color .2s; }
.footer-link:hover { color: var(--gold); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-content { order: 2; } .hero-visual { order: 1; }
  .hero-title { font-size: 2.2rem; }
  .hero-desc { margin: 0 auto 32px; }
  .hero-actions { justify-content: center; }
  .teacher-frame { width: 280px; height: 280px; }
  .teacher-photo { height: 280px; }
  .teacher-photo img { object-position: center 13%; }
  .float-card { display: none; }
  .features { grid-template-columns: 1fr; }
  .courses-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-photo { margin: 0 auto; }
  .about-highlights { justify-content: center; }
}
@media (max-width: 600px) {
  .hero-title { font-size: 1.8rem; }
  .hero-desc { font-size: .95rem; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-item { padding: 20px 16px; }
  .stat-item:nth-child(2) { border-left: none; }
  .stat-num { font-size: 1.5rem; }
  .section-title { font-size: 1.5rem; }
  .nav-link:not(.nav-cta) { display: none; }
  .cta-title { font-size: 1.6rem; }
  .teacher-frame { width: 100%; height: 300px; }
  .teacher-photo { height: 300px; }
  .teacher-photo img { object-position: center 13%; }
}