/* ============================================================
   Boigule Tech - Main Stylesheet
   بويغيلي تك - ورقة الأنماط الرئيسية
   ============================================================ */

:root {
  --primary:       #8B1A1A;
  --primary-dark:  #6B0F0F;
  --primary-light: #B83232;
  --accent:        #D4A017;
  --accent-light:  #F5C842;
  --dark-1:        #1a1a2e;
  --dark-2:        #16213e;
  --dark-3:        #0f3460;
  --text-muted:    #6c757d;
  --card-shadow:   0 4px 20px rgba(0,0,0,.08);
  --transition:    all .25s ease;
}

/* ─── Base ──────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  font-family: 'Cairo', sans-serif;
  background: #f8f9fa;
  color: #2d2d2d;
  line-height: 1.75;
}

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

img { max-width: 100%; }

/* ─── Color Utilities ───────────────────────────────────── */
.bg-primary-dark  { background-color: var(--primary-dark) !important; }
.bg-dark-2        { background-color: var(--dark-2) !important; }
.bg-accent        { background-color: var(--accent) !important; }
.text-accent      { color: var(--accent) !important; }
.text-primary-red { color: var(--primary) !important; }
.border-accent    { border-color: var(--accent) !important; }

/* ─── Buttons ───────────────────────────────────────────── */
.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}
.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #1a1a1a;
  font-weight: 700;
}
.btn-accent:hover {
  background-color: var(--accent-light);
  border-color: var(--accent-light);
  color: #1a1a1a;
}
.btn-outline-primary {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}
.btn-outline-primary:hover {
  background-color: var(--primary) !important;
  color: #fff !important;
}

/* ─── Navbar ────────────────────────────────────────────── */
.navbar { padding: .6rem 0; }
.navbar-brand { font-size: 1.25rem; }
.nav-link {
  font-size: .9rem;
  font-weight: 600;
  transition: var(--transition);
  padding: .4rem .65rem !important;
  border-radius: 6px;
}
.nav-link:hover { background: rgba(255,255,255,.12); }

/* ─── Hero ──────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--dark-3) 100%);
  color: #fff;
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg.svg') center/cover no-repeat;
  opacity: .06;
}
.hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.3;
}
.hero-subtitle { font-size: 1.1rem; opacity: .9; }
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.hero-stat .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}
.hero-stat .lbl { font-size: .85rem; opacity: .8; }

/* ─── Section Headers ───────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary-dark);
  position: relative;
  display: inline-block;
}
.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: .5rem auto 0;
}
.section-header p { color: var(--text-muted); }

/* ─── Cards ─────────────────────────────────────────────── */
.course-card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  overflow: hidden;
  height: 100%;
  background: #fff;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0,0,0,.14);
}
.course-card .thumbnail-wrap {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: #e9ecef;
}
.course-card .thumbnail-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.course-card:hover .thumbnail-wrap img { transform: scale(1.05); }

.course-card .badge-level {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: .7rem;
  padding: .25rem .6rem;
  border-radius: 20px;
}
.course-card .card-body { padding: 1rem 1.1rem; }
.course-card .course-title {
  font-weight: 700;
  font-size: .95rem;
  color: #2d2d2d;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.course-card .instructor-name { font-size: .8rem; color: var(--text-muted); }
.course-card .price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}
.course-card .price.free { color: #198754; }
.course-card .old-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: .85rem;
}

/* ─── Category Badge ────────────────────────────────────── */
.cat-card {
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: var(--transition);
  background: #fff;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  border: 2px solid transparent;
}
.cat-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}
.cat-card .icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: #fff;
}
.cat-card h6 { font-weight: 700; color: #2d2d2d; font-size: .9rem; margin: 0; }

/* ─── Instructor Card ───────────────────────────────────── */
.instructor-card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  text-align: center;
  padding: 1.5rem 1rem;
  transition: var(--transition);
  background: #fff;
}
.instructor-card:hover { transform: translateY(-4px); box-shadow: 0 12px 35px rgba(0,0,0,.14); }
.instructor-card img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin-bottom: .75rem;
}

/* ─── Testimonial ───────────────────────────────────────── */
.testimonial-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  position: relative;
  border-top: 4px solid var(--primary);
}
.testimonial-card .quote-icon {
  font-size: 3rem;
  color: var(--primary-light);
  opacity: .2;
  position: absolute;
  top: 10px;
  left: 20px;
  line-height: 1;
}

/* ─── Pricing ───────────────────────────────────────────── */
.pricing-card {
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  border: 2px solid #e9ecef;
  background: #fff;
  height: 100%;
}
.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 20px 50px rgba(107,15,15,.35);
}
.pricing-card.featured .text-muted { color: rgba(255,255,255,.7) !important; }
.pricing-card .price-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
}
.pricing-card.featured .price-amount { color: var(--accent); }

/* ─── Progress Bar ──────────────────────────────────────── */
.progress { border-radius: 50px; height: 8px; }
.progress-bar { background: linear-gradient(90deg, var(--primary-light), var(--primary-dark)); border-radius: 50px; }

/* ─── Forms ─────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 8px;
  border: 1.5px solid #dee2e6;
  padding: .6rem .9rem;
  font-family: 'Cairo', sans-serif;
  font-size: .9rem;
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(139,26,26,.12);
}
.form-label { font-weight: 600; font-size: .88rem; color: #444; }

/* ─── Auth Pages ────────────────────────────────────────── */
.auth-card {
  border: none;
  border-radius: 20px;
  box-shadow: 0 10px 50px rgba(0,0,0,.12);
  padding: 2.5rem;
  background: #fff;
  max-width: 440px;
  width: 100%;
}
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-logo span { font-size: 1.7rem; font-weight: 800; color: var(--primary-dark); }

/* ─── Footer ────────────────────────────────────────────── */
.footer-link {
  color: #adb5bd;
  transition: var(--transition);
  display: inline-block;
}
.footer-link:hover { color: var(--accent); transform: translateX(-3px); }
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  transition: var(--transition);
  font-size: .85rem;
}
.social-icon:hover { background: var(--accent); color: #1a1a1a; }

/* ─── Dashboard Sidebar ─────────────────────────────────── */
.dash-sidebar {
  min-height: calc(100vh - 60px);
  background: var(--primary-dark);
  width: 260px;
  flex-shrink: 0;
  padding: 1.5rem 0;
  position: sticky;
  top: 60px;
}
.dash-sidebar .nav-link {
  color: rgba(255,255,255,.75);
  font-size: .88rem;
  padding: .55rem 1.5rem !important;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: .65rem;
  border-right: 3px solid transparent;
  transition: var(--transition);
}
.dash-sidebar .nav-link:hover,
.dash-sidebar .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-right-color: var(--accent);
}
.dash-sidebar .nav-link i { width: 20px; text-align: center; }
.dash-sidebar .sidebar-title {
  font-size: .7rem;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  padding: 1rem 1.5rem .3rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dash-content { flex: 1; padding: 1.5rem; background: #f8f9fa; color: #2d2d2d; }

/* ─── Stats Card ────────────────────────────────────────── */
.stat-card {
  border-radius: 14px;
  padding: 1.4rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  bottom: -30px;
  left: -20px;
}
.stat-card .icon { font-size: 2.2rem; opacity: .85; }
.stat-card .num { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-card .lbl { font-size: .82rem; opacity: .85; }

/* ─── Table ─────────────────────────────────────────────── */
.table { font-size: .88rem; }
.table th { font-weight: 700; color: #555; background: #f8f9fa; }
.table td { vertical-align: middle; }

/* ─── Lesson Player ─────────────────────────────────────── */
.lesson-list-item {
  padding: .65rem 1rem;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: .7rem;
}
.lesson-list-item:hover { background: #f8f9fa; }
.lesson-list-item.active { background: rgba(139,26,26,.08); border-right: 3px solid var(--primary); }
.lesson-list-item .check { color: #198754; }

/* ─── Badge overrides ───────────────────────────────────── */
.badge { font-weight: 600; font-size: .72rem; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 991px) {
  .dash-sidebar { width: 100%; min-height: auto; position: static; padding: .5rem 0; }
  .hero-section { padding: 50px 0; }
  .pricing-card.featured { transform: none; }
}
@media (max-width: 576px) {
  .hero-title { font-size: 1.6rem; }
  .auth-card { padding: 1.5rem; }
}
