/* ==========================================================================
   بتاع بيزنس | Mr Mina Magdy - Premium Black & Metallic Gold Theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Alexandria:wght@400;600;700;800;900&display=swap');

:root {
  /* Color Palette strictly extracted from official identity */
  --bg-primary: #08090C;
  --bg-secondary: #0F1117;
  --bg-card: #151821;
  --bg-card-hover: #1D212E;
  --bg-glass: rgba(18, 20, 29, 0.82);

  /* Metallic Gold Spectrum */
  --gold-light: #FFF2B2;
  --gold-primary: #E5A93C;
  --gold-metallic: #D4AF37;
  --gold-dark: #9A6F1A;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --gold-border: rgba(212, 175, 55, 0.28);
  --gold-border-bright: rgba(245, 185, 66, 0.65);

  /* Gradient Presets */
  --gold-gradient: linear-gradient(135deg, #FFF3B0 0%, #E5A93C 45%, #B3821E 80%, #68490B 100%);
  --gold-gradient-btn: linear-gradient(135deg, #FDE68A 0%, #D4AF37 50%, #A17112 100%);
  --gold-gradient-subtle: linear-gradient(180deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.02) 100%);
  --dark-gradient: linear-gradient(180deg, #13151D 0%, #0A0B0F 100%);
  --card-gradient: linear-gradient(145deg, rgba(28, 32, 45, 0.9) 0%, rgba(14, 16, 23, 0.95) 100%);

  /* Neutrals */
  --text-primary: #FFFFFF;
  --text-secondary: #CBD5E1;
  --text-muted: #8E9BAE;
  --text-gold: #F6C85F;

  /* Status Colors */
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;

  /* Typography */
  --font-main: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-heading: 'Alexandria', 'Cairo', sans-serif;

  /* Elevations & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 4px 25px rgba(212, 175, 55, 0.22);
  --shadow-gold-lg: 0 8px 35px rgba(212, 175, 55, 0.35);

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(212, 175, 55, 0.05) 0%, transparent 45%),
    linear-gradient(180deg, #090A0E 0%, #060709 100%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #252836;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-metallic);
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.25s ease;
}

button, input, select, textarea {
  font-family: var(--font-main);
}

/* ==========================================================================
   Luxury Metallic Gold Utilities
   ========================================================================== */
.text-gold {
  color: var(--gold-primary) !important;
}

.text-gold-gradient {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.bg-gold {
  background: var(--gold-metallic) !important;
  color: #000000 !important;
}

.bg-gold-gradient {
  background: var(--gold-gradient-btn) !important;
  color: #0A0A0C !important;
}

.border-gold {
  border: 1px solid var(--gold-border) !important;
}

.border-gold-bright {
  border: 1px solid var(--gold-border-bright) !important;
}

.glow-gold {
  box-shadow: var(--shadow-gold);
}

.glow-gold-lg {
  box-shadow: var(--shadow-gold-lg);
}

/* ==========================================================================
   Containers & Grids
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.btn-gold {
  background: var(--gold-gradient-btn);
  color: #0A0A0C;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.35);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.55);
  filter: brightness(1.08);
}

.btn-gold-outline {
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid var(--gold-border-bright);
  color: var(--gold-light);
}

.btn-gold-outline:hover {
  background: rgba(212, 175, 55, 0.15);
  transform: translateY(-2px);
  color: #FFFFFF;
  box-shadow: var(--shadow-gold);
}

.btn-dark {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-dark:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 18px;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Luxury Cards
   ========================================================================== */
.card-luxury {
  background: var(--card-gradient);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.35s ease;
}

.card-luxury::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--gold-gradient);
  opacity: 0.7;
}

.card-luxury:hover {
  border-color: var(--gold-border-bright);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

/* ==========================================================================
   Badges & Tags
   ========================================================================== */
.badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.badge-pill-stage {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 800;
  background: #000000;
  color: #FFFFFF;
  border: 2px solid var(--gold-metallic);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 13px 18px;
  background: rgba(15, 17, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.25s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
  background: rgba(20, 23, 33, 0.95);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 12, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
  padding: 14px 0;
  transition: all 0.3s ease;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 900;
  font-family: var(--font-heading);
}

.brand-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0A0A0C;
  font-size: 20px;
  box-shadow: var(--shadow-gold);
}

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

.nav-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 10px;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-light);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  left: 50%;
  height: 2px;
  background: var(--gold-gradient);
  transition: all 0.25s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  right: 10px;
  left: 10px;
}

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 50px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--gold-border-bright);
  border-radius: var(--radius-full);
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 22px;
}

.hero-title {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 34px;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-trust-row {
  display: flex;
  align-items: center;
  gap: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
}

.trust-item {
  display: flex;
  flex-direction: column;
}

.trust-number {
  font-size: 24px;
  font-weight: 900;
  color: var(--gold-light);
  font-family: var(--font-heading);
}

.trust-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* Hero Visual Box */
.hero-visual-wrapper {
  position: relative;
}

.hero-visual-card {
  position: relative;
  border-radius: var(--radius-xl);
  border: 2px solid var(--gold-border-bright);
  padding: 8px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(10, 11, 15, 0.95) 100%);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8), 0 0 35px rgba(212, 175, 55, 0.25);
  overflow: hidden;
}

.hero-banner-img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-xl) - 6px);
  display: block;
  object-fit: cover;
}

.hero-floating-pill {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: rgba(10, 11, 15, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--gold-border-bright);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-gold);
}

/* ==========================================================================
   Section Generic
   ========================================================================== */
.section {
  padding: 80px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 54px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.section-title {
  font-size: 34px;
  font-weight: 900;
  margin-bottom: 14px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Courses Showcase Cards
   ========================================================================== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.course-card {
  background: var(--card-gradient);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  border-color: var(--gold-border-bright);
  transform: translateY(-6px);
  box-shadow: var(--shadow-gold);
}

.course-thumb-box {
  position: relative;
  height: 190px;
  background: #11131A;
  overflow: hidden;
}

.course-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.course-card:hover .course-thumb-img {
  transform: scale(1.04);
}

.course-badge-stage {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.course-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.course-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.course-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  margin-top: auto;
}

.course-price {
  display: flex;
  flex-direction: column;
}

.price-val {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold-light);
  font-family: var(--font-heading);
}

.price-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Exam Player & Anti-Cheating
   ========================================================================== */
.exam-container {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 16px;
}

.exam-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 24px;
  position: sticky;
  top: 80px;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.exam-timer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-light);
  font-family: monospace;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gold-border);
}

.exam-timer.urgent {
  color: var(--danger);
  border-color: var(--danger);
  animation: pulse 1s infinite;
}

.question-card {
  background: var(--card-gradient);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 24px;
}

.question-number {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 10px;
}

.question-text {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  background: rgba(14, 16, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-item:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold-border);
}

.option-item.selected {
  background: rgba(212, 175, 55, 0.16);
  border-color: var(--gold-metallic);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.option-radio {
  width: 20px;
  height: 20px;
  accent-color: var(--gold-primary);
}

.option-text {
  font-size: 16px;
  color: var(--text-primary);
}

/* ==========================================================================
   Video Player with Anti-Piracy Floating Watermark
   ========================================================================== */
.video-wrapper {
  position: relative;
  background: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gold-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
}

.video-frame-container {
  position: relative;
  padding-top: 56.25%; /* 16:9 ratio */
  width: 100%;
}

.video-frame-container iframe,
.video-frame-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Dynamic Jumping Canvas Watermark */
.watermark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.floating-watermark-tag {
  position: absolute;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
  transition: all 1s ease-in-out;
  transform: rotate(-8deg);
}

/* ==========================================================================
   Dashboard Sidebar & Main Layout
   ========================================================================== */
.dashboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.dashboard-sidebar {
  background: var(--bg-secondary);
  border-left: 1px solid rgba(212, 175, 55, 0.15);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.sidebar-item a:hover,
.sidebar-item.active a {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
}

.dashboard-content {
  padding: 32px;
  background: var(--bg-primary);
  overflow-y: auto;
}

/* ==========================================================================
   Egyptian Payment Cards
   ========================================================================== */
.payment-channel-card {
  background: var(--card-gradient);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.payment-channel-card:hover, .payment-channel-card.active {
  border-color: var(--gold-border-bright);
  box-shadow: var(--shadow-gold);
  transform: translateY(-3px);
}

.payment-channel-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--gold-border-bright);
  border-radius: var(--radius-xl);
  max-width: 550px;
  width: 100%;
  padding: 32px;
  box-shadow: var(--shadow-gold-lg);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(15px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer-text {
  background: linear-gradient(90deg, #D4AF37 0%, #FFF3B0 50%, #D4AF37 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-trust-row {
    justify-content: center;
  }
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-sidebar {
    display: none; /* Can be toggled with drawer */
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }
  .nav-links {
    display: none;
  }
  .section {
    padding: 50px 0;
  }
}
