/* ==========================================================================
   Radio Marina Training — Design System
   Coursera-inspired layout · Radio Marina blue/red branding · RTL-first
   ========================================================================== */

:root {
    /* Brand */
    --brand:        #1a4fd6;   /* Radio Marina royal blue */
    --brand-600:    #1642b8;
    --brand-700:    #123699;
    --brand-050:    #eef3fe;
    --brand-100:    #dbe6fd;
    --accent:       #e11d48;   /* Radio Marina red */
    --accent-600:   #c01840;
    --sky:          #0ea5e9;   /* sky-blue swoosh */
    --sky-050:      #e8f7fe;

    /* Neutrals */
    --ink:          #0f1419;
    --text:         #1f2733;
    --muted:        #5b6472;
    --muted-2:      #8a93a2;
    --line:         #e3e7ee;
    --line-2:       #eef1f6;
    --bg:           #ffffff;
    --bg-soft:      #f6f8fb;
    --bg-tint:      #f1f5fb;

    /* Feedback */
    --success:      #16a34a;
    --success-bg:   #e8f7ee;
    --warn:         #d97706;
    --warn-bg:      #fdf3e3;
    --danger:       #dc2626;
    --danger-bg:    #fdeaea;
    --star:         #f59e0b;

    /* Shape & shadow */
    --radius:       12px;
    --radius-sm:    8px;
    --radius-lg:    18px;
    --shadow-sm:    0 1px 2px rgba(16,20,25,.06), 0 1px 3px rgba(16,20,25,.05);
    --shadow:       0 4px 14px rgba(16,20,25,.08);
    --shadow-md:    0 8px 28px rgba(16,20,25,.12);
    --shadow-lg:    0 18px 48px rgba(16,20,25,.16);

    --container:    1200px;
    --header-h:     68px;
    --font: 'Tajawal', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5 { line-height: 1.3; font-weight: 800; color: var(--ink); }
:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 2px; }

/* Directional helpers (RTL default; [dir=ltr] flips) */
[dir="ltr"] body { text-align: left; }

/* ---- Layout ------------------------------------------------------------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.container-sm { max-width: 760px; margin-inline: auto; padding-inline: 20px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.bg-soft { background: var(--bg-soft); }
.bg-tint { background: var(--bg-tint); }
.bg-brand { background: var(--brand); color: #fff; }
.text-center { text-align: center; }
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:32px}
.hidden { display: none !important; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flex-center { display: flex; align-items: center; justify-content: center; gap: 8px; }
.items-center { align-items: center; }
.gap-1{gap:8px}.gap-2{gap:16px}.gap-3{gap:24px}
.wrap { flex-wrap: wrap; }

/* ---- Section headings --------------------------------------------------- */
.section-head { margin-bottom: 36px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); }
.section-head p { color: var(--muted); font-size: 17px; margin-top: 8px; }
.eyebrow { color: var(--brand); font-weight: 800; font-size: 14px; letter-spacing: .3px; text-transform: uppercase; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: 15px;
    border: 1.5px solid transparent; transition: .18s ease; white-space: nowrap;
    line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-600); box-shadow: var(--shadow); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: #fff; }
.btn-outline:hover { background: var(--brand-050); }
.btn-ghost { color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: var(--brand-050); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 30px; font-size: 17px; }
.btn-sm { padding: 7px 15px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---- Badges & pills ----------------------------------------------------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px;
    border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.5;
    background: var(--brand-050); color: var(--brand);
}
.badge-accent { background: var(--danger-bg); color: var(--accent); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-muted { background: var(--bg-soft); color: var(--muted); }
.badge-sky { background: var(--sky-050); color: var(--sky); }
.badge-free { background: var(--success-bg); color: var(--success); }

.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
    border: 1.5px solid var(--line); border-radius: 999px; font-size: 14px;
    font-weight: 600; color: var(--muted); background: #fff; transition: .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---- Cards -------------------------------------------------------------- */
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); overflow: hidden;
}
.card-body { padding: 22px; }
.card-pad { padding: 24px; }

/* Course card (Coursera-style) */
.course-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column; transition: .2s ease;
    box-shadow: var(--shadow-sm); height: 100%;
}
.course-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--brand-100); }
.course-thumb {
    aspect-ratio: 16 / 9; position: relative; display: flex; align-items: center;
    justify-content: center; color: #fff; overflow: hidden;
    background: linear-gradient(135deg, var(--brand), var(--sky));
}
.course-thumb .thumb-title {
    font-weight: 800; font-size: 19px; padding: 18px; text-align: center;
    text-shadow: 0 2px 12px rgba(0,0,0,.28); z-index: 1;
}
.course-thumb::after { content:""; position:absolute; inset:0; background: rgba(0,0,0,.08); }
.course-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.course-card .card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.course-provider { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.course-provider img { width: 26px; height: 26px; border-radius: 6px; object-fit: contain; background:#fff; border:1px solid var(--line-2); }
.course-provider span { font-size: 13px; color: var(--muted); font-weight: 700; }
.course-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.course-card h3 a:hover { color: var(--brand); }
.course-sub { color: var(--muted); font-size: 14px; margin-bottom: 12px; flex: 1; }
.course-rating { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 10px; }
.course-rating .stars { color: var(--star); letter-spacing: 1px; }
.course-rating .num { font-weight: 800; color: var(--star); }
.course-rating .count { color: var(--muted-2); font-size: 13px; }
.course-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.course-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.course-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line-2); }
.course-price { font-weight: 900; font-size: 19px; color: var(--ink); }
.course-price .old { text-decoration: line-through; color: var(--muted-2); font-size: 14px; font-weight: 600; margin-inline-start: 6px; }

/* Star meter */
.stars { color: var(--star); letter-spacing: 1px; }
.stars .off { color: #d8dce3; }

/* ---- Stat tiles --------------------------------------------------------- */
.stat-tile { text-align: center; padding: 24px; }
.stat-tile .num { font-size: clamp(28px, 4vw, 40px); font-weight: 900; color: var(--brand); line-height: 1; }
.stat-tile .lbl { color: var(--muted); font-size: 15px; margin-top: 8px; font-weight: 600; }

.kpi {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px 22px; box-shadow: var(--shadow-sm); position: relative; overflow:hidden;
}
.kpi .kpi-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.kpi .kpi-val { font-size: 28px; font-weight: 900; color: var(--ink); line-height: 1; }
.kpi .kpi-lbl { color: var(--muted); font-size: 14px; margin-top: 6px; font-weight: 600; }
.kpi .kpi-trend { font-size: 12.5px; font-weight: 700; margin-top: 8px; }
.kpi-trend.up { color: var(--success); } .kpi-trend.down { color: var(--danger); }

/* ---- Forms -------------------------------------------------------------- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 7px; color: var(--text); }
.form-label .req { color: var(--accent); }
.form-control, .form-select, textarea.form-control {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--line);
    border-radius: var(--radius-sm); background: #fff; font-size: 15px; transition: .15s;
    color: var(--text);
}
.form-control:focus, .form-select:focus, textarea.form-control:focus {
    border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050); outline: none;
}
textarea.form-control { min-height: 120px; resize: vertical; line-height: 1.6; }
.form-hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 5px; font-weight: 600; }
.form-control.is-invalid, .is-invalid { border-color: var(--danger); }
.input-group { position: relative; display: flex; }
.input-icon { position: relative; }
.input-icon .form-control { padding-inline-start: 42px; }
.input-icon .icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.checkbox { display: flex; align-items: flex-start; gap: 9px; font-size: 14.5px; color: var(--text); cursor: pointer; }
.checkbox input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---- Alerts ------------------------------------------------------------- */
.alert {
    padding: 13px 18px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 600;
    display: flex; align-items: center; gap: 10px; margin-bottom: 18px; border: 1px solid transparent;
}
.alert-success { background: var(--success-bg); color: #12813d; border-color: #bfe6cd; }
.alert-danger { background: var(--danger-bg); color: #b91c1c; border-color: #f4c2c2; }
.alert-warn { background: var(--warn-bg); color: #b45309; border-color: #f2ddb4; }
.alert-info { background: var(--brand-050); color: var(--brand-700); border-color: var(--brand-100); }

/* ---- Tables ------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background:#fff; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
.table th { text-align: start; padding: 13px 16px; background: var(--bg-soft); font-weight: 800; color: var(--muted); font-size: 13px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-soft); }
.table .actions { display: flex; gap: 6px; }

/* ---- Progress ----------------------------------------------------------- */
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress .bar { height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s; }
.progress.success .bar { background: var(--success); }
.progress-lg { height: 12px; }

/* ---- Avatar ------------------------------------------------------------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--brand-050); display: grid; place-items: center; color: var(--brand); font-weight: 800; overflow: hidden; flex-shrink:0; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-lg { width: 72px; height: 72px; font-size: 26px; }
.avatar-xl { width: 110px; height: 110px; font-size: 40px; }

/* ---- Header / Nav ------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96);
    backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line);
}
.navbar { display: flex; align-items: center; gap: 22px; height: var(--header-h); }
.brand-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo img { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 9px 14px; border-radius: 8px; font-weight: 700; font-size: 15px; color: var(--text); transition: .15s; }
.nav-links a:hover { background: var(--bg-soft); color: var(--brand); }
.nav-links a.active { color: var(--brand); }
.nav-search { flex: 1; max-width: 460px; position: relative; }
.nav-search input { width: 100%; padding: 10px 16px 10px 42px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg-soft); font-size: 14.5px; }
.nav-search input:focus { background:#fff; border-color: var(--brand); outline:none; }
.nav-search .icon { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.nav-toggle { display: none; font-size: 24px; color: var(--ink); }

/* dropdown */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 220px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-md); padding: 8px; z-index: 200; display: none;
}
.dropdown.open .dropdown-menu { display: block; animation: pop .15s ease; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 14.5px; font-weight: 600; color: var(--text); text-align: start; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg-soft); color: var(--brand); }
.dropdown-menu .divider { height: 1px; background: var(--line-2); margin: 6px 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.lang-switch { display: flex; gap: 2px; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px; }
.lang-switch a { padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--muted); }
.lang-switch a.active { background: var(--brand); color: #fff; }

/* notification bell */
.bell { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.bell:hover { background: var(--bg-soft); }
.bell .dot-badge { position: absolute; top: 7px; inset-inline-end: 7px; min-width: 17px; height: 17px; padding: 0 4px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800; border-radius: 999px; display: grid; place-items: center; }

/* ---- Hero --------------------------------------------------------------- */
.hero { background: linear-gradient(135deg, var(--brand-050) 0%, var(--sky-050) 100%); padding: 72px 0; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.5vw, 50px); line-height: 1.15; color: var(--ink); }
.hero h1 .hl { color: var(--brand); }
.hero p.lead { font-size: 19px; color: var(--muted); margin-top: 20px; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-search { margin-top: 26px; background: #fff; border-radius: 999px; box-shadow: var(--shadow-md); display: flex; padding: 6px; max-width: 520px; }
.hero-search input { flex: 1; border: none; padding: 12px 20px; font-size: 15.5px; background: transparent; outline: none; }
.hero-stats { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .num { font-size: 26px; font-weight: 900; color: var(--brand); }
.hero-stats .lbl { font-size: 13.5px; color: var(--muted); }
.hero-visual { position: relative; }
.hero-visual .float-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px; }

/* ---- Feature blocks ----------------------------------------------------- */
.feature { text-align: center; padding: 20px; }
.feature .fi { width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; margin: 0 auto 16px; background: var(--brand-050); color: var(--brand); }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

/* ---- Category card ------------------------------------------------------ */
.cat-card { display: flex; align-items: center; gap: 14px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: .2s; box-shadow: var(--shadow-sm); }
.cat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cat-card .ci { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; flex-shrink: 0; }
.cat-card h4 { font-size: 16.5px; } .cat-card p { color: var(--muted); font-size: 13.5px; }

/* ---- Testimonial -------------------------------------------------------- */
.testimonial { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.testimonial p { font-size: 15.5px; color: var(--text); line-height: 1.7; }
.testimonial .who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.testimonial .who .name { font-weight: 800; font-size: 15px; }
.testimonial .who .role { color: var(--muted); font-size: 13px; }

/* ---- Accordion (FAQ / curriculum) --------------------------------------- */
.accordion-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; background:#fff; }
.accordion-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; font-weight: 700; font-size: 16px; text-align: start; }
.accordion-head:hover { background: var(--bg-soft); }
.accordion-head .arrow { transition: .2s; color: var(--muted); flex-shrink:0; }
.accordion-item.open .accordion-head .arrow { transform: rotate(180deg); }
.accordion-body { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height .28s ease, padding .28s ease; color: var(--muted); }
.accordion-item.open .accordion-body { padding: 0 20px 18px; max-height: 900px; }

/* curriculum lesson list */
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.lesson-row:last-child { border-bottom: none; }
.lesson-row .l-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-050); color: var(--brand); display: grid; place-items: center; font-size: 14px; flex-shrink: 0; }
.lesson-row .l-title { flex: 1; }
.lesson-row .l-meta { color: var(--muted-2); font-size: 13px; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: #0d1b3e; color: #c7d0e4; padding: 56px 0 26px; margin-top: 60px; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.site-footer a { color: #aeb9d4; font-size: 14.5px; transition: .15s; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-logo { height: 46px; background: #fff; padding: 6px 10px; border-radius: 10px; display: inline-block; margin-bottom: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13.5px; color: #8896b8; }
.social-links { display: flex; gap: 10px; }
.social-links a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; }
.social-links a:hover { background: var(--brand); }

/* ---- Dashboard layout --------------------------------------------------- */
.dash { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - var(--header-h)); }
.dash-sidebar { background: #fff; border-inline-end: 1px solid var(--line); padding: 22px 14px; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; }
.dash-main { padding: 30px 34px; background: var(--bg-soft); min-width: 0; }
.side-group { margin-bottom: 22px; }
.side-group .side-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted-2); font-weight: 800; padding: 0 12px; margin-bottom: 8px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 14.5px; color: var(--text); transition: .15s; margin-bottom: 3px; }
.side-link:hover { background: var(--bg-soft); color: var(--brand); }
.side-link.active { background: var(--brand-050); color: var(--brand); }
.side-link .si { width: 22px; text-align: center; font-size: 17px; }
.side-link .badge-count { margin-inline-start: auto; background: var(--accent); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 999px; font-weight: 800; }

.page-title { font-size: 26px; font-weight: 900; margin-bottom: 4px; }
.page-sub { color: var(--muted); margin-bottom: 26px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-head { padding: 18px 22px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h3 { font-size: 17px; }
.panel-body { padding: 22px; }

/* ---- Breadcrumb --------------------------------------------------------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--muted-2); }

/* ---- Course player ------------------------------------------------------ */
.player { display: grid; grid-template-columns: 1fr 340px; min-height: calc(100vh - var(--header-h)); }
.player-main { background: #0d1117; min-width: 0; }
.player-video { aspect-ratio: 16/9; background: #000; width: 100%; }
.player-video iframe { width: 100%; height: 100%; border: 0; }
.player-body { background: #fff; padding: 26px 32px; }
.player-sidebar { background: #fff; border-inline-start: 1px solid var(--line); overflow-y: auto; height: calc(100vh - var(--header-h)); position: sticky; top: var(--header-h); }
.player-sidebar .ps-head { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.curriculum-module { border-bottom: 1px solid var(--line-2); }
.curriculum-module .cm-head { padding: 14px 20px; font-weight: 800; font-size: 14.5px; background: var(--bg-soft); display: flex; justify-content: space-between; gap: 8px; cursor: pointer; }
.curriculum-lesson { display: flex; align-items: center; gap: 11px; padding: 11px 20px; font-size: 14px; border-inline-start: 3px solid transparent; transition: .12s; }
.curriculum-lesson:hover { background: var(--bg-soft); }
.curriculum-lesson.active { background: var(--brand-050); border-inline-start-color: var(--brand); font-weight: 700; }
.curriculum-lesson .cl-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex-shrink: 0; font-size: 11px; }
.curriculum-lesson.done .cl-check { background: var(--success); border-color: var(--success); color: #fff; }
.curriculum-lesson .cl-title { flex: 1; }
.curriculum-lesson .cl-dur { font-size: 12px; color: var(--muted-2); }

/* ---- Quiz --------------------------------------------------------------- */
.quiz-option { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; cursor: pointer; transition: .15s; font-size: 15px; }
.quiz-option:hover { border-color: var(--brand); background: var(--brand-050); }
.quiz-option input { accent-color: var(--brand); width: 18px; height: 18px; }
.quiz-option.selected { border-color: var(--brand); background: var(--brand-050); }
.quiz-option.correct { border-color: var(--success); background: var(--success-bg); }
.quiz-option.incorrect { border-color: var(--danger); background: var(--danger-bg); }
.quiz-timer { font-size: 20px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }
.score-ring { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; font-size: 34px; font-weight: 900; }

/* ---- Certificate -------------------------------------------------------- */
.cert-frame { background: #fff; border: 14px solid var(--brand); border-radius: 8px; padding: 46px; text-align: center; position: relative; box-shadow: var(--shadow-lg); max-width: 860px; margin: 0 auto; }
.cert-frame::before { content: ""; position: absolute; inset: 10px; border: 2px solid var(--sky); border-radius: 4px; pointer-events: none; }
.cert-frame .cert-logo { height: 60px; margin: 0 auto 20px; }
.cert-name { font-size: 38px; font-weight: 900; color: var(--brand); margin: 14px 0; }
.cert-course { font-size: 22px; font-weight: 800; color: var(--ink); }

/* ---- Empty state -------------------------------------------------------- */
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .ei { font-size: 52px; margin-bottom: 14px; opacity: .5; }
.empty h3 { font-size: 19px; color: var(--text); margin-bottom: 8px; }

/* ---- Pagination --------------------------------------------------------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 34px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 700; font-size: 14.5px; color: var(--text); padding: 0 10px; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ---- Tabs --------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 26px; overflow-x: auto; }
.tabs a, .tabs button { padding: 12px 18px; font-weight: 700; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.active, .tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---- Utilities ---------------------------------------------------------- */
.text-muted { color: var(--muted); }
.text-brand { color: var(--brand); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-800 { font-weight: 800; } .fw-900 { font-weight: 900; }
.fs-sm { font-size: 13.5px; } .fs-lg { font-size: 18px; }
.divider-line { height: 1px; background: var(--line); margin: 24px 0; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.rounded { border-radius: var(--radius); }
.shadow { box-shadow: var(--shadow); }
.list-check li { position: relative; padding-inline-start: 30px; margin-bottom: 12px; color: var(--text); }
.list-check li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; width: 20px; height: 20px; background: var(--success-bg); color: var(--success); border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; }

/* ---- Modal -------------------------------------------------------------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(13,20,40,.5); z-index: 500; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; animation: fade .15s; }
.modal { background: #fff; border-radius: var(--radius-lg); max-width: 520px; width: 100%; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; animation: pop .18s; }
.modal-head { padding: 20px 24px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .player { grid-template-columns: 1fr; }
    .player-sidebar { position: static; height: auto; border-inline-start: none; border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
    .nav-search { display: none; }
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .dash { grid-template-columns: 1fr; }
    .dash-sidebar { position: fixed; inset-inline-start: -280px; top: var(--header-h); width: 260px; z-index: 90; transition: .25s; box-shadow: var(--shadow-lg); }
    .dash-sidebar.open { inset-inline-start: 0; }
    .dash-main { padding: 20px 16px; }
    .mobile-menu.open { display: block; }
}
@media (max-width: 620px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .section { padding: 44px 0; }
    .hero { padding: 48px 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .cert-name { font-size: 26px; } .cert-frame { padding: 26px; border-width: 8px; }
    .player-body, .dash-main { padding: 18px 14px; }
}

/* Mobile slide-in menu */
.mobile-menu { display: none; position: fixed; inset: var(--header-h) 0 0; background: #fff; z-index: 95; padding: 20px; overflow-y: auto; }
.mobile-menu a { display: block; padding: 14px 12px; font-weight: 700; border-bottom: 1px solid var(--line-2); }

/* print (certificates / receipts) */
@media print {
    .site-header, .site-footer, .no-print, .dash-sidebar { display: none !important; }
    body { background: #fff; }
    .dash { grid-template-columns: 1fr; }
    .cert-frame { box-shadow: none; }
}

/* ==========================================================================
   Extended components (course detail, filters, reviews, tabs, video) + mobile
   Added in the responsiveness / polish pass.
   ========================================================================== */

/* Tabs used on the course detail page (.tab-nav / .tab / .tab-panel) */
.tab-nav { display:flex; gap:4px; border-bottom:2px solid var(--line); margin-bottom:26px; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.tab-nav .tab { padding:12px 18px; font-weight:700; font-size:15px; color:var(--muted); border-bottom:2px solid transparent; margin-bottom:-2px; white-space:nowrap; background:none; }
.tab-nav .tab:hover { color:var(--brand); }
.tab-nav .tab.active { color:var(--brand); border-bottom-color:var(--brand); }
.tab-panel { display:none; }
.tab-panel.active { display:block; }

/* Course detail hero + two-column layout */
.course-hero { padding:42px 0 46px; }
.course-hero-grid { max-width:860px; }
.course-hero-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; margin-top:16px; font-size:14.5px; }
.course-hero-meta .stars { color:var(--star); letter-spacing:1px; }
.course-hero-meta .dot { background:rgba(255,255,255,.5); }
.course-layout { display:grid; grid-template-columns:minmax(0,1fr) 348px; gap:38px; align-items:start; }
.course-main { min-width:0; }
.course-sidebar { position:sticky; top:calc(var(--header-h) + 16px); }

/* Enroll card */
.enroll-card { padding:0; overflow:hidden; }
.enroll-thumb { aspect-ratio:16/9; background:linear-gradient(135deg,var(--brand),var(--sky)); }
.enroll-thumb img { width:100%; height:100%; object-fit:cover; }
.enroll-price { display:flex; align-items:center; gap:10px; margin-bottom:16px; flex-wrap:wrap; }
.enroll-price .price-now { font-size:30px; font-weight:900; color:var(--ink); }
.enroll-price .old { text-decoration:line-through; color:var(--muted-2); font-size:17px; }
.includes { margin-top:20px; }
.includes h4 { font-size:15px; margin-bottom:10px; }
.includes-list li { padding:8px 0; border-bottom:1px solid var(--line-2); font-size:14px; color:var(--text); }
.includes-list li:last-child { border-bottom:none; }

/* Catalog filter bar + chip row */
.filter-bar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; box-shadow:var(--shadow-sm); margin-bottom:26px; }
.chip-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:24px; }

/* Prose / bullet lists */
.prose { color:var(--text); line-height:1.85; font-size:15.5px; }
.prose p { margin-bottom:14px; }
ul.list-disc { padding-inline-start:22px; }
ul.list-disc li { list-style:disc; margin-bottom:8px; color:var(--text); }

/* Responsive 16:9 video embed */
.video-embed { position:relative; aspect-ratio:16/9; border-radius:var(--radius); overflow:hidden; background:#000; }
.video-embed iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }

/* Curriculum lesson rows on the course detail page */
.lesson-list .curriculum-lesson { border-bottom:1px solid var(--line-2); }
.lesson-list .curriculum-lesson:last-child { border-bottom:none; }
.lesson-ico { width:26px; text-align:center; flex-shrink:0; }
.lesson-title { flex:1; min-width:0; }
.lesson-side { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.lock { opacity:.7; }

/* Reviews block */
.review-summary { display:grid; grid-template-columns:auto 1fr; gap:28px; align-items:center; background:var(--bg-soft); border-radius:var(--radius); padding:22px; margin-bottom:24px; }
.review-score { text-align:center; }
.review-score .big { font-size:44px; font-weight:900; color:var(--ink); line-height:1; }
.review-score .stars { color:var(--star); font-size:18px; }
.review-bars { display:flex; flex-direction:column; gap:6px; min-width:0; }
.review-bar-row { display:flex; align-items:center; gap:10px; font-size:13px; }
.review-bar-row .rb-star { width:44px; color:var(--muted); white-space:nowrap; }
.review-bar-row .progress { flex:1; }
.review-bar-row .rb-count { width:28px; text-align:end; color:var(--muted-2); }
.review-list { display:flex; flex-direction:column; gap:4px; }
.review-item { display:flex; gap:14px; padding:16px 0; border-bottom:1px solid var(--line-2); }
.review-item:last-child { border-bottom:none; }
.review-body { flex:1; min-width:0; }
.review-title { margin:4px 0; }

/* Star rating input widget */
.rating-stars { display:inline-flex; gap:5px; font-size:28px; cursor:pointer; line-height:1; }
.rating-stars .rate-star { color:#d8dce3; transition:.1s; }
.rating-stars .rate-star.on { color:var(--star); }

/* Instructor card */
.instructor-card { display:flex; gap:18px; align-items:flex-start; }
.instructor-card > .avatar, .instructor-card img { flex-shrink:0; }

/* Quiz form width + admin chart bar columns */
.q-form { max-width:760px; }
.opt-row { display:flex; align-items:center; gap:10px; }
.chart-bars .bar-col { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:6px; min-width:0; }

/* Off-canvas backdrop for the mobile dashboard/admin sidebar */
.dash-backdrop { position:fixed; inset:var(--header-h) 0 0; background:rgba(13,20,40,.4); z-index:85; animation:fade .15s; }

/* Long-word safety to avoid horizontal overflow on small screens */
body { overflow-wrap:break-word; }
.card, .panel, .course-main, .review-body { min-width:0; }

/* ---- Responsive additions ------------------------------------------------ */
@media (max-width: 960px) {
    .course-layout { grid-template-columns:1fr; gap:24px; }
    .course-sidebar { position:static; order:-1; }         /* enroll card first on mobile */
    .review-summary { grid-template-columns:1fr; gap:16px; text-align:center; }
    .review-bars { max-width:420px; margin:0 auto; width:100%; }
}
@media (max-width: 560px) {
    .filter-bar { flex-direction:column; align-items:stretch; }
    .filter-bar .form-select, .filter-bar .input-icon { max-width:none !important; width:100%; }
    .instructor-card { flex-direction:column; }
    .enroll-price .price-now { font-size:26px; }
    .course-hero-meta { font-size:13px; gap:6px 10px; }
    .lang-switch { display:none; }                          /* language is in the mobile menu */
    .review-item { flex-direction:column; gap:8px; }
    .btn-lg { padding:12px 22px; font-size:16px; }
}

.curriculum-module.collapsed .cm-lessons { display:none; }
.accordion { display:block; }

/* Avatar image fill (avatars are div>img circles) */
.avatar img { width:100%; height:100%; object-fit:cover; }

/* Category page banner hero */
.cat-banner { background-size:cover; background-position:center; background-color:var(--brand-700); color:#fff; padding:52px 0; }
.cat-banner .breadcrumb, .cat-banner .breadcrumb a, .cat-banner .breadcrumb .sep { color:#dbe6fd; }
.cat-banner h1 { color:#fff; font-size:clamp(26px,4vw,40px); }
.cat-banner p { color:#e6ecfb; max-width:640px; margin-top:8px; }
.cat-banner-meta { display:inline-flex; align-items:center; gap:9px; margin-top:16px; padding:7px 15px; background:rgba(255,255,255,.14); border-radius:999px; font-weight:700; font-size:14px; }
.cat-banner-meta .ico { color:#fff; }
@media (max-width:560px){ .cat-banner { padding:38px 0; } }

/* Certificate with generated ornamental background */
.cert-frame.cert-art { border:none; background-size:cover; background-position:center; padding:60px 64px; }
.cert-frame.cert-art::before { display:none; }
@media (max-width:560px){ .cert-frame.cert-art { padding:34px 26px; } }

/* Force the certificate ornamental background to print */
.cert-frame.cert-art { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
@media print { .cert-frame.cert-art { -webkit-print-color-adjust:exact; print-color-adjust:exact; background-image:url('/assets/img/cert-bg.jpg') !important; } }

/* Declutter the top bar on small phones — login stays in the menu/dropdown */
@media (max-width:560px){ .nav-actions .btn-ghost { display:none; } .navbar { gap:12px; } }

/* Homepage category cards — vertical with banner art (overrides earlier .cat-card) */
.cat-card { flex-direction:column; align-items:stretch; gap:0; padding:0; overflow:hidden; height:100%; }
.cat-card-banner { aspect-ratio:16/6; background-size:cover; background-position:center; background-color:var(--brand-700); }
.cat-card-body { display:flex; align-items:center; gap:14px; padding:15px 18px; }
.cat-card .ci { width:48px; height:48px; border-radius:12px; }

/* ==========================================================================
   Hero training carousel (split slide: text + course art), auto-rotating
   ========================================================================== */
.hero-slider { position: relative; }
.hero-track { display: grid; }
.hero-slide {
    grid-area: 1 / 1;                 /* stack every slide in the same cell */
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s ease;
}
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide-cat { display: inline-block; color: var(--brand); font-weight: 800; font-size: 14px; letter-spacing: .3px; text-transform: uppercase; margin-bottom: 10px; }
.hero-slide-text h1 { font-size: clamp(27px, 3.9vw, 44px); line-height: 1.15; color: var(--ink); }
.hero-slide-text .lead { font-size: 18px; color: var(--muted); margin-top: 14px; max-width: 520px; }
.hero-slide-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 18px; font-size: 15px; color: var(--text); }
.hero-slide-meta .stars { color: var(--star); }
.hero-slide-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.hero-slide .hero-cta { margin-top: 26px; }
.hero-slide-visual img { width: 100%; max-width: 520px; border-radius: 18px; box-shadow: var(--shadow-lg); margin-inline: auto; display: block; }
.hero-slide-fallback { aspect-ratio: 16/9; border-radius: 18px; background: linear-gradient(135deg, var(--brand), var(--sky)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; padding: 20px; text-align: center; box-shadow: var(--shadow-lg); }

/* arrows */
.hero-arrow { position: absolute; top: 40%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); color: var(--brand); font-size: 24px; line-height: 1; display: grid; place-items: center; z-index: 3; border: 1px solid var(--line); transition: .15s; }
.hero-arrow:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.hero-prev { inset-inline-start: -8px; }
.hero-next { inset-inline-end: -8px; }

/* dots */
.hero-dots { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.hero-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--line); border: none; padding: 0; cursor: pointer; transition: .25s; }
.hero-dot:hover { background: var(--brand-100); }
.hero-dot.active { background: var(--brand); width: 28px; }

@media (prefers-reduced-motion: reduce) {
    .hero-slide { transition: none; }
}
@media (max-width: 860px) {
    .hero-slide { grid-template-columns: 1fr; gap: 20px; text-align: center; }
    .hero-slide-visual { order: -1; }
    .hero-slide-meta, .hero-slide .hero-cta { justify-content: center; }
    .hero-slide-visual img, .hero-slide-fallback { max-width: 380px; }
    .hero-arrow { display: none; }        /* dots + swipe on mobile */
}

/* ==========================================================================
   Course photo gallery + lightbox
   ========================================================================== */
.gallery-main { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #0d1117; box-shadow: var(--shadow); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 24px; line-height: 1; display: grid; place-items: center; z-index: 2; border: none; cursor: pointer; transition: .15s; }
.gallery-nav:hover { background: #fff; }
.gallery-prev { inset-inline-start: 12px; }
.gallery-next { inset-inline-end: 12px; }
.gallery-zoom { position: absolute; top: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border-radius: 10px; background: rgba(13,20,40,.55); color: #fff; display: grid; place-items: center; font-size: 17px; z-index: 2; border: none; cursor: pointer; }
.gallery-zoom:hover { background: rgba(13,20,40,.82); }
.gallery-count { position: absolute; bottom: 12px; inset-inline-end: 12px; background: rgba(13,20,40,.6); color: #fff; font-size: 12.5px; font-weight: 700; padding: 3px 11px; border-radius: 999px; z-index: 2; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb { flex: 0 0 auto; width: 92px; height: 60px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; transition: .15s; opacity: .65; background: none; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: var(--brand); opacity: 1; }

.lightbox { position: fixed; inset: 0; background: rgba(8,12,24,.94); z-index: 1000; display: none; align-items: center; justify-content: center; flex-direction: column; padding: 24px; }
.lightbox.open { display: flex; animation: fade .2s; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 8px; box-shadow: var(--shadow-lg); object-fit: contain; }
.lightbox-cap { color: #e6ecfb; margin-top: 14px; font-size: 15px; text-align: center; max-width: 80vw; }
.lightbox-close { position: absolute; top: 18px; inset-inline-end: 22px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; border: none; cursor: pointer; display: grid; place-items: center; }
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; border: none; cursor: pointer; display: grid; place-items: center; z-index: 2; }
.lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-prev { inset-inline-start: 20px; }
.lightbox-next { inset-inline-end: 20px; }
@media (max-width: 560px) {
    .gallery-nav { width: 36px; height: 36px; font-size: 20px; }
    .lightbox-nav { width: 44px; height: 44px; font-size: 24px; }
    .gallery-thumb { width: 74px; height: 50px; }
}

/* Gallery caption (slider) + photo grid (Gallery tab) */
.gallery-caption { position: absolute; inset-inline: 0; bottom: 0; background: linear-gradient(transparent, rgba(13,20,40,.8)); color: #fff; padding: 30px 90px 12px 16px; font-size: 14px; z-index: 1; line-height: 1.45; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.gallery-grid-item { margin: 0; cursor: zoom-in; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: #fff; transition: .15s; }
.gallery-grid-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.gallery-grid-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.gallery-grid-item figcaption { padding: 9px 11px; font-size: 13px; color: var(--muted); }
/* admin gallery manager */
.gallery-admin { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.gallery-admin-item { width: 150px; }
.gallery-admin-item .thumb-wrap { position: relative; }
.gallery-admin-item img { width: 150px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.gallery-admin-item .del { position: absolute; top: 5px; inset-inline-end: 5px; width: 24px; height: 24px; border-radius: 50%; background: rgba(220,38,38,.92); color: #fff; border: none; cursor: pointer; font-size: 14px; line-height: 1; display: grid; place-items: center; }
.gallery-admin-item .del:hover { background: #b91c1c; }
.gallery-admin-item input { margin-top: 6px; font-size: 13px; padding: 6px 9px; }
