:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f5f7fb;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #d1d5db;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; padding-top: 2rem; padding-bottom: 2rem; }
.container { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 1rem; }
a { color: var(--primary); }

.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.nav { display: flex; align-items: center; gap: 1rem; }
.nav a { text-decoration: none; }

.site-footer { padding: 1rem 0; text-align: center; color: var(--muted); font-size: .9rem; }

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.auth-card { max-width: 440px; margin: 0 auto; }
h1 { margin-top: 0; font-size: 1.6rem; }

label { display: block; margin: 1rem 0 .3rem; font-weight: 600; font-size: .95rem; }
input[type=text], input[type=email], input[type=tel], input[type=password] {
    width: 100%;
    padding: .65rem .75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}
input:focus { outline: 2px solid var(--primary); border-color: transparent; }

.btn {
    display: inline-block;
    margin-top: 1.25rem;
    padding: .7rem 1.2rem;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { background: var(--primary-dark); }
.btn-small { margin: 0; padding: .4rem .8rem; font-size: .9rem; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: #eff6ff; }

.link-button { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }
.inline-form { display: inline; margin: 0; }

.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-error { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }

.muted { color: var(--muted); }
.hero { text-align: center; padding: 3rem 0; }
.hero h1 { font-size: 2.2rem; }
.hero .btn { margin: 1rem .25rem 0; }

/* ---------- forms: select, textarea, file ---------- */
select, textarea, input[type=file] {
    width: 100%;
    padding: .65rem .75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    background: #fff;
}
textarea { resize: vertical; }
select:focus, textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.small { font-size: .85rem; }
.lead { font-size: 1.1rem; }
.section-gap { margin-top: 1.25rem; }

/* ---------- admin ---------- */
.subnav { display: flex; gap: 1rem; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.subnav a { text-decoration: none; padding: .25rem 0; color: var(--muted); }
.subnav a.active { color: var(--primary); font-weight: 600; border-bottom: 2px solid var(--primary); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; margin: 1rem 0; }
.stat { background: var(--bg); border-radius: var(--radius); padding: 1rem; text-align: center; }
.stat strong { display: block; font-size: 1.6rem; }
.stat span { color: var(--muted); font-size: .9rem; }
.inline-add .row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline-add .row input[type=text] { flex: 1; min-width: 180px; }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table .actions { white-space: nowrap; }
.table .actions > * { margin-right: .6rem; }
.danger { color: #b91c1c; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; background: #e5e7eb; color: #374151; }
.badge-published { background: #dcfce7; color: #166534; }
.badge-draft { background: #fef9c3; color: #854d0e; }
.badge-archived { background: #e5e7eb; color: #374151; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.filters a { padding: .25rem .75rem; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; font-size: .9rem; color: var(--text); background: #fff; }
.filters a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.thumb-preview { max-width: 220px; border-radius: 8px; border: 1px solid var(--border); }

/* ---------- catalogue ---------- */
.search-bar { display: flex; gap: .5rem; margin-bottom: .5rem; }
.search-bar input[type=text] { flex: 1; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.course-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; }
.course-card:hover { border-color: var(--primary); }
.course-card img, .thumb-placeholder { width: 100%; height: 150px; object-fit: cover; }
.thumb-placeholder { display: flex; align-items: center; justify-content: center; background: #dbeafe; color: var(--primary-dark); font-size: 2.5rem; font-weight: 700; }
.course-card-body { padding: 1rem; }
.course-card-body h3 { margin: .25rem 0 .5rem; font-size: 1.05rem; }
.course-card-body p { margin: .35rem 0; }
.course-meta { display: flex; justify-content: space-between; align-items: center; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1.5rem; }

/* ---------- course page ---------- */
.enroll-box { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.enroll-box .btn { margin-top: 0; }
.price { font-size: 1.4rem; }
.course-banner { max-width: 100%; border-radius: var(--radius); margin-top: 1.25rem; }
.module { margin-top: 1rem; }
.module h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.lesson-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 8px; }
.lesson-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .8rem; border-bottom: 1px solid var(--border); }
.lesson-list li:last-child { border-bottom: 0; }
.review { padding: .75rem 0; border-bottom: 1px solid var(--border); }
.review p { margin: .35rem 0 0; }

/* ---------- progress bar ---------- */
.progress { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin-top: .75rem; }
.progress > span { display: block; height: 100%; background: var(--primary); }

/* ---------- curriculum manager ---------- */
.module-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.module-head h3 { margin: 0; }
.actions { display: inline-flex; align-items: center; gap: .6rem; }
.lesson-list .actions { white-space: nowrap; }

/* ---------- lesson player ---------- */
.lesson-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 800px) { .lesson-layout { grid-template-columns: 1fr; } }
.lesson-sidebar h4 { margin: 1rem 0 .35rem; font-size: .95rem; }
.lesson-sidebar ul { list-style: none; margin: 0; padding: 0; }
.lesson-sidebar li a, .lesson-sidebar li > span { display: block; padding: .35rem .5rem; border-radius: 6px; text-decoration: none; font-size: .92rem; }
.lesson-sidebar li.current a { background: #eff6ff; font-weight: 600; }
.lesson-sidebar .mark { display: inline-block; width: 1.2rem; }
.video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius); background: #000; margin: 1rem 0; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-text { margin: 1rem 0; }
.complete-form { margin-top: 1.5rem; display: flex; align-items: center; gap: .75rem; }
.complete-form .btn { margin-top: 0; }
.lesson-nav { display: flex; justify-content: space-between; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }

.course-progress { max-width: 420px; margin-top: 1rem; }
.course-progress .progress { margin-top: 0; }
.course-progress p { margin: .4rem 0 0; }

/* ---------- quizzes ---------- */
.question-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; background: #fff; }
.question-card legend { font-weight: 600; padding: 0 .4rem; }
.question-card .check { margin: .4rem 0; }
.option-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.option-list li { padding: .3rem .5rem; border-radius: 6px; }
.option-list li.correct { background: #dcfce7; }
.option-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.option-row input[type=text] { flex: 1; margin: 0; }
.option-row input[type=checkbox] { width: auto; margin: 0; }
.facts { list-style: none; padding: 0; margin: 1rem 0; }
.facts li { padding: .25rem 0; }
.timer { font-variant-numeric: tabular-nums; background: #fef9c3; color: #854d0e; padding: .35rem .75rem; border-radius: 999px; }
.score { font-size: 3rem; font-weight: 700; margin: .5rem 0; }
.score-pass { color: #166534; }
.score-fail { color: #b91c1c; }
[hidden] { display: none !important; }

/* ---------- reviews / alerts ---------- */
.review-form { background: var(--bg); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.alert-success { background: #dcfce7; border-color: #86efac; color: #166534; }

/* ---------- pdf lessons ---------- */
.pdf-frame { width: 100%; height: 75vh; min-height: 420px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }


.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 20px;
    border-radius: 8px; /* Optional: if you want rounded corners */
    color: #fff;        /* Ensures default text is white */
    overflow: hidden;
}

/* Optional dark overlay to make text pop over bright images */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Adjust opacity as needed */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Ensure text elements inside the hero stand out nicely */
.hero h1, .hero p {
    color: #ffffff;
}
