/* ===== MAJAZI LMS - Beautiful Site CSS ===== */
/* Front-end RTL Persian Design System */

:root {
  --brand:          #6366f1;
  --brand-dark:     #4338ca;
  --brand-light:    #e0e7ff;
  --brand2:         #8b5cf6;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --bg-body:        #f8fafc;
  --bg-white:       #ffffff;
  --border:         #e2e8f0;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.07);
  --shadow:         0 4px 20px rgba(99,102,241,.10);
  --shadow-md:      0 8px 32px rgba(99,102,241,.14);
  --radius:         16px;
  --radius-sm:      10px;
  --transition:     all .25s cubic-bezier(.4,0,.2,1);
}

/* ── Base ── */
body {
  font-family: 'Segoe UI', Tahoma, 'shahr', sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  direction: rtl;
}

a { transition: var(--transition); }

/* ── Navbar Enhancement ── */
.navbar.bg-light {
  background: rgba(255,255,255,.95) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
}

.navbar .navbar-brand img { filter: drop-shadow(0 2px 8px rgba(99,102,241,.18)); }

.navbar .nav-link {
  color: var(--text-primary) !important;
  font-weight: 600;
  font-size: .9rem;
  padding: 8px 14px !important;
  border-radius: 8px;
  transition: var(--transition);
}

.navbar .nav-link:hover,
ul.navbar-nav .nav-link:hover {
  background: var(--brand-light) !important;
  color: var(--brand) !important;
}

.navbar .btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border: none;
  border-radius: 10px;
  padding: 8px 22px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(99,102,241,.3);
  transition: var(--transition);
}

.navbar .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(99,102,241,.45);
  transform: translateY(-1px);
}

.navbar .dropdown-menu {
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  padding: 8px;
  margin-top: 8px !important;
}

.navbar .dropdown-item {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: .86rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.navbar .dropdown-item:hover {
  background: var(--brand-light);
  color: var(--brand);
}

/* ── Hero / Banner ── */
.hero-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 40%, #6366f1 70%, #8b5cf6 100%);
  position: relative;
  overflow: hidden;
  padding: 80px 0 100px;
}

.hero-section::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' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%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");
}

.hero-section .hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-section .hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 6px 16px;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 36px;
}

.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
}

.hero-stat-lbl {
  font-size: .75rem;
  color: rgba(255,255,255,.65);
  margin-top: 2px;
}

/* ── Course Cards ── */
.course-card-new {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.course-card-new:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--brand-light);
}

.course-card-img {
  position: relative;
  overflow: hidden;
  height: 190px;
}

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

.course-card-new:hover .course-card-img img {
  transform: scale(1.05);
}

.course-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--brand);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
}

.course-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card-cat {
  font-size: .72rem;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.course-card-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-teacher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.teacher-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-light);
}

.teacher-name-sm {
  font-size: .78rem;
  color: var(--text-secondary);
}

.course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.course-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand-dark);
  direction: ltr;
}

.course-price.free {
  color: var(--success);
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: var(--text-muted);
}

.course-meta i { color: var(--brand); font-size: .75rem; }

/* ── Stars ── */
.stars {
  display: flex;
  gap: 2px;
  color: var(--warning);
  font-size: .8rem;
}

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  position: relative;
  padding-right: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: linear-gradient(to bottom, var(--brand), var(--brand2));
  border-radius: 99px;
}

.section-link {
  font-size: .82rem;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.section-link:hover { color: var(--brand-dark); }

/* ── Feature Cards ── */
.feature-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  border: 1.5px solid var(--border);
  transition: var(--transition);
  height: 100%;
}

.feature-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--brand);
  margin: 0 auto 16px;
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background: var(--brand);
  color: #fff;
}

.feature-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Teacher Cards ── */
.teacher-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  text-align: center;
}

.teacher-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.teacher-card-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--brand-light);
  margin: 24px auto 12px;
}

.teacher-card-name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.teacher-card-field {
  font-size: .77rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.teacher-card-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 14px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
}

.t-stat-num {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand);
}

.t-stat-lbl {
  font-size: .68rem;
  color: var(--text-muted);
}

/* ── Footer Enhancement ── */
footer#footer {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%) !important;
  position: relative;
  overflow: hidden;
}

footer#footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Ccircle cx='20' cy='20' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

/* ── Buttons ── */
.btn-lms {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-weight: 700;
  font-size: .88rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-lms:hover {
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,.4);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-lms-white {
  background: #fff;
  color: var(--brand-dark);
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-weight: 700;
  font-size: .88rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-lms-white:hover {
  background: var(--brand-light);
  color: var(--brand-dark);
  text-decoration: none;
}

/* ── Search Box ── */
.lms-search {
  display: flex;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.lms-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

.lms-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: .9rem;
  background: transparent;
  color: var(--text-primary);
}

.lms-search button {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-size: .88rem;
}

.lms-search button:hover { background: var(--brand-dark); }

/* ── Testimonial ── */
.testimonial-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.testimonial-text {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
}

.author-name { font-size: .85rem; font-weight: 700; color: var(--text-primary); }
.author-role { font-size: .73rem; color: var(--text-muted); }

/* ── Login Page ── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #6366f1 100%);
  position: relative;
  overflow: hidden;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  top: -150px; left: -150px;
}

.login-card {
  background: #fff;
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo img { height: 56px; }

.login-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 6px;
}

.login-sub {
  font-size: .82rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
}

.login-form .form-control {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .88rem;
  transition: var(--transition);
  background: #f8fafc;
}

.login-form .form-control:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99,102,241,.08);
}

.login-form label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.login-btn:hover {
  box-shadow: 0 6px 20px rgba(99,102,241,.4);
  transform: translateY(-1px);
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,.3); }
  50%       { box-shadow: 0 0 0 10px rgba(99,102,241,0); }
}

.animate-fadeup { animation: fadeInUp .5s ease forwards; }
.animate-pulse  { animation: pulse-glow 2s ease infinite; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-light); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-stats { gap: 20px; }
  .hero-stat-num { font-size: 1.4rem; }
}
