/* Course Platform — Main Stylesheet */
:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #eef2ff;
  --accent: #f59e0b;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --text: #1e293b;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --border: #e2e8f0;
  --green: #16a34a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);
  --maxw: 1180px;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 16px;
}
.logo { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.5px; }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; color: var(--text); }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #1e293b; box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }
.btn-block { width: 100%; text-align: center; }
.hamburger { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 600px at 80% -10%, #312e81 0%, transparent 60%),
              radial-gradient(900px 500px at 10% 110%, #1e1b4b 0%, transparent 55%),
              linear-gradient(160deg, #0f172a 0%, #1e1b4b 60%, #0f172a 100%);
  color: #fff; padding: 96px 0 110px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 26px 26px; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero-badge {
  display: inline-block; background: rgba(245, 158, 11, 0.15); color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.4); padding: 6px 16px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { font-size: 3rem; line-height: 1.15; letter-spacing: -1.5px; margin-bottom: 18px; font-weight: 800; }
.hero h1 .hl { color: var(--accent); }
.hero p { font-size: 1.12rem; color: #cbd5e1; max-width: 620px; margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; margin-top: 52px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 1.7rem; font-weight: 800; }
.hero-stats .stat span { color: #94a3b8; font-size: 0.88rem; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: 2rem; letter-spacing: -0.8px; margin-bottom: 10px; }
.section-head p { color: var(--muted); }
.section-head.left { text-align: left; margin: 0 0 32px; }

/* ---------- Course cards ---------- */
.courses-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px;
}
.course-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex; flex-direction: column;
}
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-thumb { height: 168px; position: relative; display: flex; align-items: center; justify-content: center; }
.card-thumb .thumb-icon { font-size: 3rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3)); }
.card-badge {
  position: absolute; top: 12px; left: 12px; background: var(--accent); color: #1e293b;
  font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--primary); margin-bottom: 8px; }
.card-title { font-size: 1.02rem; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.card-title a:hover { color: var(--primary); }
.card-instructor { font-size: 0.86rem; color: var(--muted); margin-bottom: 10px; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; color: var(--muted); margin-bottom: 14px; }
.stars { color: var(--accent); font-weight: 700; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.price { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.price small { font-size: 0.82rem; font-weight: 500; color: var(--muted); text-decoration: line-through; margin-left: 6px; }

/* Gradient thumbs */
.grad-1 { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.grad-2 { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.grad-3 { background: linear-gradient(135deg, #16a34a, #0d9488); }
.grad-4 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.grad-5 { background: linear-gradient(135deg, #dc2626, #b45309); }
.grad-6 { background: linear-gradient(135deg, #db2777, #7c3aed); }
.grad-7 { background: linear-gradient(135deg, #1e293b, #475569); }
.grad-8 { background: linear-gradient(135deg, #0891b2, #2563eb); }
.grad-9 { background: linear-gradient(135deg, #65a30d, #15803d); }
.grad-10 { background: linear-gradient(135deg, #c026d3, #4f46e5); }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.cat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.cat-card .cat-icon { font-size: 2.2rem; margin-bottom: 10px; }
.cat-card h3 { font-size: 1rem; margin-bottom: 4px; }
.cat-card p { font-size: 0.84rem; color: var(--muted); }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 26px; }
.step {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 28px; box-shadow: var(--shadow); position: relative;
}
.step-num {
  width: 48px; height: 48px; border-radius: 50%; background: var(--primary-light);
  color: var(--primary); font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; font-size: 1.1rem; }
.step p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Testimonials ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; }
.testi {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow);
}
.testi .stars { margin-bottom: 12px; letter-spacing: 2px; }
.testi p { font-size: 0.95rem; color: var(--text); margin-bottom: 18px; font-style: italic; }
.testi-who { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 46px; height: 46px; border-radius: 50%; color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.testi-who b { display: block; font-size: 0.92rem; }
.testi-who span { font-size: 0.82rem; color: var(--muted); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  border-radius: 20px; color: #fff; padding: 56px 48px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-banner h2 { font-size: 1.9rem; margin-bottom: 10px; letter-spacing: -0.5px; }
.cta-banner p { color: #e0e7ff; margin-bottom: 26px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #cbd5e1; padding: 64px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid ul a { font-size: 0.9rem; color: #94a3b8; }
.footer-grid ul a:hover { color: #fff; }
.footer-brand .logo { color: #fff; margin-bottom: 12px; display: inline-block; }
.footer-brand p { font-size: 0.9rem; color: #94a3b8; max-width: 300px; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 24px; display: flex; justify-content: space-between; font-size: 0.84rem; color: #64748b; flex-wrap: wrap; gap: 10px; }

/* ---------- Filters / search ---------- */
.toolbar {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 30px;
}
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box input {
  width: 100%; padding: 12px 16px 12px 42px; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 0.95rem; outline: none; transition: border 0.15s;
}
.search-box input:focus { border-color: var(--primary); }
.search-box .sicon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--border);
  background: #fff; font-size: 0.86rem; font-weight: 600; cursor: pointer; color: var(--muted);
  transition: all 0.15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .big { font-size: 3rem; margin-bottom: 12px; }

/* ---------- Course detail ---------- */
.detail-hero { background: var(--dark); color: #fff; padding: 64px 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 380px; gap: 44px; align-items: start; }
.detail-hero h1 { font-size: 2.1rem; letter-spacing: -0.8px; line-height: 1.25; margin: 12px 0; }
.detail-hero .tagline { color: #cbd5e1; font-size: 1.05rem; margin-bottom: 18px; }
.detail-meta { display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.9rem; color: #cbd5e1; }
.detail-meta b { color: #fff; }
.enroll-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: hidden; position: sticky; top: 96px; color: var(--text);
}
.enroll-thumb { height: 190px; display: flex; align-items: center; justify-content: center; }
.enroll-thumb .thumb-icon { font-size: 3.4rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3)); }
.enroll-body { padding: 26px; }
.enroll-price { font-size: 1.9rem; font-weight: 800; margin-bottom: 4px; }
.enroll-price small { font-size: 1rem; color: var(--muted); text-decoration: line-through; font-weight: 500; margin-left: 8px; }
.enroll-save { color: var(--green); font-weight: 700; font-size: 0.9rem; margin-bottom: 18px; }
.enroll-includes { margin-top: 20px; font-size: 0.88rem; color: var(--muted); }
.enroll-includes li { list-style: none; margin-bottom: 8px; }
.enroll-includes li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.detail-body { padding: 56px 0 84px; }
.detail-body h2 { font-size: 1.4rem; margin: 34px 0 16px; }
.detail-body h2:first-child { margin-top: 0; }
.outcome-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.outcome-list li { list-style: none; font-size: 0.94rem; }
.outcome-list li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.curriculum { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cur-section { border-bottom: 1px solid var(--border); }
.cur-section:last-child { border-bottom: none; }
.cur-head {
  padding: 16px 20px; background: var(--bg-soft); font-weight: 700; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; font-size: 0.96rem;
}
.cur-head:hover { background: #eef2ff; }
.cur-items { display: none; padding: 6px 0; }
.cur-section.open .cur-items { display: block; }
.cur-section.open .cur-arrow { transform: rotate(180deg); }
.cur-arrow { transition: transform 0.2s; color: var(--muted); }
.cur-items li { list-style: none; padding: 10px 20px 10px 44px; font-size: 0.9rem; color: var(--muted); position: relative; }
.cur-items li::before { content: "▶"; position: absolute; left: 20px; font-size: 0.65rem; color: var(--primary); top: 14px; }
.instructor-card {
  display: flex; gap: 18px; align-items: flex-start; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-top: 8px;
}
.instructor-avatar {
  width: 64px; height: 64px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.instructor-card p { font-size: 0.92rem; color: var(--muted); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; border-radius: 18px; max-width: 520px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 34px 32px; position: relative;
  animation: pop 0.22s ease;
}
@keyframes pop { from { transform: scale(0.94) translateY(10px); opacity: 0; } }
.modal-close {
  position: absolute; top: 14px; right: 16px; background: none; border: none;
  font-size: 1.5rem; cursor: pointer; color: var(--muted);
}
.modal h3 { font-size: 1.25rem; margin-bottom: 6px; }
.modal .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }
.pay-step { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.pay-step .step-label { font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--primary); margin-bottom: 6px; }
.pay-account {
  display: flex; justify-content: space-between; align-items: center; background: #fff;
  border: 1.5px dashed var(--border); border-radius: 8px; padding: 10px 14px; margin-top: 8px; font-size: 0.92rem;
}
.copy-btn { background: var(--primary-light); color: var(--primary); border: none; border-radius: 8px; padding: 6px 12px; font-weight: 700; cursor: pointer; font-size: 0.8rem; }
.copy-btn:hover { background: var(--primary); color: #fff; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 0.94rem; font-family: inherit; outline: none; transition: border 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { min-height: 110px; resize: vertical; }
.form-hint { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }
.success-box { text-align: center; padding: 20px 0 6px; }
.success-box .tick { font-size: 3.4rem; margin-bottom: 10px; }

/* ---------- Teach page ---------- */
.teach-hero {
  background: linear-gradient(160deg, #0f172a 0%, #312e81 70%, #4c1d95 100%);
  color: #fff; padding: 84px 0; text-align: center;
}
.teach-hero h1 { font-size: 2.6rem; letter-spacing: -1px; margin-bottom: 14px; }
.teach-hero p { color: #cbd5e1; max-width: 620px; margin: 0 auto; font-size: 1.08rem; }
.payout-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin: 40px 0; }
.payout-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.payout-card .picon { font-size: 2rem; margin-bottom: 12px; }
.payout-card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.payout-card p { font-size: 0.9rem; color: var(--muted); }
.teach-form-wrap { max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 40px; box-shadow: var(--shadow-lg); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Misc ---------- */
.page-hero { background: var(--bg-soft); padding: 64px 0 48px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: 2.2rem; letter-spacing: -0.8px; margin-bottom: 8px; }
.page-hero p { color: var(--muted); }
.badge-free { background: var(--green); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.center { text-align: center; }
.mt-2 { margin-top: 12px; } .mt-4 { margin-top: 28px; }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--dark); color: #fff; padding: 13px 24px; border-radius: 12px;
  font-size: 0.9rem; font-weight: 600; z-index: 300; transition: transform 0.25s ease;
  box-shadow: var(--shadow-lg); max-width: 90vw; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .detail-grid { grid-template-columns: 1fr; }
  .enroll-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 18px 24px 24px;
    border-bottom: 1px solid var(--border); gap: 16px; align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .hero h1 { font-size: 2.1rem; }
  .hero { padding: 64px 0 76px; }
  .section { padding: 60px 0; }
  .outcome-list { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .teach-form-wrap { padding: 28px 22px; }
  .cta-banner { padding: 40px 26px; }
  .detail-hero h1 { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
