:root {
  --navy-900: #071426;
  --navy-800: #0b2545;
  --navy-700: #123059;
  --navy-600: #163b6d;
  --gold: #c9a227;
  --gold-light: #e4c65a;
  --ink: #0f1b2d;
  --gray-50: #f6f8fb;
  --gray-100: #eceff4;
  --gray-300: #c7d0dd;
  --gray-500: #8493a8;
  --gray-700: #4b5a70;
  --white: #ffffff;
  --success: #1e8e5a;
  --radius: 10px;
  --shadow-sm: 0 2px 8px rgba(7, 20, 38, 0.08);
  --shadow-md: 0 8px 28px rgba(7, 20, 38, 0.14);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--gray-50);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Topbar ---------- */
.topbar {
  background: var(--navy-900);
  color: var(--gray-300);
  font-size: 0.82rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 34px;
}
.topbar-links { display: flex; gap: 18px; }
.topbar-links a:hover { color: var(--gold-light); }

/* ---------- Header / Nav ---------- */
.header {
  background: var(--navy-800);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.3px;
}
.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 1.5px;
  color: var(--gray-300);
  text-transform: uppercase;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links a {
  color: var(--gray-100);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

.nav-actions { display: flex; gap: 12px; align-items: center; }
.actions-group { display: flex; gap: 12px; align-items: center; }
#user-name-label { color: var(--gray-100); font-size: 0.88rem; font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  background: transparent;
  transition: 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--navy-900); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline { border-color: rgba(255,255,255,0.35); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.08); }
.btn-ghost { color: var(--navy-700); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
}
.burger span { width: 24px; height: 2px; background: var(--white); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(201,162,39,0.18), transparent 45%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: var(--white);
  padding: 84px 0 96px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--gold);
}
.hero h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  margin: 0 0 18px;
  font-weight: 800;
}
.hero h1 span { color: var(--gold-light); }
.hero p.lead {
  color: var(--gray-300);
  font-size: 1.08rem;
  max-width: 560px;
  margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}
.hero-stats .stat strong {
  display: block;
  font-size: 1.7rem;
  color: var(--gold-light);
  font-weight: 800;
}
.hero-stats .stat span {
  font-size: 0.82rem;
  color: var(--gray-300);
}

.hero-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 28px;
}
.hero-card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: var(--white);
}
.hero-card p { color: var(--gray-300); font-size: 0.88rem; margin: 0 0 18px; }
.mini-course {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mini-course:first-of-type { border-top: none; }
.mini-course .name { font-size: 0.88rem; font-weight: 600; color: var(--white); }
.mini-course .tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold-light);
  background: rgba(201,162,39,0.15);
  padding: 3px 8px;
  border-radius: 20px;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--white); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  gap: 20px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 1.9rem;
  margin: 0 0 8px;
  color: var(--navy-800);
  font-weight: 800;
}
.section-head p { color: var(--gray-700); margin: 0; max-width: 560px; }
.section-tag {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ---------- Category grid (home) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.cat-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: 0.2s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.cat-card .icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--navy-800);
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.cat-card h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--navy-800); }
.cat-card p { margin: 0 0 14px; color: var(--gray-700); font-size: 0.88rem; }
.cat-card .count { font-size: 0.8rem; color: var(--gold); font-weight: 700; }

/* ---------- Course cards ---------- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.course-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: 0.2s;
}
.course-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.course-banner {
  height: 96px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}
.course-banner .badge {
  background: rgba(255,255,255,0.14);
  color: var(--gold-light);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
}
.course-banner .glyph { color: rgba(255,255,255,0.5); font-size: 1.6rem; font-weight: 800; }
.course-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-body h3 { margin: 0; font-size: 1.02rem; color: var(--navy-800); line-height: 1.35; }
.course-body p.desc { margin: 0; color: var(--gray-700); font-size: 0.86rem; flex: 1; }
.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.78rem;
  color: var(--gray-700);
}
.course-meta span { display: flex; align-items: center; gap: 5px; }
.course-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--gray-100);
  color: var(--navy-700);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 20px;
}
.course-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
}
.course-footer .lvl { font-size: 0.78rem; color: var(--gray-500); }

/* ---------- Filters (catalog page) ---------- */
.filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.filter-btn {
  background: var(--white);
  border: 1px solid var(--gray-300);
  color: var(--navy-700);
  padding: 9px 18px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: 0.2s;
}
.filter-btn:hover { border-color: var(--gold); color: var(--navy-900); }
.filter-btn.active { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }

.search-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.search-row input {
  flex: 1;
  min-width: 220px;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.92rem;
}
.search-row input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

.results-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

/* ---------- Why us / features ---------- */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feat-item { display: flex; gap: 14px; }
.feat-item .num {
  min-width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}
.feat-item h4 { margin: 4px 0 6px; color: var(--navy-800); font-size: 1rem; }
.feat-item p { margin: 0; color: var(--gray-700); font-size: 0.86rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  border-radius: 16px;
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h3 { margin: 0 0 8px; font-size: 1.5rem; }
.cta-band p { margin: 0; color: var(--gray-300); max-width: 480px; }

/* ---------- Login / Register modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(7,20,38,0.6);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: 40px 20px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  width: 100%;
  max-width: 420px;
  border-radius: 14px;
  padding: 34px 30px;
  position: relative;
  box-shadow: var(--shadow-md);
  margin: auto;
}
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 1.3rem; color: var(--gray-500);
}
.modal h2 { margin: 0 0 4px; color: var(--navy-800); font-size: 1.4rem; }
.modal p.sub { margin: 0 0 22px; color: var(--gray-700); font-size: 0.88rem; }
.tabs { display: flex; margin-bottom: 22px; border-bottom: 1px solid var(--gray-100); }
.tab-btn {
  flex: 1;
  background: none; border: none;
  padding: 10px 0;
  font-weight: 600;
  color: var(--gray-500);
  border-bottom: 2px solid transparent;
}
.tab-btn.active { color: var(--navy-800); border-color: var(--gold); }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--navy-700); margin-bottom: 6px;
}
.form-group input, .form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.9rem;
}
.form-group input:focus, .form-group select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.form-note { font-size: 0.78rem; color: var(--gray-500); margin-top: 14px; text-align: center; }
.pane { display: none; }
.pane.active { display: block; }
.form-error {
  display: none;
  background: #fdecea;
  color: #c0392b;
  font-size: 0.82rem;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.form-success {
  display: none;
  background: #e8f5ee;
  color: var(--success);
  font-size: 0.82rem;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--navy-900);
  color: var(--white);
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 0.88rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 2000;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: #c0392b; }
.toast-info { background: var(--navy-700); }

/* ---------- Course detail modal ---------- */
.detail-modal { max-width: 560px; text-align: left; }
.detail-modal .head {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  margin: -34px -30px 22px;
  padding: 26px 30px;
  border-radius: 14px 14px 0 0;
  color: var(--white);
}
.detail-modal .head .badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: var(--gold-light);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px; margin-bottom: 10px;
}
.detail-modal .head h2 { color: var(--white); margin: 0; }
.detail-modal .modal-close { color: rgba(255,255,255,0.85); z-index: 2; }
.detail-modal .modal-close:hover { color: var(--gold-light); }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  background: var(--gray-50);
  border-radius: 10px;
}
.detail-grid div span { display: block; font-size: 0.72rem; color: var(--gray-500); text-transform: uppercase; }
.detail-grid div strong { font-size: 0.9rem; color: var(--navy-800); }

.detail-extra { margin: 18px 0; display: none; }
.detail-extra h4 { margin: 0 0 10px; font-size: 0.92rem; color: var(--navy-800); }
.detail-extra ul { padding-left: 20px; list-style: disc; }
.detail-extra li { font-size: 0.86rem; color: var(--gray-700); margin-bottom: 6px; }
.detail-extra p { font-size: 0.86rem; color: var(--gray-700); margin: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: var(--gray-300); padding: 56px 0 24px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-brand p { font-size: 0.88rem; color: var(--gray-500); margin: 12px 0 16px; max-width: 280px; }
.footer h4 { color: var(--white); font-size: 0.9rem; margin: 0 0 16px; }
.footer ul li { margin-bottom: 10px; font-size: 0.86rem; }
.footer ul li a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--gray-500);
}
.social { display: flex; gap: 10px; }
.social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  color: var(--gray-300);
}
.social a:hover { background: var(--gold); color: var(--navy-900); }

/* ---------- Breadcrumb / page header ---------- */
.page-header {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  padding: 48px 0;
}
.page-header h1 { margin: 0 0 8px; font-size: 2rem; }
.page-header p { margin: 0; color: var(--gray-300); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links, .nav-actions .btn-outline { display: none; }
  .burger { display: flex; }
  .hero h1 { font-size: 2rem; }
  .cta-band { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--navy-800);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    box-shadow: var(--shadow-md);
  }
}
