/* ==========================================================================
   Quran Academy — Bright, Premium Modern Islamic Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&family=Amiri:wght@400;700&display=swap');

:root {
  --primary-emerald: #059669;
  --primary-hover: #047857;
  --secondary-teal: #0d9488;
  --dark-emerald: #064e3b;
  --light-mint: #f0fdf4;
  --soft-mint: #ecfdf5;
  --accent-gold: #d97706;
  --accent-gold-light: #fef3c7;
  --accent-gold-hover: #b45309;
  --bg-white: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #059669;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(5, 150, 105, 0.08);
  --shadow-lg: 0 16px 40px rgba(5, 150, 105, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-subtle);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--dark-emerald);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--primary-emerald);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

.arabic-font {
  font-family: 'Amiri', serif;
}

.text-center {
  text-align: center !important;
}

/* Container */
.container {
  width: 90%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Top Notification Bar */
.top-bismillah-bar {
  background: linear-gradient(135deg, var(--dark-emerald), var(--primary-emerald));
  color: #ffffff;
  text-align: center;
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  overflow: hidden;
  word-break: break-word;
}
.top-bismillah-bar span {
  color: var(--accent-gold-light);
  font-family: 'Amiri', serif;
  font-size: 19px;
  margin-right: 8px;
}

/* Header & Navbar */
.navbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  gap: 8px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--dark-emerald);
  flex-shrink: 0;
}

.nav-brand svg {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

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

.nav-link {
  font-weight: 500;
  color: var(--text-main);
  font-size: 15px;
  padding: 8px 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-emerald);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-emerald);
  transition: var(--transition);
}

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--dark-emerald);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-emerald);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.btn-secondary {
  background-color: var(--light-mint);
  color: var(--dark-emerald);
  border: 1px solid #a7f3d0;
}

.btn-secondary:hover {
  background-color: #d1fae5;
  color: var(--dark-emerald);
  transform: translateY(-2px);
}

.btn-gold {
  background-color: var(--accent-gold);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.btn-gold:hover {
  background-color: var(--accent-gold-hover);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background-color: #1eb956;
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--dark-emerald);
  border: 1px solid var(--primary-emerald);
}

.btn-outline:hover {
  background-color: var(--primary-emerald);
  color: #ffffff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
  border-radius: var(--radius-md);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-bg-white {
  background-color: var(--bg-white);
}

.section-bg-mint {
  background-color: var(--light-mint);
}

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

.section-subtitle {
  display: inline-block;
  color: var(--primary-emerald);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  background: var(--light-mint);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid #a7f3d0;
}

.section-title {
  font-size: 38px;
  margin-bottom: 16px;
  color: var(--dark-emerald);
  text-align: center;
}

.section-desc {
  color: var(--text-muted);
  font-size: 17px;
  text-align: center;
}

/* Hero Section with Islamic Geometric Pattern Background */
.hero-section {
  background: linear-gradient(135deg, rgba(255,255,255,0.92) 0%, rgba(240,253,244,0.95) 100%),
              url('../images/islamic_pattern.svg');
  background-repeat: repeat;
  background-size: 80px 80px;
  padding: 90px 0 100px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--dark-emerald);
  border: 1px solid #a7f3d0;
  padding: 8px 18px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-size: 50px;
  color: var(--dark-emerald);
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.15;
}

.hero-title span {
  color: var(--primary-emerald);
  position: relative;
}

.hero-text {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-graphic {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-card {
  width: 100%;
  max-width: 500px;
  background: var(--bg-white);
  border-radius: 28px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  border: 2px solid #a7f3d0;
  text-align: center;
}

.hero-image-card img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 20px;
}

/* Course Grid & Rich Realistic Cards */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 32px;
}

.course-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: #a7f3d0;
}

.course-card-image {
  height: 230px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.course-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.course-card:hover .course-card-image img {
  transform: scale(1.06);
}

.course-card-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(6, 78, 59, 0.88);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
}

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

.course-card-title {
  font-size: 21px;
  margin-bottom: 12px;
  color: var(--dark-emerald);
}

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

.course-card-footer {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

/* Why Choose Us Split Layout (Matching Screenshot 2) */
.why-choose-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: center;
}

.why-choose-image-box {
  background: #ffffff;
  border-radius: 30px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  border: 2px solid #a7f3d0;
}

.why-choose-image-box img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 20px;
}

.check-list {
  list-style: none;
  margin: 24px 0 32px 0;
}

.check-list li {
  padding: 10px 0;
  font-size: 16px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
}

.check-list li::before {
  content: '✓';
  color: var(--primary-emerald);
  font-weight: 800;
  font-size: 18px;
  background: var(--light-mint);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #a7f3d0;
  flex-shrink: 0;
}

/* Package Grid & Cards */
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.package-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.package-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-emerald);
}

.package-card.popular {
  border: 2px solid var(--primary-emerald);
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.package-popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-emerald);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  text-transform: uppercase;
}

.package-name {
  font-size: 22px;
  color: var(--dark-emerald);
  margin-bottom: 8px;
}

.package-price {
  font-size: 38px;
  font-weight: 800;
  color: var(--primary-emerald);
  margin-bottom: 4px;
}

.package-price span {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

.package-features {
  list-style: none;
  margin: 24px 0;
  text-align: left;
  flex-grow: 1;
}

.package-features li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.package-features li::before {
  content: '✓';
  color: var(--primary-emerald);
  font-weight: 700;
}

/* About Teacher Section */
.about-box {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid #d1fae5;
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.qualifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.qualification-card {
  background: var(--light-mint);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  padding: 20px;
}

.qualification-card h4 {
  color: var(--dark-emerald);
  font-size: 17px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qualification-card h4::before {
  content: '✦';
  color: var(--accent-gold);
}

.qualification-card p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Process & How it works */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.process-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  border: 1px solid var(--border-color);
  position: relative;
}

.process-step {
  width: 48px;
  height: 48px;
  background: var(--light-mint);
  color: var(--primary-emerald);
  border: 2px solid var(--primary-emerald);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  margin: 0 auto 20px auto;
}

.process-card h4 {
  margin-bottom: 10px;
  font-size: 18px;
}

.process-card p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Alerts */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success { background: #d1fae5; color: #047857; border: 1px solid #6ee7b7; }
.alert-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.alert-info { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
.alert-warning { background: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }

/* Status Badges */
.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pending { background: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }
.badge-approved { background: #d1fae5; color: #047857; border: 1px solid #6ee7b7; }
.badge-rejected { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* Forms */
.form-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 40px;
  box-shadow: var(--shadow-md);
  max-width: 540px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-main);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

/* User Dashboard */
.dashboard-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  margin-top: 30px;
}

.dashboard-sidebar {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 24px;
}

.user-profile-summary {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.avatar-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--light-mint);
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 12px auto;
  border: 2px solid var(--primary-emerald);
}

.dashboard-menu {
  list-style: none;
}

.dashboard-menu li {
  margin-bottom: 8px;
}

.dashboard-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.dashboard-menu a:hover, .dashboard-menu a.active {
  background: var(--light-mint);
  color: var(--primary-emerald);
}

.dashboard-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

/* Enrolled Course Card Item (Desktop Default) */
.enrolled-course-item {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.enrolled-course-item:hover {
  border-color: #a7f3d0;
  box-shadow: var(--shadow-md);
}

.enrolled-course-main {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.enrolled-course-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.enrolled-course-details {
  flex: 1;
  min-width: 0;
}

.enrolled-course-title {
  font-size: 20px;
  color: var(--dark-emerald);
  margin-bottom: 6px;
  font-weight: 700;
}

.enrolled-course-meta {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 6px;
  line-height: 1.5;
}

.enrolled-course-dot {
  color: #cbd5e1;
}

.enrolled-course-date {
  font-size: 13px;
  color: var(--text-light);
}

.enrolled-course-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  text-align: right;
  flex-shrink: 0;
}

.enrolled-course-actions .badge {
  font-size: 13px;
  padding: 8px 16px;
  white-space: nowrap;
}

.enrolled-course-actions .btn {
  white-space: nowrap;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.data-table th, .data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--bg-subtle);
  color: var(--dark-emerald);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

/* Footer */
.footer {
  background: var(--dark-emerald);
  color: #e2e8f0;
  padding: 70px 0 30px 0;
  border-top: 3px solid var(--accent-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  color: #ffffff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-desc {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.7;
}

.footer-title {
  color: #ffffff;
  font-size: 17px;
  margin-bottom: 20px;
  position: relative;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #94a3b8;
}

/* ============================
   Custom Select Dropdown
   ============================ */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  padding: 12px 40px 12px 16px;
  font-size: 15px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  user-select: none;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-trigger::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--text-muted);
  transition: transform 0.25s ease;
  pointer-events: none;
}

.custom-select-wrapper.open .custom-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.custom-select-trigger:hover {
  border-color: var(--primary-emerald);
}

.custom-select-wrapper.open .custom-select-trigger,
.custom-select-trigger:focus {
  border-color: var(--primary-emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.custom-select-trigger.placeholder {
  color: var(--text-muted);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  max-height: 260px;
  overflow-y: auto;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.custom-select-options::-webkit-scrollbar {
  width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
  background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.custom-select-wrapper.open .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-search {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
}

.custom-select-search input {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  font-family: 'Inter', system-ui, sans-serif;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  outline: none;
  transition: var(--transition);
  color: var(--text-main);
}

.custom-select-search input:focus {
  border-color: var(--primary-emerald);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.12);
}

.custom-select-search input::placeholder {
  color: var(--text-light);
}

.custom-select-option {
  padding: 11px 16px;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-select-option:hover {
  background: var(--light-mint);
  color: var(--dark-emerald);
}

.custom-select-option.selected {
  background: var(--soft-mint);
  color: var(--primary-emerald);
  font-weight: 600;
}

.custom-select-option.selected::before {
  content: '\2713';
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-emerald);
}

.custom-select-option.hidden {
  display: none;
}

.custom-select-no-results {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-light);
  text-align: center;
  font-style: italic;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-backdrop.show {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-md);
  max-width: 500px;
  width: 90%;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

/* Intro Banner (Homepage) */
.intro-banner {
  background: var(--light-mint);
  border-radius: var(--radius-md);
  padding: 32px;
  border: 1px solid #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

/* Philosophy Grid (About Page) */
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

/* Contact Grid (Contact Page) */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* Mobile auth links: hidden on desktop (inside nav-menu which shows on desktop) */
.mobile-auth-links {
  display: none;
}

/* Responsive Breakpoints */

/* Tablet / narrow desktop: 769px — 1024px */
@media (max-width: 1024px) and (min-width: 769px) {
  .nav-menu {
    gap: 12px;
  }
  .nav-link {
    font-size: 13px;
  }
  .nav-brand {
    font-size: 17px;
    gap: 7px;
  }
  .nav-brand svg {
    width: 32px;
    height: 32px;
  }
  .nav-container {
    gap: 10px;
  }
  .btn-sm {
    padding: 7px 12px;
    font-size: 13px;
  }
}

/* Enrollment Details Grid (Responsive) */
.enrollment-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 20px;
  font-size: 15px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media (max-width: 540px) {
  .enrollment-details-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ==========================================================================
   User Off-Canvas Right Drawer Panel (Admin-Styled Sidebar for Mobile)
   ========================================================================== */

@keyframes userDrawerSlideIn {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes userDrawerFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.user-drawer-overlay {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  z-index: 2000 !important;
}

.user-drawer-overlay.show {
  display: block !important;
  animation: userDrawerFadeIn 0.25s ease forwards !important;
}

.user-drawer {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 280px !important;
  max-width: 85vw !important;
  background: #064e3b !important;
  color: #ffffff !important;
  z-index: 2010 !important;
  flex-direction: column !important;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden !important;
}

.user-drawer.open {
  display: flex !important;
  animation: userDrawerSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.user-drawer-header {
  padding: 18px 20px !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #043f30 !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
}

.user-drawer-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 19px !important;
  font-weight: 700 !important;
}

.user-drawer-close {
  background: none !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 22px !important;
  cursor: pointer !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  line-height: 1 !important;
  transition: background 0.2s ease, color 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.user-drawer-close:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

.user-drawer-nav {
  list-style: none !important;
  padding: 16px 12px !important;
  margin: 0 !important;
  flex-grow: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  overflow-y: auto !important;
  background: #064e3b !important;
}

.user-drawer-nav li {
  margin-bottom: 2px !important;
  list-style: none !important;
}

.user-drawer-nav a {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  color: #d1fae5 !important;
  background: transparent !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 500 !important;
  font-size: 15px !important;
  text-decoration: none !important;
  transition: background 0.2s ease, color 0.2s ease !important;
}

.user-drawer-nav a:hover,
.user-drawer-nav a.active {
  background: #059669 !important;
  color: #ffffff !important;
}

.user-drawer-divider {
  margin: 12px 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
  padding: 0 !important;
}

.user-drawer-nav a.btn-primary {
  background-color: #059669 !important;
  color: #ffffff !important;
  justify-content: center !important;
  text-align: center !important;
  font-weight: 600 !important;
  padding: 12px 16px !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4) !important;
}

.user-drawer-nav a.btn-primary:hover {
  background-color: #047857 !important;
  color: #ffffff !important;
}

/* Hide user drawer, overlay, and mobile toggle on Desktop screens (>= 769px) */
@media (min-width: 769px) {
  .user-drawer,
  .user-drawer-overlay,
  .mobile-toggle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 992px) {
  .hero-container, .why-choose-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .dashboard-container {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  /* === NAVBAR MOBILE === */
  .mobile-toggle {
    display: block;
    margin-left: auto;
  }
  .nav-brand {
    font-size: 16px;
    gap: 8px;
  }
  .nav-brand svg {
    width: 30px;
    height: 30px;
  }
  .nav-cta {
    display: none !important;
  }
  .nav-menu {
    display: none !important;
  }

  /* === DASHBOARD ENROLLED COURSES & SIDEBAR MOBILE === */
  .dashboard-container {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .dashboard-container > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .enrolled-course-item {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    padding: 18px 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .enrolled-course-main {
    align-items: flex-start !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .enrolled-course-img {
    width: 65px !important;
    height: 65px !important;
  }

  .enrolled-course-title {
    font-size: 18px !important;
  }

  .enrolled-course-dot {
    display: none !important;
  }

  .enrolled-course-meta span {
    display: block !important;
    width: 100% !important;
  }

  .enrolled-course-actions {
    align-items: stretch !important;
    text-align: left !important;
    margin-top: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .enrolled-course-actions .badge {
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
    white-space: normal !important;
  }

  .enrolled-course-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .dashboard-sidebar {
    padding: 16px 12px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .user-profile-summary {
    padding-bottom: 14px !important;
    margin-bottom: 14px !important;
  }

  .dashboard-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .dashboard-menu li {
    margin-bottom: 0 !important;
    width: 100% !important;
    flex: none !important;
    min-width: 0 !important;
  }

  .dashboard-menu a {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    background: var(--bg-subtle) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    word-break: break-word !important;
  }

  .dashboard-menu a:hover,
  .dashboard-menu a.active {
    background: var(--light-mint) !important;
    border-color: #a7f3d0 !important;
    color: var(--dark-emerald) !important;
  }


  /* === HERO === */
  .hero-title {
    font-size: 30px;
  }
  .hero-section {
    padding: 50px 0 60px 0;
  }

  /* === COURSES === */
  .course-grid {
    grid-template-columns: 1fr;
  }
  .course-card-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .course-card-footer .btn {
    width: 100%;
    justify-content: center;
  }

  /* === ABOUT BOX / SCHOLARLY SECTION === */
  .about-box {
    padding: 24px 16px;
    overflow: hidden;
  }
  .qualifications-grid {
    grid-template-columns: 1fr;
  }
  /* About Philosophy & Contact stacks */
  .philosophy-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  /* Intro banner stacks and centers on mobile */
  .intro-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px 16px;
  }
  .intro-banner div {
    width: 100%;
  }
  .intro-banner .btn {
    width: 100%;
    justify-content: center;
  }

  /* === FOOTER === */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-links {
    text-align: center;
  }
  .footer-links li {
    justify-content: center;
  }

  /* === FORMS === */
  .form-card {
    padding: 24px 16px;
  }

  /* === BUTTONS === */
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 340px;
    justify-content: center;
  }

  /* === SECTION PADDING === */
  .section {
    padding: 50px 0;
  }
  .section-title {
    font-size: 26px;
  }
}

/* Extra small: 400px and below (including 315px narrow mobile) */
@media (max-width: 640px) {
  .container {
    width: 100% !important;
    padding: 0 10px !important;
  }
  .dashboard-card,
  .form-card,
  .about-box {
    padding: 16px 12px !important;
    border-radius: var(--radius-sm) !important;
  }
  .enrolled-course-item {
    padding: 14px 10px !important;
  }
  .enrolled-course-header-mobile img {
    width: 60px !important;
    height: 60px !important;
  }
  .enrolled-course-header-mobile h3 {
    font-size: 17px !important;
  }
  .enrolled-course-actions .btn {
    font-size: 13px !important;
    padding: 10px 12px !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  .dashboard-menu li {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  .dashboard-menu a {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
  .table-responsive {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-top: 10px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table {
    font-size: 12px !important;
    white-space: nowrap !important;
  }
  .data-table th, .data-table td {
    padding: 10px 10px !important;
  }
}

@media (max-width: 400px) {
  .nav-container {
    height: 60px;
  }
  .nav-brand {
    font-size: 14px;
  }
  .nav-brand svg {
    width: 26px;
    height: 26px;
  }
  .btn-sm {
    padding: 7px 12px;
    font-size: 13px;
  }
  .section-title {
    font-size: 22px;
  }
  .hero-title {
    font-size: 24px;
  }
  .package-grid {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 0 6px !important;
  }
  .dashboard-card {
    padding: 14px 8px !important;
  }
  .enrolled-course-header-mobile {
    flex-direction: row !important;
    gap: 10px !important;
  }
  .enrolled-course-header-mobile img {
    width: 54px !important;
    height: 54px !important;
  }
  .enrolled-course-header-mobile h3 {
    font-size: 15px !important;
  }
  .badge {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }
}

/* ==========================================================================
   Course Detail Responsive Grid Layout
   ========================================================================== */
.course-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

.course-main-info {
  grid-column: 1;
  grid-row: 1;
}

.course-packages-full {
  grid-column: 1;
  grid-row: 2;
  margin-top: 20px;
}

.course-sidebar-column {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: sticky;
  top: 100px;
}

.course-overview-card {
  border: 2px solid var(--primary-emerald);
  background: var(--light-mint);
}

@media (max-width: 992px) {
  .course-detail-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .course-main-info {
    grid-column: 1;
    grid-row: 1;
  }

  .course-sidebar-column {
    grid-column: 1;
    grid-row: 2;
    position: static !important;
    width: 100%;
  }

  .course-packages-full {
    grid-column: 1;
    grid-row: 3;
    margin-top: 10px;
  }
}
