/* ============================================
   Bright Future Academy - Main Stylesheet
   Theme: Premium Navy & Gold Education
============================================ */

:root {
  --navy: #132b39;
  --navy-dark: #0a1a24;
  --navy-light: #24485c;
  --gold: #fa7000;
  --gold-dark: #c25400;
  --gold-light: #ff9033;
  --gold-on-light: #c25400;
  --white: #ffffff;
  --off-white: #f6f8fa;
  --text-dark: #16202a;
  --text-muted: #5f6b78;
  --border: #dfe4ea;
  --success: #28a745;
  --danger: #dc3545;
  --info: #17a2b8;
  --shadow-sm: 0 2px 8px rgba(15,25,35,0.07);
  --shadow-md: 0 4px 20px rgba(15,25,35,0.11);
  --shadow-lg: 0 8px 40px rgba(15,25,35,0.14);
  --shadow-gold: 0 4px 20px rgba(250,112,0,0.3);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; line-height: 1.2; }
h4, h5, h6 { font-family: 'Poppins', sans-serif; font-weight: 600; }

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ==================== TOPBAR ==================== */
.topbar {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar-left span { margin-right: 20px; }
.topbar-left i, .topbar-right a i { margin-right: 5px; color: var(--gold); }
.topbar-right a { color: rgba(255,255,255,0.7); margin-left: 14px; font-size: 0.85rem; }
.topbar-right a:hover { color: var(--gold); }

/* ==================== NAVBAR ==================== */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}
.navbar.scrolled { box-shadow: 0 2px 30px rgba(0,0,0,0.18); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; max-width: 1400px; }

.nav-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 1.3rem;
  box-shadow: var(--shadow-sm);
}
.logo-main { display: block; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.1rem; color: var(--navy); line-height: 1.1; }
.logo-sub { display: block; font-size: 0.75rem; color: var(--gold); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }

.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-drawer-head { display: none; }   /* mobile drawer only */

/* Visually hidden, still read by Google and screen readers. Used for page
   headings on views whose design has no visible title. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nav-menu > li > a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-menu > li > a:hover, .nav-menu > li > a.active { color: var(--gold); background: rgba(250,112,0,0.08); }

.btn-nav-login {
  border: 2px solid var(--navy) !important;
  color: var(--navy) !important;
  padding: 7px 20px !important;
  border-radius: 8px !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-nav-login:hover { background: var(--navy) !important; color: var(--white) !important; }
.btn-nav-register {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  color: var(--white) !important;
  padding: 8px 20px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  box-shadow: var(--shadow-gold);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-nav-register:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(250,112,0,0.4); }

/* Dropdown */
.nav-user-dropdown { position: relative; }
.nav-user-btn { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.nav-user-btn .fa-chevron-down { font-size: 0.75rem; transition: var(--transition); }
.nav-user-dropdown:hover .fa-chevron-down { transform: rotate(180deg); }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; display: flex; align-items: center; gap: 5px; }
.nav-dropdown:hover .dropdown-menu { display: block !important; animation: dropIn 0.2s ease; }
.nav-dropdown:hover .fa-chevron-down { transform: rotate(180deg); }
.nav-dropdown .dropdown-menu { right: auto; left: 0; min-width: 200px; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--white); border-radius: var(--radius); min-width: 200px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  overflow: hidden; z-index: 1001;
}
.nav-user-dropdown:hover .dropdown-menu { display: block; animation: dropIn 0.2s ease; }
@keyframes dropIn { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
.dropdown-menu li a { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 0.85rem; color: var(--text-dark); }
.dropdown-menu li a:hover { background: var(--off-white); color: var(--gold); }
.dropdown-menu li a i { width: 16px; color: var(--gold); }
.dropdown-menu .divider { border-top: 1px solid var(--border); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; background: none; border: none; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: var(--transition); }

/* ==================== FLASH MESSAGES ==================== */
.flash-message {
  position: fixed; top: 80px; right: 20px; z-index: 9999;
  padding: 14px 20px; border-radius: var(--radius);
  display: flex; align-items: center; gap: 10px;
  font-size: 0.9rem; font-weight: 500;
  box-shadow: var(--shadow-lg); max-width: 400px;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { opacity:0; transform:translateX(50px); } to { opacity:1; transform:translateX(0); } }
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.flash-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.flash-warning { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.flash-message button { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; opacity: 0.7; }

/* ==================== HERO SECTION ==================== */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  position: relative; overflow: hidden;
  padding: 90px 0 80px;
  min-height: 560px; display: flex; align-items: center;
}
.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' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero::after {
  content: ''; position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(250,112,0,0.12) 0%, transparent 70%);
  top: -100px; right: -100px; border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(250,112,0,0.15); border: 1px solid rgba(250,112,0,0.3); color: var(--gold); padding: 6px 16px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 20px; }
.hero h1 { font-size: 3rem; color: var(--white); line-height: 1.1; margin-bottom: 20px; }
.hero h1 span { color: var(--gold); display: block; }
.hero p { color: rgba(255,255,255,0.75); font-size: 1.05rem; margin-bottom: 36px; line-height: 1.7; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* Subtle first-paint entrance animation for hero content — makes the homepage feel alive without any JS or library */
@media (prefers-reduced-motion: no-preference) {
  .hero-badge, .hero h1, .hero p, .hero-btns, .hero-trust, .hero-auth, .hero-stats { opacity: 0; animation: heroRise 0.7s cubic-bezier(0.16,1,0.3,1) forwards; }
  .hero-badge  { animation-delay: 0.05s; }
  .hero h1     { animation-delay: 0.12s; }
  .hero p      { animation-delay: 0.2s; }
  .hero-btns   { animation-delay: 0.28s; }
  .hero-trust  { animation-delay: 0.32s; }
  .hero-auth   { animation-delay: 0.38s; }
  .hero-stats  { animation-delay: 0.44s; }
  .hero-img    { opacity: 0; animation: heroFade 0.9s ease 0.3s forwards; }
}
@keyframes heroRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroFade { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
.btn-primary-hero {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy-dark); font-weight: 700; padding: 14px 32px;
  border-radius: 10px; font-size: 1rem;
  box-shadow: var(--shadow-gold); transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary-hero:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(250,112,0,0.5); color: var(--navy-dark); }
.btn-outline-hero {
  border: 2px solid rgba(255,255,255,0.3); color: var(--white);
  padding: 12px 28px; border-radius: 10px; font-weight: 600;
  transition: var(--transition); display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline-hero:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); color: var(--white); }
.hero-stats { display: flex; gap: 30px; margin-top: 40px; }
.hero-stat { text-align: center; }
.hero-stat .num { font-family: 'Playfair Display',serif; font-size: 2rem; font-weight: 800; color: var(--gold); line-height: 1; }
.hero-stat .label { font-size: 0.76rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.5px; }
.hero-img { position: relative; }
.hero-img-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg); padding: 30px;
  backdrop-filter: blur(10px);
}
.hero-features { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-feature {
  background: rgba(255,255,255,0.08); border-radius: var(--radius);
  padding: 18px; text-align: center;
  transition: var(--transition); border: 1px solid rgba(255,255,255,0.05);
}
.hero-feature:hover { background: rgba(250,112,0,0.1); border-color: rgba(250,112,0,0.3); transform: translateY(-3px); }
.hero-feature i { font-size: 1.8rem; color: var(--gold); margin-bottom: 8px; }
.hero-feature p { color: rgba(255,255,255,0.8); font-size: 0.82rem; font-weight: 500; }

/* ==================== SECTIONS ==================== */
.section { padding: 80px 0; }
.section-alt { background: var(--white); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--gold);
  color: var(--gold-dark); padding: 6px 18px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 16px;
}
.section-badge::before, .section-badge::after { content: ''; width: 4px; height: 4px; background: var(--gold); border-radius: 50%; }
.section-header h2 { font-size: 2.4rem; color: var(--navy); margin-bottom: 14px; font-family: var(--font-heading, 'Playfair Display'), serif; font-weight: 700; }
.section-header p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.section-divider { width: 70px; height: 2px; background: var(--gold); border-radius: 2px; margin: 18px auto 0; position: relative; }
.section-divider::before { content: '◆'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: var(--gold); font-size: 0.75rem; background: var(--off-white); padding: 0 8px; }
.section-alt .section-divider::before { background: var(--white); }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 26px; border-radius: 8px; font-size: 0.9rem;
  font-weight: 600; border: none; cursor: pointer;
  transition: var(--transition); font-family: 'Poppins', sans-serif;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy-dark); box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(250,112,0,0.4); color: var(--navy-dark); }
.btn-navy {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
}
.btn-navy:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--white); }
.btn-outline {
  border: 2px solid var(--navy); color: var(--navy); background: transparent;
}
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-gold-outline {
  border: 2px solid var(--gold); color: var(--gold); background: transparent;
}
.btn-gold-outline:hover { background: var(--gold); color: var(--navy-dark); }
.btn-sm { padding: 7px 18px; font-size: 0.82rem; }
.btn-lg { padding: 14px 36px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }

/* ==================== CARDS ==================== */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  overflow: hidden; transition: var(--transition);
  position: relative;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(to right, var(--gold), var(--gold-light));
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease; z-index: 2;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(250,112,0,0.35); }
.card:hover::before { transform: scaleX(1); }

/* Course Cards */
.courses-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.course-card { position: relative; }
.course-thumb { position: relative; overflow: hidden; height: 200px; background: var(--navy); }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.course-card:hover .course-thumb img { transform: scale(1.06); }
.course-badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--gold); color: var(--navy-dark);
  padding: 4px 12px; border-radius: 6px; font-size: 0.76rem; font-weight: 700;
}
.course-badge.free { background: var(--success); color: white; }
.course-body { padding: 22px; }
.course-meta { display: flex; gap: 14px; margin-bottom: 10px; }
.course-meta span { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.course-meta i { color: var(--gold); }
.course-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; line-height: 1.4; }
.course-instructor { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px; }
.course-instructor i { color: var(--gold); margin-right: 5px; }
.course-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--border); }
.course-price .new-price { font-size: 1.2rem; font-weight: 800; color: var(--gold-dark); }
.course-price .old-price { font-size: 0.8rem; color: var(--text-muted); text-decoration: line-through; margin-left: 6px; }

/* Notes Cards */
.notes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.note-card { position: relative; }
.note-thumb { height: 160px; background: linear-gradient(135deg, var(--navy), var(--navy-light)); display: flex; align-items: center; justify-content: center; position: relative; }
.note-thumb i { font-size: 3.5rem; color: rgba(250,112,0,0.8); }
.note-thumb .note-type { position: absolute; bottom: 10px; right: 10px; background: var(--gold); color: var(--navy-dark); padding: 2px 10px; border-radius: 4px; font-size: 0.76rem; font-weight: 700; }
.note-body { padding: 18px; }
.note-title { font-size: 0.92rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; line-height: 1.4; }
.note-desc { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.note-footer { display: flex; justify-content: space-between; align-items: center; }
.note-pages { font-size: 0.75rem; color: var(--text-muted); }
.note-pages i { color: var(--gold); margin-right: 4px; }

/* Live Class Cards */
.classes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.class-card { position: relative; }
.class-header { background: linear-gradient(135deg, var(--navy), var(--navy-light)); padding: 20px; color: var(--white); }
.class-platform { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.1); padding: 4px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; margin-bottom: 12px; }
.class-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.class-instructor { font-size: 0.82rem; opacity: 0.8; }
.class-body { padding: 18px; }
.class-time { display: flex; align-items: center; gap: 8px; background: rgba(250,112,0,0.08); border-radius: 8px; padding: 12px; margin-bottom: 14px; }
.class-time i { color: var(--gold); font-size: 1.1rem; }
.class-time .date { font-weight: 700; font-size: 0.9rem; color: var(--navy); }
.class-time .time { font-size: 0.8rem; color: var(--text-muted); }
.class-footer { display: flex; justify-content: space-between; align-items: center; }
.class-status { padding: 4px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; }
.status-upcoming { background: #e3f2fd; color: #1565c0; }
.status-live { background: #fde8e8; color: #c62828; }
.status-completed { background: #e8f5e9; color: #2e7d32; }

/* ==================== STATS ==================== */
.stats-section { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); padding: 60px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.stat-item { text-align: center; padding: 30px 20px; }
.stat-icon { width: 60px; height: 60px; background: rgba(250,112,0,0.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.stat-icon i { font-size: 1.5rem; color: var(--gold); }
.stat-num { font-family: 'Playfair Display',serif; font-size: 2.5rem; font-weight: 800; color: var(--white); line-height: 1; margin-bottom: 6px; }
.stat-num span { color: var(--gold); }
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.5px; }

/* ==================== CATEGORIES ==================== */
.categories-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.cat-card {
  text-align: center; padding: 24px 16px;
  border-radius: var(--radius); background: var(--white);
  box-shadow: var(--shadow-sm); border: 2px solid transparent;
  transition: var(--transition); cursor: pointer;
}
.cat-card:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow-gold); }
.cat-icon { width: 56px; height: 56px; background: linear-gradient(135deg, var(--navy), var(--navy-light)); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.cat-icon i { font-size: 1.4rem; color: var(--gold); }
.cat-name { font-size: 0.8rem; font-weight: 700; color: var(--navy); }

/* ==================== TESTIMONIALS ==================== */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.testimonial-card { padding: 30px; position: relative; }
.testimonial-card::before { content: '\201C'; font-size: 5rem; font-family: 'Playfair Display',serif; color: var(--gold); opacity: 0.15; position: absolute; top: 10px; left: 20px; line-height: 1; }
.testimonial-rating { color: var(--gold); margin-bottom: 14px; }
.testimonial-text { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--navy-light)); display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 1.2rem; font-weight: 700; font-family: 'Playfair Display',serif; }
.testimonial-info .name { font-weight: 700; font-size: 0.9rem; color: var(--navy); }
.testimonial-info .role { font-size: 0.75rem; color: var(--gold); font-weight: 600; }

/* ==================== PAGE HEADER ==================== */
.page-header {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  padding: 56px 0; text-align: center; position: relative; overflow: hidden;
}
.page-header::after { content: ''; position: absolute; width: 400px; height: 400px; background: radial-gradient(circle, rgba(250,112,0,0.1) 0%, transparent 70%); top: -100px; right: 50px; }
.page-header h1 { color: var(--white); font-size: 2.4rem; margin-bottom: 10px; position: relative; z-index: 1; }
.page-header p { color: rgba(255,255,255,0.7); position: relative; z-index: 1; }
.breadcrumb { display: flex; justify-content: center; gap: 8px; margin-top: 14px; font-size: 0.82rem; position: relative; z-index: 1; }
.breadcrumb a { color: var(--gold); }
.breadcrumb span { color: rgba(255,255,255,0.5); }

/* ==================== FILTERS & SEARCH ==================== */
.filter-bar {
  background: var(--white); border-radius: var(--radius); padding: 20px 24px;
  box-shadow: var(--shadow-sm); margin-bottom: 36px;
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
.filter-bar input, .filter-bar select {
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 9px 14px; font-family: 'Poppins',sans-serif; font-size: 0.88rem;
  color: var(--text-dark); outline: none; background: var(--off-white);
  transition: var(--transition);
}
.filter-bar input { flex: 1; min-width: 220px; }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--gold); background: var(--white); }
.filter-bar select { min-width: 160px; cursor: pointer; }

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.form-label span { color: var(--danger); }
.form-control {
  width: 100%; padding: 11px 16px; border: 1.5px solid var(--border);
  border-radius: 8px; font-family: 'Poppins',sans-serif; font-size: 0.9rem;
  color: var(--text-dark); background: var(--off-white);
  outline: none; transition: var(--transition);
}
.form-control:focus { border-color: var(--gold); background: var(--white); box-shadow: 0 0 0 3px rgba(250,112,0,0.1); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-text { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input-icon .form-control { padding-left: 40px; }

/* ==================== AUTH PAGES ==================== */
.auth-page { min-height: calc(100vh - 200px); display: flex; align-items: center; padding: 60px 0; }
.auth-card { max-width: 480px; margin: 0 auto; width: 100%; }
.auth-card .card { padding: 40px; }
.auth-title { text-align: center; margin-bottom: 30px; }
.auth-title h2 { font-size: 2rem; color: var(--navy); margin-bottom: 8px; }
.auth-title p { color: var(--text-muted); font-size: 0.9rem; }
.auth-divider { text-align: center; margin: 20px 0; position: relative; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.auth-divider span { background: var(--white); padding: 0 12px; font-size: 0.8rem; color: var(--text-muted); position: relative; }
.auth-link { text-align: center; margin-top: 20px; font-size: 0.88rem; color: var(--text-muted); }
.auth-link a { color: var(--gold-dark); font-weight: 600; }

/* ==================== DASHBOARD ==================== */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; padding: 40px 0; }
.dashboard-sidebar { position: sticky; top: 90px; height: fit-content; }
.sidebar-profile { text-align: center; padding: 24px; background: linear-gradient(135deg, var(--navy), var(--navy-light)); border-radius: var(--radius-lg); color: var(--white); margin-bottom: 20px; }
.sidebar-avatar { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--gold); margin: 0 auto 12px; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; font-family: 'Playfair Display',serif; color: var(--gold); }
.sidebar-name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.sidebar-email { font-size: 0.75rem; opacity: 0.7; }
.sidebar-nav .card { padding: 8px; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 8px; font-size: 0.88rem; font-weight: 500; color: var(--navy); transition: var(--transition); }
.sidebar-nav a:hover, .sidebar-nav a.active { background: var(--gold); color: var(--navy-dark); font-weight: 700; }
.sidebar-nav a i { width: 18px; }
.dashboard-content .card { padding: 28px; margin-bottom: 24px; }
.dash-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.dash-stat { padding: 20px; background: linear-gradient(135deg, var(--navy), var(--navy-light)); border-radius: var(--radius); color: white; }
.dash-stat i { font-size: 1.6rem; color: var(--gold); margin-bottom: 10px; }
.dash-stat .val { font-size: 1.8rem; font-weight: 800; font-family: 'Playfair Display',serif; }
.dash-stat .lbl { font-size: 0.8rem; opacity: 0.7; }

/* ==================== TABLES ==================== */
.table-responsive { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--navy); color: var(--white); padding: 12px 16px; font-size: 0.82rem; font-weight: 600; text-align: left; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.85rem; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--off-white); }
.badge { padding: 3px 10px; border-radius: 50px; font-size: 0.76rem; font-weight: 700; }
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-secondary { background: #e2e3e5; color: #383d41; }

/* ==================== PAGINATION ==================== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.pagination a, .pagination span {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 0.88rem; font-weight: 600; transition: var(--transition);
  border: 1.5px solid var(--border);
}
.pagination a { color: var(--navy); }
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .active { background: var(--gold); border-color: var(--gold); color: var(--navy-dark); }

/* ==================== CONTACT ==================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; }
.contact-info-card { background: linear-gradient(135deg, var(--navy), var(--navy-light)); border-radius: var(--radius-lg); padding: 40px; color: white; }
.contact-info-card h3 { font-size: 1.6rem; margin-bottom: 12px; }
.contact-info-card p { opacity: 0.8; margin-bottom: 30px; }
.contact-info-item { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.contact-info-icon { width: 44px; height: 44px; min-width: 44px; background: rgba(250,112,0,0.15); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.contact-info-icon i { color: var(--gold); font-size: 1.1rem; }
.contact-info-item .info-text .label { font-size: 0.75rem; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.5px; }
.contact-info-item .info-text .value { font-weight: 600; font-size: 0.95rem; }

/* ==================== FOOTER ==================== */
.site-footer { background: var(--navy-dark); }
.footer-main { padding: 70px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-family: 'Playfair Display',serif; font-size: 1.3rem; font-weight: 700; color: var(--white); }
.footer-logo i { color: var(--gold); font-size: 1.5rem; }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 0.85rem; line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 36px; height: 36px; background: rgba(255,255,255,0.08); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); font-size: 0.85rem; transition: var(--transition); }
.footer-social a:hover { background: var(--gold); color: var(--navy-dark); }
.footer-col h4 { font-size: 0.95rem; color: var(--white); font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid rgba(250,112,0,0.3); }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.55); font-size: 0.85rem; transition: var(--transition); display: flex; align-items: center; gap: 8px; }
.footer-col ul li a i { color: var(--gold); font-size: 0.75rem; }
.footer-col ul li a:hover { color: var(--gold); padding-left: 4px; }
.footer-contact .footer-contact-item { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.footer-contact .footer-contact-item i { color: var(--gold); margin-top: 3px; min-width: 16px; }
.footer-contact .footer-contact-item span, .footer-contact .footer-contact-item a { color: rgba(255,255,255,0.6); font-size: 0.83rem; line-height: 1.5; }
.footer-contact .footer-contact-item a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; text-align: center; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { color: rgba(255,255,255,0.4); font-size: 0.8rem; }

/* ==================== BACK TO TOP ==================== */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px; z-index: 999;
  width: 44px; height: 44px; background: var(--gold); border: none;
  border-radius: 50%; cursor: pointer; color: var(--navy-dark);
  box-shadow: var(--shadow-gold); transition: var(--transition);
  display: none; align-items: center; justify-content: center; font-size: 1rem;
}
.back-to-top.show { display: flex; }
.back-to-top:hover { background: var(--gold-dark); transform: translateY(-3px); }

/* ==================== COURSE DETAIL ==================== */
.course-detail-hero { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); padding: 50px 0; }
.course-detail-hero .container { display: grid; grid-template-columns: 1fr 380px; gap: 50px; align-items: start; }
.course-detail-info h1 { font-size: 2rem; color: var(--white); margin-bottom: 14px; }
.course-detail-info p { color: rgba(255,255,255,0.75); margin-bottom: 20px; line-height: 1.7; }
.course-detail-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.course-detail-meta span { color: rgba(255,255,255,0.7); font-size: 0.85rem; }
.course-detail-meta i { color: var(--gold); margin-right: 5px; }
.purchase-card { background: var(--white); border-radius: var(--radius-lg); padding: 28px; position: sticky; top: 90px; }
.purchase-price { font-size: 2rem; font-weight: 800; color: var(--gold-dark); font-family: 'Playfair Display',serif; }
.purchase-old-price { font-size: 1rem; color: var(--text-muted); text-decoration: line-through; margin-left: 8px; }
.purchase-discount { background: #d4edda; color: #155724; padding: 3px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 700; margin-left: 8px; }
.purchase-features { margin: 20px 0; }
.purchase-features li { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 0.85rem; color: var(--text-dark); }
.purchase-features li i { color: var(--success); }

/* ==================== EMPTY STATE ==================== */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state i { font-size: 4rem; color: var(--border); margin-bottom: 16px; }
.empty-state h3 { color: var(--text-muted); font-size: 1.3rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; }

/* ==================== LOADING ==================== */
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.9); z-index: 9999; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== ABOUT PAGE ==================== */
.about-hero-text h2 { font-size: 2.6rem; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.team-card { text-align: center; padding: 30px 20px; }
.team-avatar { width: 90px; height: 90px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--navy-light)); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 2rem; font-weight: 700; font-family: 'Playfair Display',serif; color: var(--gold); border: 3px solid var(--gold); }
.team-name { font-weight: 700; font-size: 1rem; color: var(--navy); margin-bottom: 4px; }
.team-role { font-size: 0.8rem; color: var(--gold-dark); font-weight: 600; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1400px) {
  /* Tighten the navbar on laptop-width screens so all items fit on one line without overflowing */
  .nav-menu { gap: 0; }
  .nav-menu > li > a { padding: 8px 9px; font-size: 0.83rem; }
  .btn-nav-login { padding: 7px 14px !important; }
  .btn-nav-register { padding: 8px 14px !important; }
}
@media (max-width: 1200px) and (min-width: 769px) {
  /* Shrink the logo a little (instead of hiding the name) to help everything fit */
  .nav-logo { gap: 8px; }
  .logo-icon { width: 38px; height: 38px; font-size: 1.1rem; }
  .logo-main { font-size: 0.95rem; }
  .logo-sub { display: none; }
}
@media (max-width: 1024px) {
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
  .notes-grid { grid-template-columns: repeat(3, 1fr); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .topbar .container { flex-direction: column; gap: 6px; text-align: center; }
  /* ── MOBILE NAV: right-side drawer ────────────────────────
     Was an absolutely-positioned dropdown that only grew as tall
     as its own content, so page content showed underneath it and
     the dashboard's bottom bar sat on top. Now a full-height
     drawer with a backdrop, scroll lock and left-aligned rows. */
  .nav-toggle { display: flex; }

  body.nav-open { overflow: hidden; }
  body.nav-open::after {
    content: '';
    position: fixed; inset: 0;
    background: rgba(10,24,31,0.52);
    z-index: 999995;
  }
  /* Keep the bar lit above the backdrop so the X stays reachable,
     and take the dashboard's bottom bar out of the way. */
  body.nav-open .navbar { z-index: 1000000; }
  body.nav-open .bfa-bottom-nav { display: none; }

  .nav-menu {
    display: block;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(86vw, 330px);
    margin: 0;
    padding: 0 0 34px;
    background: var(--white);
    box-shadow: -10px 0 44px rgba(19,43,57,0.26);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    align-items: stretch;
    gap: 0;
    transform: translateX(101%);
    visibility: hidden;
    transition: transform .3s cubic-bezier(.16,1,.3,1), visibility .3s;
    z-index: 5;
  }
  .nav-menu.open { transform: translateX(0); visibility: visible; }

  .nav-menu > li { display: block; width: 100%; }

  /* Drawer header — gives the panel a top edge and a way out */
  .nav-menu > li.nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px 13px 22px;
    border-bottom: 2px solid var(--navy);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .nav-drawer-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .nav-drawer-close {
    width: 42px;
    height: 42px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--off-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--navy);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
  }
  .nav-drawer-close:active { background: var(--border); }

  /* Full-width rows, left-aligned, 52px touch targets */
  .nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 52px;
    padding: 13px 22px;
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    white-space: normal;
    border-bottom: 1px solid var(--border);
  }
  .nav-menu > li > a.active {
    background: var(--off-white);
    color: var(--gold-on-light, var(--gold-dark));
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--gold);
  }

  /* Plans is the one promoted row */
  .nav-menu .nav-plans-link {
    width: auto;          /* 100% + side margins overflowed the drawer */
    margin: 12px 16px;
    min-height: 48px;
    justify-content: center;
    border-radius: 10px;
    border-bottom: none;
    background: var(--gold);
    color: var(--navy-dark) !important;
    font-weight: 700;
    box-shadow: none;
  }

  /* Nested menus: indented on a tinted panel.
     The Tests submenu carries inline display:none so it stays
     collapsed until tapped. The account menu has no tap handler,
     so it is shown open — otherwise it is unreachable on a phone. */
  .nav-dropdown .dropdown-menu,
  .nav-user-dropdown .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    margin: 0;
    padding: 4px 0;
    background: var(--off-white);
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-user-dropdown .dropdown-menu { display: block; }
  .nav-dropdown .dropdown-menu li a,
  .nav-user-dropdown .dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 22px 10px 40px;
    font-size: 0.87rem;
  }
  .nav-user-dropdown > .nav-user-btn {
    background: var(--off-white);
    font-weight: 700;
  }
  .hero .container { grid-template-columns: 1fr; gap: 30px; }
  .hero h1 { font-size: 2rem; }
  .hero-img { display: none; }
  .courses-grid, .classes-grid { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-layout { grid-template-columns: 1fr; gap: 16px; padding: 20px 0; }
  .dashboard-sidebar { position: static; }
  .sidebar-profile { padding: 16px; display: flex; align-items: center; gap: 14px; text-align: left; border-radius: 12px; }
  .sidebar-avatar { width: 48px; height: 48px; font-size: 1.2rem; margin: 0; flex-shrink: 0; }
  .sidebar-name { font-size: 0.95rem; margin-bottom: 2px; }
  .sidebar-email { font-size: 0.76rem; }
  .sidebar-nav a { padding: 10px 14px; font-size: 0.85rem; }
  .dashboard-content .card { padding: 16px; margin-bottom: 14px; }
  .dash-stat-grid { grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }
  .dash-stat { padding: 14px 10px; }
  .dash-stat .val { font-size: 1.4rem; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 8px 10px; }
  .contact-grid { grid-template-columns: 1fr; }
  .course-detail-hero .container { grid-template-columns: 1fr; }
  .purchase-card { position: static; order: -1; margin-bottom: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom .container { flex-direction: column; gap: 8px; }
  .dash-stat-grid { grid-template-columns: 1fr; }
  .section-header h2 { font-size: 1.8rem; }
  .hero-stats { flex-wrap: wrap; gap: 16px; justify-content: center; }
}
@media (max-width: 480px) {
  .notes-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-btns { flex-direction: column; }
  .dash-stat-grid { grid-template-columns: repeat(3,1fr); gap: 8px; }
  .dash-stat { padding: 10px 6px; }
  .dash-stat .val { font-size: 1.2rem; }
  .dash-stat .lbl { font-size: 0.75rem; }
  .dashboard-content .card { padding: 12px; }
  .sidebar-profile { padding: 12px; gap: 10px; }
  .sidebar-avatar { width: 42px; height: 42px; font-size: 1.1rem; }
  .sidebar-name { font-size: 0.88rem; }
}