/* ============================================================
   FlyHire Academy — Global Stylesheet
   Font: Inter | Palette: Navy + Blue + Purple AI accent
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --blue:       #1a56db;
  --blue-dark:  #1344b4;
  --blue-light: #e8f0fe;
  --navy:       #0f1f4b;
  --teal:       #0ea5e9;
  --purple:     #7c3aed;
  --purple-lt:  #ede9fe;
  --gold:       #d97706;
  --gold-lt:    #fef3c7;
  --green:      #16a34a;
  --green-lt:   #dcfce7;
  --red:        #dc2626;
  --red-lt:     #fee2e2;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-300:   #cbd5e1;
  --gray-400:   #94a3b8;
  --gray-500:   #64748b;
  --gray-700:   #334155;
  --gray-900:   #0f172a;
  --white:      #ffffff;
  --radius:     8px;
  --radius-lg:  12px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.10), 0 4px 6px -2px rgba(0,0,0,.05);
  --transition: .2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--gray-900); background: var(--gray-50); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; display: block; }
img  { display: block; max-width: 100%; }
a    { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; }

/* ---------- Layout ---------- */
.container  { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section    { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.page-hero  { background: linear-gradient(135deg, var(--navy) 0%, #1344b4 100%); color: var(--white); padding: 56px 0 48px; }
.page-hero h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 8px; }
.page-hero p  { color: rgba(255,255,255,.75); font-size: 1.05rem; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.25; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
.text-muted   { color: var(--gray-500); }
.text-sm      { font-size: .875rem; }
.text-xs      { font-size: .75rem; }
.text-danger  { color: var(--red); }
.text-success { color: var(--green); }
.font-bold    { font-weight: 700; }
.section-heading { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.section-sub  { color: var(--gray-500); margin-bottom: 40px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary  { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); text-decoration: none; color: var(--white); }
.btn-dark     { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: #0a1530; text-decoration: none; color: var(--white); }
.btn-purple   { background: var(--purple); color: var(--white); }
.btn-purple:hover { background: #6d28d9; text-decoration: none; color: var(--white); }
.btn-ghost    { background: transparent; color: var(--gray-700); border: 1.5px solid var(--gray-300); }
.btn-ghost:hover { background: var(--gray-100); text-decoration: none; }
.btn-outline  { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue-light); text-decoration: none; }
.btn-success  { background: var(--green); color: var(--white); }
.btn-success:hover { background: #15803d; text-decoration: none; color: var(--white); }
.btn-danger   { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #b91c1c; text-decoration: none; color: var(--white); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.nav-logo     { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.nav-logo-img-wrap {
  display: flex; align-items: center;
  width: 140px; height: 40px;
  overflow: hidden; flex-shrink: 0;
}
.nav-logo-img {
  max-width: 140px; max-height: 40px;
  width: auto; height: auto;
  display: block; object-fit: contain;
}
.logo-mark { width: 36px; height: 36px; background: linear-gradient(135deg, var(--blue), var(--purple)); border-radius: 8px;
             display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 800; color: var(--white); }
.logo-text { font-size: 1.05rem; color: var(--gray-900); }
.logo-text strong { color: var(--blue); }
.nav-search { flex: 1; max-width: 420px; position: relative; }
.nav-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: .85rem; }
.nav-search input { width: 100%; padding: 9px 12px 9px 36px; border: 1.5px solid var(--gray-200); border-radius: 20px; font-size: .875rem; background: var(--gray-50); transition: var(--transition); }
.nav-search input:focus { outline: none; border-color: var(--blue); background: var(--white); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-link    { font-size: .9rem; font-weight: 500; color: var(--gray-700); padding: 6px 8px; border-radius: var(--radius); transition: var(--transition); }
.nav-link:hover { color: var(--blue); background: var(--blue-light); text-decoration: none; }
.nav-user-wrap { position: relative; }
.nav-avatar  { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--blue); color: var(--white); font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center; padding: 0; border: 2px solid var(--gray-200); transition: var(--transition); }
.nav-avatar:hover { border-color: var(--blue); }
.nav-avatar img  { width: 100%; height: 100%; object-fit: cover; }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 220px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 8px 0; opacity: 0; pointer-events: none; transform: translateY(-4px); transition: opacity .15s, transform .15s; }
.user-dropdown.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.dropdown-header { padding: 12px 16px 8px; border-bottom: 1px solid var(--gray-100); margin-bottom: 4px; }
.dropdown-header strong { display: block; font-size: .9rem; }
.dropdown-header small { color: var(--gray-500); font-size: .8rem; }
.user-dropdown a { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: .875rem; color: var(--gray-700); transition: background .1s; }
.user-dropdown a:hover { background: var(--gray-50); text-decoration: none; }
.user-dropdown a i { width: 16px; color: var(--gray-400); }
.dropdown-divider { border: 0; border-top: 1px solid var(--gray-100); margin: 4px 0; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--gray-700); border-radius: 2px; transition: var(--transition); }

/* ---------- Flash messages ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 14px 20px; font-size: .9rem; font-weight: 500; }
.flash-success { background: var(--green-lt); color: #166534; }
.flash-error   { background: var(--red-lt); color: #991b1b; }
.flash-info    { background: var(--blue-light); color: #1e40af; }
.flash-close   { margin-left: auto; font-size: 1.2rem; line-height: 1; opacity: .6; }
.flash-close:hover { opacity: 1; }

/* ---------- Course Card ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.course-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow var(--transition), transform var(--transition); display: flex; flex-direction: column; }
.course-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.course-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--gray-100); }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.course-card:hover .course-thumb img { transform: scale(1.04); }
.course-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy), var(--blue)); color: var(--white); font-size: 2.5rem; }
.badge-free   { position: absolute; top: 10px; left: 10px; background: var(--green); color: var(--white); font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.badge-level  { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.55); color: var(--white); font-size: .7rem; font-weight: 600; padding: 3px 8px; border-radius: 4px; backdrop-filter: blur(4px); }
.course-body  { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.course-cat   { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--blue); margin-bottom: 6px; }
.course-title { font-size: .95rem; font-weight: 700; line-height: 1.35; margin-bottom: 8px; color: var(--gray-900); flex: 1; }
.course-title:hover { color: var(--blue); }
.course-meta  { display: flex; align-items: center; gap: 12px; font-size: .78rem; color: var(--gray-500); margin-bottom: 12px; flex-wrap: wrap; }
.course-meta i { color: var(--gray-400); }
.course-rating { display: flex; align-items: center; gap: 4px; font-size: .78rem; }
.course-rating .rating-num { font-weight: 700; color: var(--gold); }
.stars i { color: var(--gold); font-size: .7rem; }
.course-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--gray-100); }
.course-price  { font-size: 1.1rem; font-weight: 800; color: var(--navy); }
.course-price.free { color: var(--green); }
.course-instructor { font-size: .78rem; color: var(--gray-500); }

/* ---------- Hero (Homepage) ---------- */
.hero { background: linear-gradient(135deg, var(--navy) 0%, #162d6b 60%, #1a56db 100%); color: var(--white); padding: 80px 0 96px; text-align: center; position: relative; overflow: hidden; }
.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%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-content  { position: relative; max-width: 720px; margin: 0 auto; }
.hero-badge    { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.9); font-size: .82rem; font-weight: 600; padding: 6px 16px; border-radius: 20px; margin-bottom: 24px; backdrop-filter: blur(4px); }
.hero h1       { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 900; line-height: 1.15; margin-bottom: 20px; }
.hero h1 span  { color: var(--teal); }
.hero p        { font-size: 1.15rem; color: rgba(255,255,255,.8); margin-bottom: 36px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-btns     { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats    { display: flex; justify-content: center; gap: 40px; margin-top: 56px; flex-wrap: wrap; }
.hero-stat h3  { font-size: 1.75rem; font-weight: 900; color: var(--white); }
.hero-stat p   { font-size: .85rem; color: rgba(255,255,255,.65); margin-top: 2px; }

/* ---------- Categories Section ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.cat-card { background: var(--white); border: 1.5px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px 16px; text-align: center; transition: var(--transition); cursor: pointer; text-decoration: none; display: block; color: var(--gray-900); }
.cat-card:hover { border-color: var(--blue); background: var(--blue-light); transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; color: var(--blue); }
.cat-card i { font-size: 1.75rem; color: var(--blue); margin-bottom: 12px; display: block; }
.cat-card h4 { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.cat-card span { font-size: .75rem; color: var(--gray-500); margin-top: 4px; display: block; }

/* ---------- Filters Sidebar ---------- */
.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.filters-panel  { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; position: sticky; top: 80px; }
.filter-section { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--gray-100); }
.filter-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.filter-label   { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); margin-bottom: 12px; display: block; }
.filter-opt     { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; font-size: .875rem; color: var(--gray-700); }
.filter-opt input { accent-color: var(--blue); }
.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.results-count  { font-size: .9rem; color: var(--gray-500); }
.sort-select    { padding: 7px 12px; border: 1.5px solid var(--gray-200); border-radius: var(--radius); font-size: .875rem; background: var(--white); }
.sort-select:focus { outline: none; border-color: var(--blue); }

/* ---------- Course Detail ---------- */
.course-detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.course-sticky-card   { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); position: sticky; top: 80px; overflow: hidden; box-shadow: var(--shadow-md); }
.course-preview-video { aspect-ratio: 16/9; background: var(--navy); position: relative; }
.course-preview-video iframe, .course-preview-video img { width: 100%; height: 100%; object-fit: cover; }
.play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.3); }
.play-btn i { font-size: 3rem; color: var(--white); filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); transition: transform .2s; }
.play-btn:hover i { transform: scale(1.1); }
.sticky-body { padding: 20px; }
.sticky-price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.sticky-price { font-size: 2rem; font-weight: 900; color: var(--navy); }
.sticky-price.free { color: var(--green); }
.btn-enroll   { background: linear-gradient(135deg, var(--blue), var(--purple)); color: var(--white); font-size: 1rem; padding: 14px 20px; width: 100%; border-radius: var(--radius); font-weight: 700; transition: opacity .2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-enroll:hover { opacity: .9; text-decoration: none; color: var(--white); }
.course-guarantees { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.guarantee-item  { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--gray-600); }
.guarantee-item i { color: var(--green); width: 14px; }
.course-header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: .875rem; color: var(--gray-600); margin-bottom: 20px; }
.course-header-meta strong { color: var(--gray-900); }
.outcomes-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.outcomes-list li { display: flex; align-items: flex-start; gap: 8px; font-size: .88rem; }
.outcomes-list i { color: var(--green); margin-top: 3px; flex-shrink: 0; }
.curriculum-section { margin-bottom: 4px; }
.curriculum-section-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: .9rem; transition: background .15s; }
.curriculum-section-header:hover { background: var(--blue-light); }
.curriculum-section-header .toggle-icon { transition: transform .2s; color: var(--gray-400); }
.curriculum-section-header.open .toggle-icon { transform: rotate(180deg); }
.curriculum-section-body { border: 1px solid var(--gray-200); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); display: none; }
.curriculum-section-body.open { display: block; }
.lesson-row   { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--gray-100); font-size: .875rem; color: var(--gray-700); }
.lesson-row:last-child { border-bottom: 0; }
.lesson-row .lesson-icon { color: var(--gray-400); width: 16px; text-align: center; }
.lesson-row .lesson-title { flex: 1; }
.lesson-row .preview-badge { font-size: .72rem; color: var(--blue); font-weight: 600; border: 1px solid var(--blue); padding: 1px 6px; border-radius: 4px; }
.lesson-row .lesson-dur { font-size: .78rem; color: var(--gray-400); }
.instructor-card { display: flex; align-items: flex-start; gap: 20px; padding: 24px; background: var(--gray-50); border-radius: var(--radius-lg); }
.instructor-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--blue); display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 1.75rem; font-weight: 700; }
.review-card { padding: 20px 0; border-bottom: 1px solid var(--gray-100); }
.review-card:last-child { border-bottom: 0; }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.reviewer-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }

/* ---------- Lesson Player ---------- */
.player-layout { display: grid; grid-template-columns: 1fr 320px; height: calc(100vh - 64px); overflow: hidden; }
.player-main   { overflow-y: auto; display: flex; flex-direction: column; }
.player-video  { background: #000; position: relative; }
.player-video iframe, .player-video video { width: 100%; height: 100%; display: block; }
.player-video-wrap { aspect-ratio: 16/9; }
.player-pdf    { flex: 1; display: flex; flex-direction: column; }
.player-pdf iframe { flex: 1; width: 100%; border: none; min-height: 600px; }
.player-lesson-header { padding: 20px 24px; border-bottom: 1px solid var(--gray-200); background: var(--white); }
.player-lesson-header h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.player-controls { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--gray-200); background: var(--white); }
.player-sidebar { border-left: 1px solid var(--gray-200); background: var(--white); overflow-y: auto; display: flex; flex-direction: column; }
.player-sidebar-header { padding: 16px; border-bottom: 1px solid var(--gray-200); font-weight: 700; font-size: .9rem; }
.sidebar-section-header { padding: 12px 16px; background: var(--gray-50); font-size: .8rem; font-weight: 700; color: var(--gray-700); border-bottom: 1px solid var(--gray-100); }
.sidebar-lesson { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--gray-100); cursor: pointer; transition: background .1s; text-decoration: none; color: var(--gray-700); font-size: .83rem; }
.sidebar-lesson:hover { background: var(--gray-50); text-decoration: none; }
.sidebar-lesson.active { background: var(--blue-light); color: var(--blue); font-weight: 600; }
.sidebar-lesson.completed .lesson-check { color: var(--green); }
.lesson-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--gray-300); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .7rem; }
.lesson-check.done { background: var(--green); border-color: var(--green); color: var(--white); }
.player-progress { height: 4px; background: var(--gray-200); }
.player-progress-bar { height: 100%; background: linear-gradient(90deg, var(--blue), var(--purple)); transition: width .4s ease; }

/* ---------- Dashboard ---------- */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.dash-sidebar { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 8px 0; height: fit-content; position: sticky; top: 80px; }
.dash-nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 20px; font-size: .875rem; font-weight: 500; color: var(--gray-700); transition: background .1s; }
.dash-nav-item:hover { background: var(--gray-50); text-decoration: none; color: var(--blue); }
.dash-nav-item.active { background: var(--blue-light); color: var(--blue); font-weight: 600; }
.dash-nav-item i { width: 18px; text-align: center; color: var(--gray-400); }
.dash-nav-item.active i { color: var(--blue); }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 20px; }
.stat-card-icon { width: 44px; height: 44px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: 12px; }
.stat-card h3 { font-size: 1.75rem; font-weight: 900; }
.stat-card p  { font-size: .82rem; color: var(--gray-500); margin-top: 2px; }
.enrolled-course-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--gray-100); }
.enrolled-course-row:last-child { border-bottom: 0; }
.enrolled-thumb { width: 80px; height: 54px; object-fit: cover; border-radius: 6px; background: var(--gray-100); }
.progress-bar { height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--purple)); border-radius: 3px; }
.cert-card { background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 100%); color: var(--white); border-radius: var(--radius-lg); padding: 20px; display: flex; align-items: center; gap: 16px; }
.cert-card i { font-size: 2rem; }
.cert-card h4 { font-weight: 700; margin-bottom: 2px; }
.cert-card p { font-size: .82rem; opacity: .8; }
.cert-card a { color: rgba(255,255,255,.9); font-size: .82rem; font-weight: 600; text-decoration: underline; }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: .875rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-label .required { color: var(--red); margin-left: 2px; }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-300); border-radius: var(--radius); font-size: .9rem; background: var(--white); color: var(--gray-900); transition: border-color var(--transition); }
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.form-control:invalid { border-color: var(--red); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-hint { font-size: .78rem; color: var(--gray-500); margin-top: 4px; }
.form-error { font-size: .8rem; color: var(--red); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); }
.input-icon-wrap .form-control { padding-left: 38px; }
.password-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); cursor: pointer; }

/* ---------- Auth Pages ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy) 0%, #1344b4 100%); padding: 40px 20px; }
.auth-card { background: var(--white); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); }
.auth-logo   { text-align: center; margin-bottom: 28px; }
.auth-title  { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; text-align: center; }
.auth-sub    { text-align: center; color: var(--gray-500); font-size: .9rem; margin-bottom: 28px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--gray-400); font-size: .82rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.auth-footer { text-align: center; font-size: .875rem; color: var(--gray-500); margin-top: 20px; }

/* ---------- Certificate ---------- */
.cert-page { background: var(--white); }
.certificate { max-width: 860px; margin: 40px auto; border: 8px solid var(--navy); border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.15); }
.cert-top    { background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 100%); padding: 36px 48px; text-align: center; color: var(--white); }
.cert-top .cert-logo { font-size: 1.1rem; font-weight: 800; opacity: .85; letter-spacing: 1px; text-transform: uppercase; }
.cert-body   { padding: 48px; text-align: center; }
.cert-presented { font-size: .9rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; }
.cert-name   { font-size: 2.75rem; font-weight: 900; color: var(--navy); margin: 8px 0; font-style: italic; }
.cert-completed { font-size: .95rem; color: var(--gray-600); margin-bottom: 8px; }
.cert-course { font-size: 1.5rem; font-weight: 800; color: var(--blue); margin-bottom: 20px; }
.cert-gold-line { height: 3px; width: 80px; background: var(--gold); margin: 20px auto; border-radius: 2px; }
.cert-date-code { display: flex; justify-content: space-around; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--gray-200); }
.cert-meta-item label { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); display: block; margin-bottom: 4px; }
.cert-meta-item span  { font-weight: 700; font-size: .9rem; color: var(--gray-900); }
.cert-seal   { width: 80px; height: 80px; background: linear-gradient(135deg, var(--gold), #f59e0b); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.cert-seal i { font-size: 2rem; color: var(--white); }
@media print {
  .nav, .footer, .no-print { display: none !important; }
  .certificate { margin: 0; border-radius: 0; box-shadow: none; }
}

/* ---------- Instructor / Admin panels ---------- */
.panel-layout { display: grid; grid-template-columns: 220px 1fr; gap: 0; min-height: calc(100vh - 64px); }
.panel-sidebar { background: var(--navy); color: var(--white); padding: 24px 0; }
.panel-sidebar .panel-logo { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 12px; font-weight: 700; font-size: .95rem; }
.panel-nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 20px; font-size: .875rem; color: rgba(255,255,255,.7); transition: background .1s; text-decoration: none; }
.panel-nav-item:hover { background: rgba(255,255,255,.08); color: var(--white); text-decoration: none; }
.panel-nav-item.active { background: rgba(255,255,255,.12); color: var(--white); font-weight: 600; }
.panel-nav-item i { width: 18px; text-align: center; }
.panel-content { padding: 32px; background: var(--gray-50); overflow-y: auto; }
.panel-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.panel-header h1 { font-size: 1.5rem; font-weight: 800; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.admin-stat  { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 20px; }
.admin-stat .num { font-size: 1.75rem; font-weight: 900; }
.admin-stat .lbl { font-size: .8rem; color: var(--gray-500); }

/* ---------- Tables ---------- */
.table-wrap { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th { background: var(--gray-50); padding: 12px 16px; text-align: left; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); }
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--gray-50); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.badge-published { background: var(--green-lt);   color: #166534; }
.badge-pending   { background: var(--gold-lt);     color: #92400e; }
.badge-draft     { background: var(--gray-100);    color: var(--gray-500); }
.badge-rejected  { background: var(--red-lt);      color: #991b1b; }
.badge-active    { background: var(--blue-light);  color: #1e40af; }
.badge-student   { background: var(--gray-100);    color: var(--gray-700); }
.badge-instructor{ background: var(--purple-lt);   color: #6d28d9; }
.badge-admin     { background: var(--red-lt);      color: var(--red); }

/* ---------- Upload / File Input ---------- */
.upload-area { border: 2px dashed var(--gray-300); border-radius: var(--radius-lg); padding: 32px; text-align: center; cursor: pointer; transition: var(--transition); }
.upload-area:hover, .upload-area.dragover { border-color: var(--blue); background: var(--blue-light); }
.upload-area i { font-size: 2rem; color: var(--gray-400); margin-bottom: 12px; display: block; }
.upload-area p { font-size: .875rem; color: var(--gray-500); }
.upload-area input[type=file] { display: none; }
.file-preview { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); margin-top: 12px; font-size: .875rem; }
.file-preview i { color: var(--blue); }
.file-preview .remove-file { margin-left: auto; color: var(--red); cursor: pointer; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; gap: 4px; justify-content: center; padding: 32px 0; }
.page-link   { padding: 8px 14px; border: 1.5px solid var(--gray-200); border-radius: var(--radius); font-size: .875rem; font-weight: 500; color: var(--gray-700); transition: var(--transition); text-decoration: none; }
.page-link:hover    { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.page-link.active   { background: var(--blue); border-color: var(--blue); color: var(--white); }
.page-link.disabled { opacity: .4; pointer-events: none; }

/* ---------- Tabs ---------- */
.tabs { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 24px; gap: 0; overflow-x: auto; }
.tab  { padding: 12px 20px; font-size: .9rem; font-weight: 600; color: var(--gray-500); border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s; text-decoration: none; }
.tab:hover  { color: var(--blue); text-decoration: none; }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ---------- Rating input ---------- */
.star-rating-input { display: flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; }
.star-rating-input input { display: none; }
.star-rating-input label { font-size: 1.5rem; color: var(--gray-300); cursor: pointer; transition: color .1s; }
.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label { color: var(--gold); }

/* ---------- Misc utilities ---------- */
.hidden  { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.mb-1 { margin-bottom: 8px; }  .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.mt-1 { margin-top: 8px; }     .mt-2 { margin-top: 16px; }    .mt-3 { margin-top: 24px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-500); }
.empty-state i { font-size: 3rem; margin-bottom: 16px; display: block; color: var(--gray-300); }
.empty-state h3 { font-size: 1.1rem; color: var(--gray-700); margin-bottom: 8px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--gray-200); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; }
.divider { border: 0; border-top: 1px solid var(--gray-200); margin: 24px 0; }
.tag { display: inline-block; background: var(--gray-100); color: var(--gray-700); font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; }

/* ---------- Quiz ---------- */
.quiz-question { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.quiz-question h4 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.quiz-option { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1.5px solid var(--gray-200); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; transition: var(--transition); }
.quiz-option:hover { border-color: var(--blue); background: var(--blue-light); }
.quiz-option.selected { border-color: var(--blue); background: var(--blue-light); }
.quiz-option.correct { border-color: var(--green); background: var(--green-lt); }
.quiz-option.wrong   { border-color: var(--red);   background: var(--red-lt); }
.quiz-option input { display: none; }
.option-label { flex: 1; font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .course-detail-layout { grid-template-columns: 1fr; }
  .course-sticky-card   { position: static; }
  .outcomes-list { grid-template-columns: 1fr; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters-panel { position: static; display: none; }
  .filters-panel.open { display: block; }
  .admin-stats { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  .nav-search { display: none; }
  .nav-hamburger { display: flex; }
  .nav-actions .btn, .nav-actions .nav-link { display: none; }
  .nav-actions .nav-user-wrap { display: block; }
  .nav-actions.mobile-open { position: fixed; inset: 64px 0 0; background: var(--white); border-top: 1px solid var(--gray-200); padding: 16px; flex-direction: column; align-items: stretch; z-index: 99; }
  .nav-actions.mobile-open .btn,
  .nav-actions.mobile-open .nav-link { display: flex; padding: 14px 16px; font-size: 1rem; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; }
  .panel-layout { grid-template-columns: 1fr; }
  .panel-sidebar { padding: 12px 0; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .player-layout { grid-template-columns: 1fr; height: auto; }
  .player-sidebar { border-left: 0; border-top: 1px solid var(--gray-200); max-height: 300px; }
  .hero { padding: 56px 0 64px; }
  .hero-stats { gap: 24px; }
  .certificate { margin: 16px; }
  .cert-name { font-size: 1.75rem; }
}

@media (max-width: 480px) {
  .course-grid { grid-template-columns: 1fr; }
  .cat-grid    { grid-template-columns: repeat(2, 1fr); }
  .stat-cards  { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.75rem; }
}

/* ══════════════════════════════════════════════════════════
   Google Sign-In Button + Auth Divider
══════════════════════════════════════════════════════════ */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px; border: 1.5px solid var(--gray-300);
  border-radius: 8px; background: #fff; color: var(--gray-800);
  font-size: .9375rem; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background .15s, box-shadow .15s;
  margin-bottom: 16px;
}
.btn-google:hover { background: var(--gray-50); box-shadow: var(--shadow-sm); }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 4px 0 20px; color: var(--gray-400); font-size: .8125rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--gray-200);
}

/* ══════════════════════════════════════════════════════════
   Community — Global Shared
══════════════════════════════════════════════════════════ */
.community-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  background: var(--blue); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.community-avatar img  { width: 100%; height: 100%; object-fit: cover; }
.community-avatar span { color: #fff; font-weight: 700; font-size: .9rem; }
.community-avatar.sm   { width: 32px; height: 32px; }
.community-avatar.sm span { font-size: .75rem; }
.community-avatar.lg   { width: 52px; height: 52px; }

/* ══════════════════════════════════════════════════════════
   Community Index — Card Grid
══════════════════════════════════════════════════════════ */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.community-card {
  border: 1px solid var(--gray-200); border-radius: 12px;
  overflow: hidden; background: var(--white); display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.community-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.community-card-cover {
  height: 80px; display: flex; align-items: center; justify-content: center;
}
.community-card-cover i { font-size: 2rem; color: rgba(255,255,255,.9); }

.community-card-body { padding: 16px; flex: 1; }
.community-card-body h3 { margin-bottom: 6px; font-size: 1rem; }
.community-card-body h3 a { color: var(--gray-900); text-decoration: none; }
.community-card-body h3 a:hover { color: var(--blue); }
.community-card-body p { font-size: .8125rem; color: var(--gray-600); line-height: 1.5; margin-bottom: 10px; }

.community-card-meta {
  display: flex; gap: 14px; font-size: .78rem; color: var(--gray-500);
}
.community-card-meta i { margin-right: 4px; }

.community-card-foot {
  padding: 12px 16px; border-top: 1px solid var(--gray-100);
  display: flex; gap: 8px; align-items: center;
}

/* ══════════════════════════════════════════════════════════
   Community Hero Banner (view.php)
══════════════════════════════════════════════════════════ */
.community-hero {
  padding: 48px 0;
}
.community-hero-inner {
  display: flex; align-items: flex-start; gap: 24px;
}
.community-hero-icon {
  width: 72px; height: 72px; border-radius: 16px;
  background: rgba(255,255,255,.2); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.community-hero-icon i { font-size: 2rem; color: #fff; }
.community-hero h1 { color: #fff; margin-bottom: 6px; font-size: 1.75rem; }
.community-hero p { color: rgba(255,255,255,.8); max-width: 560px; font-size: .9375rem; }
.community-hero-meta {
  display: flex; gap: 20px; margin-top: 10px; color: rgba(255,255,255,.75); font-size: .875rem;
}
.community-hero-meta i { margin-right: 6px; }
.community-hero-actions { margin-left: auto; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   Community Layout (view + post)
══════════════════════════════════════════════════════════ */
.community-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}
.community-sidebar { position: sticky; top: 80px; }
.community-sidebar-stats {
  display: flex; gap: 24px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}
.community-sidebar-stats div { display: flex; flex-direction: column; }
.community-sidebar-stats strong { font-size: 1.25rem; color: var(--gray-900); }
.community-sidebar-stats span  { font-size: .75rem; color: var(--gray-500); margin-top: 2px; }

.community-member-stack { display: flex; flex-wrap: wrap; gap: 6px; }

/* ══════════════════════════════════════════════════════════
   Community Post Cards
══════════════════════════════════════════════════════════ */
.community-post-card { transition: box-shadow .15s; }
.community-post-card:hover { box-shadow: var(--shadow-md); }

.community-post-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.community-post-header strong { display: block; font-size: .9375rem; }
.community-post-header .text-muted { font-size: .78rem; }

.community-post-title { margin-bottom: 8px; font-size: 1.0625rem; }
.community-post-title a { color: var(--gray-900); text-decoration: none; }
.community-post-title a:hover { color: var(--blue); }

.community-post-excerpt { font-size: .875rem; color: var(--gray-600); margin-bottom: 14px; line-height: 1.6; }
.community-post-body    { font-size: .9375rem; color: var(--gray-700); line-height: 1.75; }

.community-post-foot {
  display: flex; align-items: center; gap: 20px;
}

.community-like-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  color: var(--gray-500); font-size: .875rem; padding: 0;
  transition: color .15s;
}
.community-like-btn i { font-size: 1rem; transition: transform .15s; }
.community-like-btn:hover { color: #e11d48; }
.community-like-btn.liked { color: #e11d48; }
.community-like-btn.liked i { transform: scale(1.15); }

.community-comment-link {
  font-size: .875rem; color: var(--gray-500); text-decoration: none; display: flex; align-items: center; gap: 6px;
}
.community-comment-link:hover { color: var(--blue); }

/* ══════════════════════════════════════════════════════════
   Community Comments
══════════════════════════════════════════════════════════ */
.community-comment {
  display: flex; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.community-comment:last-child { border-bottom: 0; }
.community-comment-body { flex: 1; }
.community-comment-meta {
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-size: .8125rem;
}
.community-comment-meta strong { color: var(--gray-900); }
.community-comment-meta span   { color: var(--gray-400); font-size: .75rem; }
.community-comment p { font-size: .875rem; color: var(--gray-700); line-height: 1.6; margin: 0; }

/* ══════════════════════════════════════════════════════════
   Create-post box
══════════════════════════════════════════════════════════ */
.community-create-post textarea { resize: vertical; }

/* ══════════════════════════════════════════════════════════
   Breadcrumb Nav
══════════════════════════════════════════════════════════ */
.breadcrumb-nav {
  display: flex; align-items: center; gap: 8px;
  font-size: .8125rem; color: var(--gray-500);
}
.breadcrumb-nav a { color: var(--gray-500); text-decoration: none; }
.breadcrumb-nav a:hover { color: var(--blue); }
.breadcrumb-nav i { font-size: .625rem; }

/* ══════════════════════════════════════════════════════════
   Dashboard Community Section
══════════════════════════════════════════════════════════ */
.dash-community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.dash-community-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border: 1px solid var(--gray-200); border-radius: 10px;
  text-decoration: none; color: var(--gray-800);
  transition: background .15s, box-shadow .15s;
}
.dash-community-card:hover { background: var(--gray-50); box-shadow: var(--shadow-sm); }
.dash-community-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dash-community-icon i { font-size: 1.1rem; color: #fff; }
.dash-community-card strong { display: block; font-size: .875rem; }
.dash-community-card span   { font-size: .75rem; color: var(--gray-400); }

/* ══════════════════════════════════════════════════════════
   Responsive — Community
══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .community-layout { grid-template-columns: 1fr 240px; }
}
@media (max-width: 768px) {
  .community-layout       { grid-template-columns: 1fr; }
  .community-hero-inner   { flex-wrap: wrap; }
  .community-hero-actions { margin-left: 0; }
  .community-grid { grid-template-columns: 1fr; }
  .dash-community-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .dash-community-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   Footer — Udemy-faithful v2
══════════════════════════════════════════════════════════ */
.footer {
  color: rgba(255,255,255,.72);
  font-size: .875rem;
}

/* ① Trust banner */
.footer-trust-bar {
  background: #0d1b3e;
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0;
}
.footer-trust-bar-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-trust-bar-inner p { margin: 0; font-size: .875rem; color: rgba(255,255,255,.75); }
.footer-trust-bar-inner strong { color: #fff; }
.footer-trust-bar-inner a { color: inherit; text-decoration: none; }
.footer-trust-logos {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.footer-trust-logos span {
  font-size: .75rem; font-weight: 600; color: rgba(255,255,255,.38);
  text-transform: uppercase; letter-spacing: .06em;
}

/* ② Main body */
.footer-body { background: #0f2050; padding: 48px 0 36px; }

/* Explore heading */
.footer-explore-hdg {
  font-size: 1rem; font-weight: 700; color: #fff;
  margin: 0 0 24px; line-height: 1.3;
}

/* Topic grid — 4 columns × 2 rows */
.footer-topics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
  margin-bottom: 40px;
}
.footer-topic { display: flex; flex-direction: column; }
.footer-topic-hdg {
  display: block;
  font-size: .875rem; font-weight: 700; color: #fff;
  margin-bottom: 12px; line-height: 1.3;
}
.footer-topic a {
  display: block;
  font-size: .8125rem; color: rgba(255,255,255,.62);
  text-decoration: none; margin-bottom: 8px; line-height: 1.4;
  transition: color .12s;
}
.footer-topic a:last-child { color: rgba(255,255,255,.38); font-size: .75rem; margin-top: 4px; }
.footer-topic a:hover { color: #7ec8f8; text-decoration: underline; }

/* Divider */
.footer-divider { height: 1px; background: rgba(255,255,255,.08); margin-bottom: 32px; }

/* Navigation columns — 4 equal cols */
.footer-nav-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 24px;
}
.footer-nav-col { display: flex; flex-direction: column; }
.footer-nav-hdg {
  display: block;
  font-size: .875rem; font-weight: 700; color: #fff;
  margin-bottom: 14px; line-height: 1.3;
}
.footer-nav-col a {
  display: block;
  font-size: .8125rem; color: rgba(255,255,255,.62);
  text-decoration: none; margin-bottom: 9px; line-height: 1.4;
  transition: color .12s;
}
.footer-nav-col a:hover { color: #7ec8f8; text-decoration: underline; }

/* ③ Bottom bar — logo+copyright LEFT | cookie CENTER | language RIGHT */
.footer-base { background: #081228; border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; }
.footer-base-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.footer-base-left { display: flex; align-items: center; gap: 10px; }
.footer-base-logo { display: inline-block; text-decoration: none; flex-shrink: 0; }
.footer-base-logo-img { height: 22px; width: auto; opacity: .5; }
.footer-copyright { font-size: .75rem; color: rgba(255,255,255,.3); white-space: nowrap; }

.footer-cookie-link {
  font-size: .8125rem; color: rgba(255,255,255,.55);
  text-decoration: none; justify-self: center; text-align: center;
  transition: color .12s;
}
.footer-cookie-link:hover { color: #fff; text-decoration: underline; }

.footer-lang-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.72);
  font-size: .8125rem; font-weight: 500;
  border-radius: 4px; cursor: pointer;
  justify-self: end;
  transition: background .15s, border-color .15s;
}
.footer-lang-btn:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.55); }

/* Responsive */
@media (max-width: 1024px) {
  .footer-topics-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-nav-cols    { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .footer-trust-bar-inner { flex-direction: column; align-items: flex-start; }
  .footer-base-inner { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .footer-base-left  { grid-column: 1 / -1; }
  .footer-cookie-link { justify-self: start; }
  .footer-lang-btn   { justify-self: end; }
}
@media (max-width: 480px) {
  .footer-topics-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-nav-cols    { grid-template-columns: 1fr; }
  .footer-base-inner  { grid-template-columns: 1fr; }
  .footer-base-left   { grid-column: auto; }
  .footer-cookie-link { justify-self: start; }
  .footer-lang-btn    { justify-self: start; }
}

/* ══════════════════════════════════════════════════════════
   Cart
══════════════════════════════════════════════════════════ */
/* Nav cart button */
.nav-cart-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  color: var(--gray-700);
  text-decoration: none;
  font-size: 1rem;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.nav-cart-btn:hover { background: var(--gray-100); color: var(--gray-900); text-decoration: none; }

.cart-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px;
  background: var(--blue); color: #fff;
  font-size: .65rem; font-weight: 700;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--white);
}

/* Cart page layout */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
.cart-items { border-top: 2px solid var(--gray-900); }
.cart-item {
  display: flex; gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-200);
  align-items: flex-start;
}
.cart-item-thumb {
  width: 120px; height: 70px;
  border-radius: 6px; overflow: hidden;
  flex-shrink: 0; background: var(--gray-100);
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400); font-size: 1.5rem;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title {
  font-size: .95rem; font-weight: 600;
  color: var(--gray-900); text-decoration: none;
  display: block; margin-bottom: 4px; line-height: 1.4;
}
.cart-item-title:hover { color: var(--blue); }
.cart-item-meta { font-size: .8rem; color: var(--gray-500); margin-bottom: 8px; }
.cart-remove-btn {
  background: none; border: none;
  color: #a435f0; font-size: .8rem; cursor: pointer;
  padding: 0; display: flex; align-items: center; gap: 4px;
  transition: color .15s;
}
.cart-remove-btn:hover { color: var(--red); }
.cart-item-price { font-size: 1rem; font-weight: 700; color: var(--gray-900); white-space: nowrap; flex-shrink: 0; }

/* Cart summary card */
.cart-summary {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky; top: 80px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.cart-summary-label { font-size: .75rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.cart-summary-total { font-size: 2.25rem; font-weight: 800; color: var(--gray-900); margin-bottom: 20px; }

.cart-guarantees { margin-top: 20px; border-top: 1px solid var(--gray-100); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.cart-guarantee-item { font-size: .8rem; color: var(--gray-600); display: flex; align-items: center; gap: 8px; }
.cart-guarantee-item i { color: var(--gray-400); width: 14px; text-align: center; }

/* Add to Cart / Buy Now buttons on course page */
.btn-buy-now {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px 20px;
  background: transparent;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-800);
  font-size: .9rem; font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.btn-buy-now:hover { border-color: var(--gray-900); background: var(--gray-50); color: var(--gray-900); text-decoration: none; }

/* Cart toast notification */
.cart-toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #1c1d1f; color: #fff;
  padding: 14px 20px;
  border-radius: 6px;
  font-size: .875rem;
  display: flex; align-items: center; gap: 12px;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  transform: translateY(80px); opacity: 0;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .25s;
  pointer-events: none;
}
.cart-toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cart-toast a { color: #c084fc; font-weight: 600; text-decoration: none; white-space: nowrap; }
.cart-toast a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
