/* Academy - clean, professional learning-portal design */
:root { --navy: #0f1f4b; --blue: #2563eb; --blue-d: #1d4ed8; --orange: #f97316; --green: #16a34a; --ink: #1e293b; --muted: #64748b; --line: #e2e8f0; --bg: #f6f8fc; --card: #fff; --radius: 16px; --shadow: 0 10px 30px rgba(15, 31, 75, .08); }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; } a { color: var(--blue); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; color: var(--navy); }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); } h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); } h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; } .muted { color: var(--muted); } .center { text-align: center; } .small { font-size: .88rem; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* header */
.topbar { background: var(--navy); color: #cbd5f5; font-size: .85rem; } .topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.header { background: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 12px rgba(15, 31, 75, .07); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.35rem; color: var(--navy); }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), #7c3aed); color: #fff; font-size: 1.25rem; }
.nav { display: flex; align-items: center; gap: 24px; } .nav a { text-decoration: none; color: var(--ink); font-weight: 500; } .nav a:hover, .nav a.on { color: var(--blue); }
.burger { display: none; background: none; border: 0; font-size: 1.7rem; cursor: pointer; color: var(--navy); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 12px; border: 0; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .3); } .btn-primary:hover { background: var(--blue-d); }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 6px 16px rgba(249, 115, 22, .3); }
.btn-ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); } .btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { background: #fff; color: #dc2626; border: 1.5px solid #fecaca; }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; } .btn-sm { padding: 7px 14px; font-size: .88rem; border-radius: 10px; } .btn-block { display: flex; width: 100%; }

/* hero */
.hero { background: linear-gradient(135deg, var(--navy), #1e3a8a 60%, #3730a3); color: #fff; padding: 64px 0 90px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: rgba(249, 115, 22, .18); }
.hero h1 { color: #fff; max-width: 720px; } .hero h1 span { color: #fdba74; } .hero p { color: #dbe4ff; font-size: 1.1rem; max-width: 620px; }
.hero-stats { display: flex; gap: 34px; margin-top: 26px; flex-wrap: wrap; } .hero-stats b { display: block; font-size: 1.7rem; color: #fff; } .hero-stats span { color: #bcc9f5; font-size: .9rem; }
.searchbox { display: flex; gap: 10px; background: #fff; border-radius: 16px; padding: 8px; max-width: 640px; margin-top: 26px; box-shadow: 0 14px 40px rgba(0, 0, 0, .25); position: relative; z-index: 1; }
.searchbox input { flex: 1; border: 0; padding: 12px 14px; font: inherit; font-size: 1rem; outline: none; min-width: 0; border-radius: 10px; }

/* categories */
.cats { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin-top: -48px; position: relative; z-index: 2; }
.cat-chip { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--ink); box-shadow: 0 4px 14px rgba(15, 31, 75, .07); }
.cat-chip:hover, .cat-chip.on { background: var(--blue); color: #fff; border-color: var(--blue); } .cat-chip small { opacity: .7; font-weight: 500; }

/* layout: filters + grid */
.catalog { display: grid; grid-template-columns: 280px 1fr; gap: 28px; padding: 36px 0 60px; align-items: start; }
.filters { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 92px; }
.filters h3 { display: flex; justify-content: space-between; align-items: center; }
.f-group { padding: 12px 0; border-bottom: 1px solid var(--line); } .f-group:last-of-type { border-bottom: 0; }
.f-group label.lbl { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px; color: var(--navy); }
.filters select, .filters input[type=text], .filters input[type=number] { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; } .toolbar select { padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; } .chip { background: #e0e7ff; color: #3730a3; border-radius: 999px; padding: 4px 12px; font-size: .84rem; font-weight: 600; }

/* course cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.course { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.course:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.course-img { position: relative; display: block; aspect-ratio: 16 / 9; background: #e2e8f0; overflow: hidden; } .course-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; } .course:hover .course-img img { transform: scale(1.05); }
.course-img .ph { width: 100%; height: 100%; display: grid; place-items: center; } .course-img .ph i { font-style: normal; font-size: 3.4rem; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); }
.flag { position: absolute; left: 12px; top: 12px; background: var(--orange); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.off { position: absolute; right: 12px; top: 12px; background: #dc2626; color: #fff; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.course-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.course .cat { color: var(--blue); font-weight: 600; font-size: .82rem; } .course h3 { margin: 0; font-size: 1.08rem; } .course h3 a { color: var(--navy); text-decoration: none; } .course h3 a:hover { color: var(--blue); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .92rem; margin: 0; }
.meta { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--muted); }
.course-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.price .now { font-size: 1.3rem; font-weight: 800; color: var(--navy); } .price s { color: var(--muted); font-size: .9rem; margin-left: 8px; }
.empty { text-align: center; padding: 50px 20px; background: #fff; border: 1.5px dashed var(--line); border-radius: var(--radius); }

/* pagination */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; } .pager a, .pager span { min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-weight: 600; }
.pager a:hover { border-color: var(--blue); } .pager .on { background: var(--blue); color: #fff; border-color: var(--blue); } .pager .dis { opacity: .4; }

/* sections */
.section { padding: 60px 0; } .section-white { background: #fff; border-block: 1.5px solid var(--line); }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 26px; }
.feature { background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 24px; } .feature .ic { font-size: 2rem; display: block; margin-bottom: 8px; }
.cta { background: linear-gradient(135deg, var(--blue), #7c3aed); color: #fff; border-radius: 24px; padding: 44px; text-align: center; } .cta h2 { color: #fff; } .cta .btn { background: #fff; color: var(--blue); }

/* course details */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; } .crumbs a { color: var(--muted); }
.detail-hero { background: linear-gradient(135deg, var(--navy), #1e3a8a); color: #fff; padding: 40px 0; } .detail-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.5vw, 2.5rem); } .detail-hero p { color: #dbe4ff; max-width: 720px; }
.detail-hero .crumbs, .detail-hero .crumbs a { color: #bcc9f5; }
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; padding: 34px 0 60px; align-items: start; }
.banner { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #e2e8f0; margin-bottom: 24px; box-shadow: var(--shadow); } .banner img { width: 100%; height: 100%; object-fit: cover; display: block; } .banner .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 6rem; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 26px; } .fact { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; } .fact b { display: block; color: var(--navy); } .fact span { font-size: .8rem; color: var(--muted); } .fact i { font-style: normal; font-size: 1.5rem; display: block; }
.block { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.learn { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; } .learn li::before { content: '\2714'; color: var(--green); margin-right: 8px; font-weight: 700; }
.reqs { margin: 0; padding-left: 1.2em; } .reqs li { margin: 6px 0; }
details.mod { border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: #fff; } details.mod summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--navy); list-style: none; display: flex; justify-content: space-between; }
details.mod summary::-webkit-details-marker { display: none; } details.mod summary::after { content: '+'; color: var(--blue); font-size: 1.3rem; } details.mod[open] summary::after { content: '\2212'; } details.mod ul { margin: 0; padding: 0 18px 16px 38px; color: var(--muted); }
.side { position: sticky; top: 92px; } .fee-card { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.fee-card .big { font-size: 2.1rem; font-weight: 800; color: var(--navy); } .fee-card s { color: var(--muted); margin-left: 8px; } .save { display: inline-block; background: #dcfce7; color: #166534; border-radius: 999px; padding: 2px 12px; font-size: .84rem; font-weight: 700; margin-left: 6px; }
.fee-list { list-style: none; padding: 0; margin: 14px 0; } .fee-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .93rem; } .fee-list li span:first-child { color: var(--muted); }
.inst { display: flex; gap: 16px; align-items: center; } .avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), #7c3aed); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; flex: none; }

/* forms */
.field { margin-bottom: 14px; } .field label.lbl { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; color: var(--navy); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=date], .field select, .field textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus, .filters input:focus, .filters select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 3px; } .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.check { display: flex; gap: 8px; align-items: center; margin: 6px 0; } .check input { width: 18px; height: 18px; accent-color: var(--blue); }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; } .alert-error { background: #fef2f2; color: #991b1b; border: 1.5px solid #fecaca; } .alert-success { background: #f0fdf4; color: #166534; border: 1.5px solid #bbf7d0; } .alert-info { background: #eff6ff; color: #1e40af; border: 1.5px solid #bfdbfe; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 99; background: var(--navy); color: #fff; padding: 13px 18px; border-radius: 12px; max-width: 360px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); } .toast button { background: none; border: 0; color: #fff; font-size: 1.2rem; margin-left: 10px; cursor: pointer; }
.hp { position: absolute; left: -9999px; }

/* footer */
.footer { background: var(--navy); color: #cbd5f5; padding: 44px 0 16px; margin-top: 30px; } .footer a { color: #cbd5f5; text-decoration: none; } .footer a:hover { color: #fff; } .footer h4 { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 30px; } .foot-grid p { margin: 0 0 8px; } .foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; } .copy { margin-top: 26px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; opacity: .8; }

/* admin */
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #cbd5f5; padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; } .sidebar .brand { color: #fff; margin: 0 8px 22px; }
.sidebar a.link { display: block; padding: 11px 14px; border-radius: 10px; color: #cbd5f5; text-decoration: none; font-weight: 500; margin-bottom: 3px; } .sidebar a.link:hover { background: rgba(255, 255, 255, .08); color: #fff; } .sidebar a.link.on { background: var(--blue); color: #fff; }
.sidebar .who { margin: 22px 8px 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; }
.admin-main { padding: 28px; min-width: 0; } .page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; } .page-head h1 { font-size: 1.7rem; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; } .stat { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px; } .stat b { font-size: 1.9rem; color: var(--navy); display: block; } .stat span { color: var(--muted); font-size: .9rem; }
.panel { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; } .panel > h3 { margin-bottom: 14px; }
.table-wrap { overflow-x: auto; } table.t { width: 100%; border-collapse: collapse; font-size: .93rem; } table.t th { text-align: left; padding: 10px 12px; background: #f1f5f9; color: var(--navy); white-space: nowrap; } table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t img.th { width: 84px; height: 48px; object-fit: cover; border-radius: 8px; display: block; } table.t .ph-sm { width: 84px; height: 48px; border-radius: 8px; display: grid; place-items: center; font-size: 1.4rem; }
.act { display: flex; gap: 6px; flex-wrap: wrap; } .badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; } .b-ok { background: #dcfce7; color: #166534; } .b-off { background: #fee2e2; color: #991b1b; } .b-new { background: #fef3c7; color: #92400e; } .b-info { background: #e0e7ff; color: #3730a3; }
.preview { width: 100%; max-width: 360px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #e2e8f0; border: 1.5px solid var(--line); margin-bottom: 8px; } .preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 1000px) {
  .catalog, .detail-grid { grid-template-columns: 1fr; } .filters, .side { position: static; } .grid { grid-template-columns: repeat(2, 1fr); } .features { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; } .stats { grid-template-columns: 1fr 1fr; } .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .burger { display: block; } .nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 16px 20px; gap: 12px; box-shadow: 0 12px 20px rgba(15, 31, 75, .1); } .nav.open { display: flex; }
  .grid, .learn, .grid2, .grid3, .features { grid-template-columns: 1fr; } .hero { padding: 44px 0 80px; } .admin { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } .searchbox { flex-direction: column; } .topbar .wrap { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
