/* ==========================================================================
   طلاب متفوقين — TULLAB Design System
   أزرق داكن + سماوي + ذهبي، RTL أولاً
   ========================================================================== */
:root {
  --navy: #0b1f3a;
  --navy-2: #123055;
  --navy-3: #07152a;
  --cyan: #17b6e8;
  --cyan-soft: #e6f7fe;
  --gold: #d9b45b;
  --gold-soft: #fbf4e2;
  --bg: #f4f7fb;
  --ink: #10253a;
  --muted: #6b7b8c;
  --line: #e4ebf3;
  --success: #1f9d6b;
  --danger: #d94b5c;
  --radius: 18px;
  --shadow-sm: 0 4px 14px rgba(11, 31, 58, .06);
  --shadow: 0 12px 34px rgba(11, 31, 58, .10);
  --sidebar-w: 272px;
}

* { -webkit-tap-highlight-color: transparent; }

body {
  font-family: "Tajawal", "Cairo", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--navy); }
a { text-decoration: none; }
.text-muted { color: var(--muted) !important; }

/* ---------------------------------------------------------------- Shell */
.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--sidebar-w);
  background:
    radial-gradient(900px 300px at 100% 0%, rgba(23, 182, 232, .18), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #c7d5e5;
  padding: 1.1rem .9rem 2rem;
  overflow-y: auto;
  z-index: 1040;
  transition: transform .25s ease;
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 8px; }

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .4rem .5rem 1.1rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 1rem;
}
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px; flex: 0 0 44px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cyan), #0d7fb8);
  color: #fff; font-size: 1.35rem; font-weight: 800;
  box-shadow: 0 8px 18px rgba(23, 182, 232, .35);
}
.brand-text small { display: block; color: var(--gold); font-size: .72rem; letter-spacing: .5px; }
.brand-text strong { font-size: 1.02rem; line-height: 1.2; }

.sidebar-section {
  color: #7d93ad;
  font-size: .72rem;
  font-weight: 700;
  padding: .9rem .75rem .4rem;
  letter-spacing: .4px;
}
.sidebar .nav-link {
  color: #c7d5e5;
  border-radius: 12px;
  padding: .62rem .8rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .93rem;
  margin-bottom: 2px;
  transition: background .15s ease, color .15s ease;
}
.sidebar .nav-link i { font-size: 1.08rem; width: 22px; text-align: center; color: #8fb3d4; }
.sidebar .nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar .nav-link.active {
  background: linear-gradient(90deg, rgba(23, 182, 232, .22), rgba(23, 182, 232, .06));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--cyan);
}
.sidebar .nav-link.active i { color: var(--cyan); }
.sidebar .nav-link .badge { margin-inline-start: auto; }

.sidebar-user {
  margin-top: 1.4rem;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: .7rem;
  display: flex; gap: .6rem; align-items: center;
  color: #dbe7f3;
}
.sidebar-user .avatar { width: 38px; height: 38px; font-size: .85rem; }
.sidebar-user small { color: #93a9c0; }

.main-wrap { margin-inline-start: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: .65rem 1.4rem;
}
.topbar .page-title { font-size: 1rem; font-weight: 700; margin: 0; }
.content { padding: 1.5rem 1.4rem 2.5rem; flex: 1; }
.app-footer { border-top: 1px solid var(--line); padding: .8rem 1.4rem; color: var(--muted); font-size: .8rem; background: #fff; }

.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-105%); }
  [dir="rtl"] .sidebar { transform: translateX(105%); }
  .sidebar.show { transform: translateX(0) !important; }
  .main-wrap { margin-inline-start: 0; }
  .sidebar-backdrop.show {
    display: block; position: fixed; inset: 0; background: rgba(7, 21, 42, .45); z-index: 1035;
  }
  .content { padding: 1rem .9rem 2rem; }
  .topbar { padding: .6rem .9rem; }
}

/* ---------------------------------------------------------------- Public */
.public-nav { background: rgba(11, 31, 58, .96); backdrop-filter: blur(10px); }
.public-nav .navbar-brand { color: #fff; font-weight: 800; }
.public-nav .nav-link { color: #c9d8e8; }
.public-nav .nav-link:hover { color: #fff; }

.hero {
  position: relative;
  background:
    radial-gradient(800px 400px at 85% 10%, rgba(23, 182, 232, .35), transparent 60%),
    radial-gradient(700px 380px at 10% 90%, rgba(217, 180, 91, .18), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, #0d2a4d 55%, #071b34 100%);
  color: #fff;
  overflow: hidden;
  padding: 5.5rem 0 4.5rem;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%);
  pointer-events: none;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.35; }
.hero p.lead { color: #c9d8e8; max-width: 640px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15);
  color: var(--gold); border-radius: 999px; padding: .35rem .9rem; font-size: .8rem; font-weight: 700;
}
.hero-card {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 22px;
  padding: 1.1rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.hero-tile { background: rgba(255,255,255,.08); border-radius: 16px; padding: .9rem; border: 1px solid rgba(255,255,255,.08); }
.stat-glass { font-size: 1.6rem; font-weight: 800; color: #fff; }
.stat-label { color: #9fb6cd; font-size: .8rem; }

.section { padding: 4rem 0; }
.section-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; height: 100%; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--cyan-soft); color: #0d7fb8; font-size: 1.25rem; margin-bottom: .9rem;
}
.feature-icon.gold { background: var(--gold-soft); color: #a8801f; }

.role-pill { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .55rem 1rem; color: var(--navy); font-weight: 600; box-shadow: var(--shadow-sm); }

.footer { background: var(--navy-3); color: #9fb6cd; padding: 2.6rem 0 1.4rem; }
.footer a { color: #c9d8e8; }

/* ---------------------------------------------------------------- Cards */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header { background: transparent; border-bottom: 1px solid var(--line); padding: 1rem 1.2rem; font-weight: 700; color: var(--navy); }
.card-body { padding: 1.2rem; }

.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; height: 100%; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 1rem;
}
.stat-icon {
  width: 52px; height: 52px; border-radius: 16px; flex: 0 0 52px;
  display: grid; place-items: center; font-size: 1.35rem;
  background: var(--cyan-soft); color: #0d7fb8;
}
.stat-icon.gold { background: var(--gold-soft); color: #a8801f; }
.stat-icon.green { background: #e7f7ef; color: var(--success); }
.stat-icon.red { background: #fdecef; color: var(--danger); }
.stat-value { font-size: 1.55rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat-title { font-size: .82rem; color: var(--muted); }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cyan), #0d7fb8); color: #fff; font-weight: 700;
  font-size: .9rem; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.badge-soft { background: var(--cyan-soft); color: #0d7fb8; font-weight: 700; }
.badge-soft-gold { background: var(--gold-soft); color: #8a6714; font-weight: 700; }
.badge-soft-green { background: #e7f7ef; color: #147a52; font-weight: 700; }
.badge-soft-red { background: #fdecef; color: #b02a3c; font-weight: 700; }
.badge-soft-gray { background: #eef3f8; color: #536979; font-weight: 700; }

.btn-primary {
  --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy);
  --bs-btn-hover-bg: #16365d; --bs-btn-hover-border-color: #16365d;
  --bs-btn-active-bg: #0a1c33; --bs-btn-focus-shadow-rgb: 11, 31, 58;
  border-radius: 12px; font-weight: 700;
}
.btn-cyan { background: var(--cyan); border-color: var(--cyan); color: #fff; font-weight: 700; border-radius: 12px; }
.btn-cyan:hover { background: #0e9fd0; border-color: #0e9fd0; color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #3b2c07; font-weight: 700; border-radius: 12px; }
.btn-gold:hover { background: #caa447; color: #3b2c07; }
.btn-outline-navy { border: 1px solid var(--navy); color: var(--navy); border-radius: 12px; font-weight: 700; }
.btn-outline-navy:hover { background: var(--navy); color: #fff; }
.btn { border-radius: 12px; }
.btn-lg { padding: .7rem 1.4rem; }

.form-control, .form-select {
  border-radius: 12px; border-color: #d8e3ee; padding: .6rem .85rem; font-size: .95rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--cyan); box-shadow: 0 0 0 .2rem rgba(23, 182, 232, .15);
}
.form-label { font-weight: 700; font-size: .86rem; color: #35506b; margin-bottom: .35rem; }
.form-text { font-size: .78rem; }

/* ---------------------------------------------------------------- Structure */
.page-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.page-head h1 { font-size: 1.35rem; margin: 0; }
.breadcrumb { --bs-breadcrumb-divider-color: #8ba0b5; font-size: .82rem; margin: 0; }
.breadcrumb a { color: var(--muted); }

.subject-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; height: 100%; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.subject-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.subject-card::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 5px; background: var(--subject-color, var(--cyan)); }
.subject-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; background: color-mix(in srgb, var(--subject-color, var(--cyan)) 12%, #fff); color: var(--subject-color, var(--cyan)); }

.progress { background: #eaf1f8; border-radius: 999px; height: 9px; }
.progress-bar { background: linear-gradient(90deg, #0d7fb8, var(--cyan)); border-radius: 999px; }
.progress-bar.gold { background: linear-gradient(90deg, #b3892a, var(--gold)); }

.ring {
  --p: 0;
  width: 92px; height: 92px; border-radius: 50%;
  background: conic-gradient(var(--cyan) calc(var(--p) * 1%), #e6eef6 0);
  display: grid; place-items: center; position: relative; flex: 0 0 92px;
}
.ring::before { content: ""; position: absolute; inset: 9px; background: #fff; border-radius: 50%; }
.ring span { position: relative; font-weight: 800; color: var(--navy); }
.ring.ring-hero::before { background: #0e2a4b; }
.ring.ring-hero span { color: #fff; font-size: 1rem; }

.lesson-row {
  display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: .6rem;
  transition: border-color .15s ease, background .15s ease;
}
.lesson-row:hover { border-color: #bcd7ea; background: #fbfdff; }
.lesson-index { width: 36px; height: 36px; border-radius: 10px; background: #eef5fb; color: #35506b; display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: 0 0 36px; }
.lesson-row.done .lesson-index { background: #e7f7ef; color: var(--success); }

.unit-head { display: flex; align-items: center; gap: .8rem; margin: 1.6rem 0 .8rem; }
.unit-head .num { width: 38px; height: 38px; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* ---------------------------------------------------------------- Lesson / media */
.video-shell {
  position: relative; border-radius: var(--radius); overflow: hidden; background: #000;
  box-shadow: var(--shadow);
}
.video-shell video { width: 100%; display: block; max-height: 72vh; background: #000; }
.watermark {
  position: absolute; inset-block-start: 12px; inset-inline-end: 14px;
  color: rgba(255, 255, 255, .55); font-size: .78rem; pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7); letter-spacing: .3px;
  animation: drift 26s linear infinite alternate; z-index: 3;
}
@keyframes drift {
  0% { transform: translate(0, 0); opacity: .45; }
  50% { transform: translate(-16px, 22px); opacity: .7; }
  100% { transform: translate(10px, 42px); opacity: .5; }
}
.media-protect { user-select: none; -webkit-user-drag: none; }
.pdf-frame { width: 100%; height: 76vh; border: 0; border-radius: 14px; background: #e9eef5; }

.doc-card { display: flex; gap: .8rem; align-items: center; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.doc-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; flex: 0 0 42px; }

.objectives li { margin-bottom: .35rem; }

/* ---------------------------------------------------------------- Quizzes */
.question-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; }
.question-num { width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: #fff; display: inline-grid; place-items: center; font-weight: 800; font-size: .85rem; }
.option {
  display: flex; gap: .7rem; align-items: flex-start; border: 1px solid #dde7f1; border-radius: 12px;
  padding: .7rem .85rem; margin-bottom: .5rem; cursor: pointer; background: #fbfdff;
  transition: border-color .15s ease, background .15s ease;
}
.option:hover { border-color: var(--cyan); background: #f5fcff; }
.option input { margin-top: .25rem; }
.option.selected { border-color: var(--cyan); background: #effafe; }
.option.correct { border-color: var(--success); background: #f2fbf7; }
.option.wrong { border-color: var(--danger); background: #fff5f6; }

.exam-timer {
  position: sticky; top: 78px; z-index: 20;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .7rem .9rem;
  box-shadow: var(--shadow-sm); font-weight: 800; color: var(--navy);
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
}
.exam-timer.warning { color: #a35200; border-color: #f0c987; background: #fffaf1; }
.exam-timer.danger { color: #b02a3c; border-color: #f3b9c1; background: #fff5f6; }

.result-hero {
  background: linear-gradient(135deg, var(--navy), #123a66); color: #fff;
  border-radius: 22px; padding: 2rem; position: relative; overflow: hidden;
}
.result-hero::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: rgba(23, 182, 232, .25); inset-block-start: -90px; inset-inline-end: -60px; }
.result-score { font-size: 3rem; font-weight: 800; line-height: 1; }

/* ---------------------------------------------------------------- Auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.auth-side {
  background:
    radial-gradient(600px 300px at 20% 10%, rgba(23, 182, 232, .3), transparent 60%),
    linear-gradient(150deg, var(--navy) 0%, #0a2342 60%, #071a31 100%);
  color: #dbe7f3; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-side h2 { color: #fff; font-size: 2rem; line-height: 1.5; }
.auth-feature { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .9rem; color: #c9d8e8; }
.auth-feature i { color: var(--gold); font-size: 1.05rem; margin-top: .2rem; }
.auth-form { padding: 3rem clamp(1.4rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; }
.auth-form .form-control { padding: .75rem .9rem; }
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-form { padding: 2rem 1.2rem; }
}

.auth-link { color: #0d7fb8; font-weight: 700; }

/* ---------------------------------------------------------------- Tables */
.table { --bs-table-color: var(--ink); font-size: .9rem; }
.table > thead th { background: #f6f9fc; color: #4a637a; font-size: .8rem; font-weight: 800; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table > tbody > tr > td { vertical-align: middle; border-color: #eef3f8; }
.table-hover > tbody > tr:hover > * { background: #f8fbfe; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.4rem; color: #b9cbdb; display: block; margin-bottom: .8rem; }

/* ---------------------------------------------------------------- Misc */
.alert { border: 0; border-radius: 14px; box-shadow: var(--shadow-sm); }
.alert-success { background: #eafaf2; color: #146c49; }
.alert-danger { background: #fdeef0; color: #a1293a; }
.alert-warning { background: #fff8e9; color: #8a5a00; }
.alert-info { background: #eaf7fd; color: #0a5d80; }

.dropdown-menu { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: .4rem; }
.dropdown-item { border-radius: 9px; padding: .5rem .7rem; font-size: .9rem; }
.dropdown-item:hover { background: #f2f8fd; }

.list-group-item { border-color: #eef3f8; }
.nav-tabs { border-bottom-color: var(--line); }
.nav-tabs .nav-link { color: var(--muted); font-weight: 700; border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--navy); background: transparent; border-bottom-color: var(--cyan); }

.timeline { position: relative; padding-inline-start: 1.2rem; }
.timeline::before { content: ""; position: absolute; inset-block: .3rem; inset-inline-start: .3rem; width: 2px; background: #e2ebf4; }
.timeline-item { position: relative; padding-bottom: 1rem; }
.timeline-item::before { content: ""; position: absolute; inset-inline-start: -1.05rem; inset-block-start: .35rem; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px #e6f7fe; }

.print-only { display: none; }
@media print {
  .sidebar, .topbar, .app-footer, .no-print, .public-nav { display: none !important; }
  .main-wrap { margin: 0 !important; }
  .content { padding: 0 !important; }
  body { background: #fff; font-size: 12px; }
  .print-only { display: block; }
  .card { box-shadow: none; border-color: #ccc; }
} 

/* ---------------------------------------------------------------- Imagery */
.hero-visual {
  position: relative; border-radius: 26px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 30px 70px rgba(3, 15, 30, .45);
  background: #0d2747;
}
.hero-visual img { width: 100%; height: 100%; display: block; object-fit: cover; aspect-ratio: 4 / 3; }
.hero-visual::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7, 21, 42, 0) 35%, rgba(7, 21, 42, .75) 100%);
}
.hero-chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: .55rem;
  background: rgba(255, 255, 255, .94); color: var(--navy); border-radius: 14px;
  padding: .55rem .75rem; font-size: .78rem; font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22); backdrop-filter: blur(6px);
}
.hero-chip i { color: #0d7fb8; }
.hero-chip.top { top: 16px; inset-inline-start: 16px; }
.hero-chip.bottom { bottom: 16px; inset-inline-end: 16px; }
.hero-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #1f9d6b; box-shadow: 0 0 0 3px rgba(31, 157, 107, .16); }

.split-media { position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.split-media img { width: 100%; display: block; object-fit: cover; aspect-ratio: 4 / 3; }
.split-media .media-float {
  position: absolute; inset-inline-start: 18px; bottom: 18px; z-index: 2;
  background: rgba(255, 255, 255, .95); border-radius: 14px; padding: .65rem .9rem;
  font-size: .8rem; font-weight: 700; color: var(--navy); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: .5rem;
}

.gallery-card { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); height: 100%; }
.gallery-card img { width: 100%; height: 250px; object-fit: cover; display: block; transition: transform .5s ease; }
.gallery-card:hover img { transform: scale(1.05); }
.gallery-card .gallery-body {
  position: absolute; inset-inline: 0; bottom: 0; padding: 2.2rem 1.1rem 1.1rem; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(7, 21, 42, .93));
}
.gallery-card .gallery-body h6 { color: #fff; margin-bottom: .2rem; }
.gallery-card .gallery-body p { color: #c9d8e8; font-size: .8rem; margin: 0; }

.photo-banner { position: relative; border-radius: 22px; overflow: hidden; min-height: 190px; display: flex; align-items: flex-end; color: #fff; box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .12); }
.photo-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 21, 42, .94), rgba(7, 21, 42, .35)); }
.photo-banner .photo-content { position: relative; z-index: 2; padding: 1.5rem; }
.photo-banner h2, .photo-banner h3 { color: #fff; }

.subject-cover { height: 104px; margin: -1.1rem -1.1rem .9rem; overflow: hidden; position: relative; background: #e6f0f8; }
.subject-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.subject-card:hover .subject-cover img { transform: scale(1.06); }
.subject-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 31, 58, .04), rgba(11, 31, 58, .42)); }
.subject-cover .subject-grade-badge { position: absolute; z-index: 2; top: .65rem; inset-inline-end: .65rem; background: rgba(255, 255, 255, .95); color: var(--navy); border-radius: 999px; padding: .18rem .6rem; font-size: .7rem; font-weight: 800; }
.subject-icon.subject-icon-float { margin-top: -38px; position: relative; z-index: 2; border: 3px solid #fff; box-shadow: 0 8px 18px rgba(11, 31, 58, .12); margin-bottom: .6rem; }
.subject-card.compact { padding: .95rem; }
.subject-card.compact .subject-cover { height: 82px; margin: -.95rem -.95rem .75rem; }

.subject-hero { position: relative; border-radius: 24px; overflow: hidden; min-height: 240px; display: flex; align-items: flex-end; color: #fff; margin-bottom: 1.4rem; box-shadow: var(--shadow); }
.subject-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.subject-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 21, 42, .92), rgba(7, 21, 42, .25)); }
.subject-hero .subject-hero-content { position: relative; z-index: 2; padding: 2rem; width: 100%; }
.subject-hero h1, .subject-hero .text-muted, .subject-hero .breadcrumb a, .subject-hero .breadcrumb span { color: #fff !important; }
.subject-hero .breadcrumb { opacity: .75; }
.subject-hero .subject-icon { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }

.continue-thumb { width: 116px; height: 84px; border-radius: 14px; object-fit: cover; flex: 0 0 116px; box-shadow: var(--shadow-sm); }

.auth-side.has-photo { background-size: cover; background-position: center; position: relative; }
.auth-side.has-photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 21, 42, .93) 0%, rgba(7, 21, 42, .72) 48%, rgba(7, 21, 42, .96) 100%); }
.auth-side.has-photo > * { position: relative; z-index: 2; }

.cta-photo { position: relative; border-radius: 24px; overflow: hidden; color: #fff; box-shadow: var(--shadow); }
.cta-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 21, 42, .95), rgba(7, 21, 42, .55)); }
.cta-photo .cta-content { position: relative; z-index: 2; padding: 2.4rem; }
.cta-photo h3 { color: #fff; }

@media (max-width: 767.98px) {
  .hero-visual img { aspect-ratio: 16 / 10; }
  .gallery-card img { height: 210px; }
  .subject-hero { min-height: 210px; }
  .continue-thumb { display: none; }
}
