/* ATSU LMS theme — colours, type and layout follow atsu.edu.ge */
@font-face {
  font-family: "BPG LE Studio 02 Caps";
  src: url("../fonts/bpg-le-studio-02-caps.3070d920e63f.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "BPG Venuri";
  src: url("../fonts/bpg-venuri.eceeb0fb40eb.woff2") format("woff2");
  font-display: swap;
}

:root {
  --maroon: #700000;
  --maroon-dark: #5f0000;
  --maroon-soft: #f6eded;
  --accent-a: #ee5154;
  --accent-b: #fb7100;
  --text: #3d4145;
  --muted: #6c757d;
  --line: #e5e1e1;
  --bg: #f5f4f4;
  --card: #ffffff;
  --ok: #1f7a3a;
  --ok-bg: #e8f4ec;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --bad: #a1161b;
  --bad-bg: #fbe9e9;
  --radius: 6px;
  --shadow: 0 6px 24px rgba(60, 20, 20, 0.08);
  --caps: "BPG LE Studio 02 Caps", "BPG Venuri", sans-serif;
  --body: "BPG Venuri", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--maroon); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--caps); font-weight: 400; color: #1f1f1f; line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Top bar */
.topbar { background: var(--maroon); color: #fff; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 34px; gap: 12px; }
.topbar a { color: #fff; }
.topbar .contacts { display: flex; gap: 18px; }
.topbar .pills { display: flex; gap: 8px; align-items: center; }
.pill-link {
  border: 1px solid rgba(255,255,255,.75); border-radius: 4px; padding: 1px 10px;
  font-family: var(--caps); font-size: 12px; background: #fff; color: var(--maroon) !important;
}
.lang-form { display: inline; margin: 0; }
.lang-form button {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 4px;
  font: 12px var(--caps); padding: 1px 8px; cursor: pointer;
}
.lang-form button.active { background: #fff; color: var(--maroon); }

/* Header with the hanging shield */
.header { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.06); position: relative; z-index: 5; }
.header .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; position: relative; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { font-family: var(--caps); color: #222; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { color: var(--maroon); border-bottom-color: var(--maroon); text-decoration: none; }
.shield {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 92px; display: block;
}
.shield img { display: block; width: 92px; height: auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,.18)); }
.user-menu { display: flex; align-items: center; gap: 14px; }
.user-chip { font-size: 13px; text-align: right; line-height: 1.2; }
.user-chip strong { display: block; font-family: var(--caps); font-weight: 400; color: #222; }
.menu-toggle { display: none; background: none; border: 0; font-size: 26px; color: var(--maroon); cursor: pointer; }

/* Page header band */
.page-band {
  background: linear-gradient(rgba(112,0,0,.88), rgba(95,0,0,.92)), url("../img/logo-bg.cef057692cff.png") right 40px center / 120px no-repeat, var(--maroon);
  color: #fff; padding: 46px 0 26px;
}
.page-band h1 { color: #fff; margin: 0; font-size: 28px; }
.page-band .sub { opacity: .85; margin-top: 6px; }
.page-band a { color: #fff; }
.crumbs { font-size: 13px; opacity: .85; margin-bottom: 8px; }

main { flex: 1; padding: 28px 0 48px; }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 18px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title h2, .card-title h3 { margin: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; }

.course-card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); color: var(--text); transition: transform .15s ease, box-shadow .15s ease;
}
.course-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(60,20,20,.14); text-decoration: none; }
.course-card .cover {
  background: linear-gradient(135deg, rgba(112,0,0,.92), rgba(70,10,10,.85)), url("../img/logo-bg.cef057692cff.png") right -12px bottom -18px / 110px no-repeat, var(--maroon);
  color: #fff; padding: 18px; min-height: 104px; display: flex; flex-direction: column; justify-content: flex-end;
}
.course-card .cover .code { font-size: 12px; opacity: .85; letter-spacing: .06em; }
.course-card .cover h3 { color: #fff; margin: 4px 0 0; font-size: 17px; }
.course-card .body { padding: 14px 18px; font-size: 13px; color: var(--muted); }

.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border-top: 3px solid var(--maroon); }
.stat .num { font-family: var(--caps); font-size: 28px; color: var(--maroon); }
.stat .label { color: var(--muted); font-size: 13px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 14px var(--caps); padding: 9px 18px; border-radius: 4px; border: 1px solid var(--maroon);
  background: var(--maroon); color: #fff; cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--maroon-dark); text-decoration: none; color: #fff; }
.btn-accent {
  border: 0; border-radius: 999px; padding: 11px 26px; color: #fff;
  background-image: linear-gradient(94deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 14px 30px -10px rgba(255,139,44,.6);
}
.btn-accent:hover { box-shadow: 0 10px 24px -10px rgba(255,139,44,.5); background-image: linear-gradient(94deg, var(--accent-a), var(--accent-b)); }
.btn-outline { background: #fff; color: var(--maroon); }
.btn-outline:hover { background: var(--maroon-soft); color: var(--maroon); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--maroon); padding: 6px 10px; }
.btn-ghost:hover { background: var(--maroon-soft); color: var(--maroon); }
.btn-danger { background: #fff; color: var(--bad); border-color: #e0b4b4; }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn-sm { font-size: 12px; padding: 5px 11px; }
.btn-block { width: 100%; }
.inline { display: inline; }

/* Course tabs */
.tabs { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; }
.tabs .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  font-family: var(--caps); color: #333; padding: 14px 14px 12px; border-bottom: 3px solid transparent; white-space: nowrap; font-size: 14px;
}
.tabs a:hover { text-decoration: none; color: var(--maroon); }
.tabs a.active { color: var(--maroon); border-bottom-color: var(--maroon); }

/* Lists & tables */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-family: var(--caps); font-weight: 400; color: #444; background: #faf7f7; font-size: 13px; white-space: nowrap; }
tr:hover td { background: #fdfafa; }
td.num, th.num { text-align: center; }
.gradebook input[type=number] { width: 78px; text-align: center; padding: 7px 6px; }

.section-block { border-left: 3px solid var(--maroon); padding-left: 16px; }
.section-block + .section-block { margin-top: 26px; }
.material { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; background: #faf8f8; }
.material + .material { margin-top: 8px; }
.material .icon {
  width: 38px; height: 38px; border-radius: 6px; display: grid; place-items: center; flex: none;
  background: var(--maroon-soft); color: var(--maroon); font: 11px var(--caps);
}
.material .icon.video { background: #fff0e4; color: #c25400; }
.material .meta { font-size: 12px; color: var(--muted); }

/* Badges */
.badge { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: #eee; color: #444; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-maroon { background: var(--maroon-soft); color: var(--maroon); }
.grade-letter { display: inline-grid; place-items: center; min-width: 38px; height: 30px; padding: 0 8px; border-radius: 6px; font: 15px var(--caps); }
.grade-a, .grade-b { background: var(--ok-bg); color: var(--ok); }
.grade-c, .grade-d, .grade-e { background: var(--warn-bg); color: var(--warn); }
.grade-fx, .grade-f { background: var(--bad-bg); color: var(--bad); }
.big-grade { font: 54px var(--caps); color: var(--maroon); line-height: 1; }

/* Forms */
.form-card { max-width: 760px; }
.field { margin-bottom: 16px; }
.field label, .field-label { display: block; font-family: var(--caps); font-size: 13px; margin-bottom: 6px; color: #333; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .errorlist { color: var(--bad); font-size: 13px; list-style: none; padding: 0; margin: 4px 0 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url],
input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d6d0d0; border-radius: 4px; font: inherit; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(112,0,0,.25); border-color: var(--maroon); }
input[type=file] { font: inherit; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.check-list label, .radio-row label { font-family: var(--body); font-size: 14px; display: flex; gap: 8px; align-items: center; margin: 0; }
.field ul:not(.errorlist) { list-style: none; padding: 0; margin: 0; }
.field input[type=checkbox] { width: auto; }
.errornote, .nonfield { background: var(--bad-bg); color: var(--bad); padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; }
.status-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.status-picker label { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.status-picker input { accent-color: var(--maroon); }

/* Messages */
.messages { list-style: none; padding: 0; margin: 0 0 18px; }
.messages li { padding: 12px 16px; border-radius: 4px; margin-bottom: 8px; background: #eef2f7; }
.messages .success { background: var(--ok-bg); color: var(--ok); }
.messages .error { background: var(--bad-bg); color: var(--bad); }
.messages .warning { background: var(--warn-bg); color: var(--warn); }

/* Quiz */
.question { padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.question + .question { margin-top: 14px; }
.question .q-head { display: flex; justify-content: space-between; gap: 10px; font-family: var(--caps); font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.question .q-text { font-size: 16px; margin-bottom: 12px; white-space: pre-line; }
.option { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 4px; cursor: pointer; }
.option:hover { background: #faf5f5; }
.option input { margin-top: 4px; accent-color: var(--maroon); }
.option.correct { background: var(--ok-bg); }
.option.wrong { background: var(--bad-bg); }
.timer {
  position: sticky; top: 56px; z-index: 3; background: var(--maroon); color: #fff; font: 18px var(--caps);
  padding: 10px 16px; border-radius: 6px; display: inline-block; box-shadow: var(--shadow);
}
.timer.low { background: var(--bad); }

video { width: 100%; max-height: 70vh; background: #000; border-radius: 6px; }
.pdf-frame { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 6px; }
.prose { white-space: pre-line; }

/* Login */
.login-wrap { flex: 1; display: grid; place-items: center; padding: 60px 16px; background:
  linear-gradient(rgba(112,0,0,.86), rgba(60,0,0,.9)), url("../img/logo-bg.cef057692cff.png") left 8% top 20% / 260px no-repeat, var(--maroon); }
.login-card { background: #fff; border-radius: 8px; box-shadow: 0 30px 60px rgba(0,0,0,.25); width: 100%; max-width: 420px; padding: 34px 32px 28px; text-align: center; }
.login-card img.logo { width: 220px; margin: 0 auto 18px; display: block; }
.login-card h1 { font-size: 20px; margin-bottom: 4px; }
.login-card form { text-align: left; margin-top: 22px; }

/* Footer */
.footer { background: var(--maroon-dark); color: rgba(255,255,255,.88); font-size: 13px; padding: 30px 0 18px; }
.footer a { color: #fff; }
.footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 26px; }
.footer h4 { color: #fff; font-size: 14px; margin-bottom: 10px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 6px; }
.footer .bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 22px; padding-top: 14px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty .big { font-family: var(--caps); font-size: 16px; color: #555; margin-bottom: 6px; }

/* Responsive */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-side { grid-template-columns: 1fr; }
}
@media (max-width: 1020px) {
  .header .container { min-height: 58px; }
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column;
    align-items: stretch; gap: 0; padding: 50px 16px 12px; box-shadow: 0 10px 20px rgba(0,0,0,.08);
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .shield { width: 70px; }
  .shield img { width: 70px; }
}
@media (max-width: 760px) {
  .topbar .contacts span.hide-sm, .topbar .pills .pill-link { display: none; }
  .user-chip { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-band { padding: 34px 0 20px; background-size: auto, 80px, auto; }
  .page-band h1 { font-size: 22px; }
  .footer .cols { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  h1 { font-size: 22px; }
}
