* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #f97316;
  --background: #f5f7fb;
  --surface: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --success: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --sidebar-width: 270px;
  --font-display: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;
}

/* Ensure fade-in elements are visible once active */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all linear 0.6s;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

.delay1 {
  transition-delay: 0.6s;
}
.delay2 {
  transition-delay: 0.9s;
}
.delay3 {
  transition-delay: 1.2s;
}
.delay4 {
  transition-delay: 1.5s;
}
.delay5 {
  transition-delay: 1.8s;
}
.delay6 {
  transition-delay: 2.1s;
}

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.25;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
input {
  font-family: inherit;
}
a {
  text-decoration: none;
  color: inherit;
}

.muted {
  color: var(--text-secondary);
  font-size: 13.5px;
}

/*  APP LAYOUT  */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/*  SIDEBAR  */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;

  /* hide scrollbar cross-browser */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar {
  display: none;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  gap: 12px;
}
.brand span {
  display: block;
  font-weight: 700;
  line-height: 1.3;
  max-width: 230px;
}
.brand-mark img {
  width: 100px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 16px;
  flex: 1;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: 16px 10px 8px;
}
.nav-label:first-child {
  padding-top: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition:
    background 0.15s ease,
    color 0.15s ease;
  text-align: left;
}
.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}
.nav-item:hover {
  background: var(--background);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.sidebar-footer {
  cursor: pointer;
  padding: 16px;
  flex-shrink: 0;
}
.storage-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 14px;
}
.storage-card i {
  color: var(--secondary);
  font-size: 20px;
}
.storage-title {
  font-size: 13.5px;
  font-weight: 700;
}
.storage-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* MAIN  */
.main {
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 36px 60px;
}

/*  TOPBAR  */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.search-bar {
  position: relative; /* anchors the .search-results dropdown below */
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 18px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-sm);
}
.search-bar i {
  color: var(--text-secondary);
  font-size: 14px;
}
.search-bar input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  color: var(--text-primary);
}
.search-bar input::placeholder {
  color: var(--text-secondary);
}

.dashboard-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.dashboard-nav a {
  text-transform: capitalize;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: capitalize;
  transition: all linear 0.3s;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
  color: var(--text-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 15px;
}
.icon-btn .dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--surface);
}

.divider-v {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* ============ PAGES ============ */
.page {
  display: none;
}
.page.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}
.page-head h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.btn-flex {
  display: flex;
  align-items: center;
  gap: 20px;
}

.course-attendance {
  width: 100%;
  display: none;
}

.course-attendance.active {
  display: inline-block;
}

.gpaGrid {
  width: 100%;
  display: none;
}

.gpaGrid.active {
  display: inline-block;
}

/* ============ BUTTONS ============ */
.btn-primary,
.btn-outline,
.btn-light,
.btn-danger,
.close-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition:
    transform 0.1s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
}
.btn-outline {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--background);
}
.btn-light {
  background: #fff;
  color: var(--primary);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}

/* "View calendar" pill button on the dashboard header (re-uses close-btn styling
   from the original markup, kept as-is so the look does not change) */
.close-btn {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.close-btn:hover {
  background: var(--background);
}

/*  CARDS & GRIDS  */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-head h3 {
  font-size: 16px;
  font-weight: 700;
}
.link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.link:hover {
  text-decoration: underline;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.grid-3 {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.grid-mixed {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/*  NEXT CLASS CARD  */
.next-class {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nc-time {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nc-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nc-subject {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.subject-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.nc-title {
  font-size: 14.5px;
  font-weight: 700;
}
.nc-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
}
.vs {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 700;
}

/*  PERFORMANCE BAR  */
.perf-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}
.seg {
  font-size: 0;
}
.seg-a {
  background: var(--success);
}
.seg-b {
  background: var(--primary);
}
.seg-c {
  background: var(--warning);
}

.perf-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  text-align: center;
}
.ps-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}
.ps-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/*  TABLE  */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  font-weight: 700;
  padding: 0 10px 12px;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table tbody tr:hover {
  background: var(--background);
}

.dot-tag {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge-success {
  background: #dcfce7;
  color: #15803d;
}
.badge-warning {
  background: #fef9c3;
  color: #a16207;
}
.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}
.badge-neutral {
  background: #f1f5f9;
  color: var(--text-secondary);
}

/*  STAT CARDS  */
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.stat-label {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 600;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-top: 2px;
}

/*  PROMO BANNER  */
.promo-banner {
  background: linear-gradient(120deg, var(--primary), #1e40af);
  border-radius: var(--radius-lg);
  padding: 30px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.promo-tag {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
  margin-bottom: 6px;
}
.promo-banner h2 {
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.35;
}
.btn-light {
  padding: 10px 20px;
}
.promo-art {
  position: relative;
  width: 140px;
  height: 100px;
  flex-shrink: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.25;
  background: #fff;
}
.blob-1 {
  width: 90px;
  height: 90px;
  top: -10px;
  right: 10px;
}
.blob-2 {
  width: 60px;
  height: 60px;
  bottom: -10px;
  right: 60px;
  opacity: 0.18;
}
.promo-icon {
  position: absolute;
  font-size: 46px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  opacity: 0.95;
}

/*  COURSES  */
.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.course-card h3 {
  font-size: 16px;
  margin: 14px 0 2px;
}
.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--background);
  margin-top: 16px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
}
.progress-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/*  TIMETABLE  */
.timetable-card {
  overflow-x: auto;
}
.timetable th,
.timetable td {
  text-align: center;
}
.timetable td:first-child,
.timetable th:first-child {
  text-align: left;
  color: var(--text-secondary);
  font-weight: 600;
}
.tt-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.muted-pill {
  background: var(--background);
  color: var(--text-secondary);
  font-weight: 600;
}

/*  ANNOUNCEMENTS  */
.announce-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.announce-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.announce-card.is-read {
  opacity: 0.55;
}
.ann-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.ann-body {
  flex: 1;
}
.ann-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.ann-top h3 {
  font-size: 15px;
}
.ann-time {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/*  MODALS (shared by calendar)  */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 200;
}
.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 340px;
  text-align: center;
  box-shadow: var(--shadow);
}
.modal h3 {
  font-size: 17px;
  margin-bottom: 6px;
}
.modal .muted {
  margin-bottom: 22px;
}
.modal-actions {
  display: flex;
  gap: 10px;
}
.modal-actions button {
  flex: 1;
  justify-content: center;
}

/* NEW COMPONENT: POP-OVERS (Notifications / Messages / Filter / Term) */
.popover-wrap {
  position: relative; /* anchors the .popover below the button */
}

.popover-wrap.show {
  position: fixed;
  inset: 0;
  z-index: 140;
}

.popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  z-index: 120;

  /* hidden by default, shown by toggling the .show class in script.js */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
}
.popover.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.popover-head h4 {
  font-size: 15px;
  font-weight: 700;
}
.popover-count {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 9px;
  border-radius: 999px;
}

.popover-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
}
.popover-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.popover-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.popover-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.popover-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Simple menu-style pop-over used by the Filter and "This term" buttons */
.popover-menu {
  width: 220px;
  padding: 8px;
}
.popover-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
}
.popover-menu-item.active,
.popover-menu-item:hover {
  background: var(--background);
}
.popover-menu-item i {
  width: 16px;
  color: var(--text-secondary);
}

.popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(
    255,
    255,
    255,
    0.01
  ); /* practically invisible, just catches clicks */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: none;
}
.popover-backdrop.show {
  display: block;
}

/* 
   NEW COMPONENT: SEARCH RESULTS DROPDOWN
    */
.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 320px;
  overflow-y: auto;
  z-index: 120;
  display: none; /* toggled to block/flex by script.js when there are results */
}
.search-results.show {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background: var(--background);
}
.search-result-item i {
  color: var(--text-secondary);
  width: 16px;
}
.search-result-item .sr-tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.search-no-results {
  padding: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

/* 
   NEW COMPONENT: CALENDAR POP-UP
   Re-uses the .modal-overlay / .modal pattern above, with its own
   internal grid for the day numbers.
    */
.calendar-modal-box {
  width: 360px;
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  position: relative;
}
.calendar-header h3 {
  font-size: 16px;
  flex: 1;
  text-align: center;
}
.cal-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--background);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.cal-nav-btn:hover {
  background: var(--border);
}
.modal-close-btn {
  position: absolute;
  right: -6px;
  top: -6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--background);
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close-btn:hover {
  background: #fee2e2;
  color: var(--danger);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.calendar-weekdays span {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: 50%;
  color: var(--text-primary);
}
.cal-day.cal-day-empty {
  visibility: hidden;
}
.cal-day.cal-day-today {
  background: var(--primary);
  color: #fff;
}
.cal-day:not(.cal-day-empty):not(.cal-day-today):hover {
  background: var(--background);
}

/* ========================================
   INSTRUCTORS SLIDER
   ======================================== */

.instructors-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.instructors-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.instructors-header h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.slider-nav {
  display: flex;
  gap: 10px;
}

.slider-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.slider-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.slider-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--surface);
  color: var(--text-secondary);
  border-color: var(--border);
}

.instructors-slider {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 4px 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.instructors-slider::-webkit-scrollbar {
  display: none;
}

.instructor-card {
  flex: 0 0 calc(50% - 10px);
  min-width: calc(50% - 10px);
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.instructor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.instructor-visual {
  flex: 0 0 120px;
  height: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instructor-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.instructor-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.instructor-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.instructor-info h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.instructor-role {
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.instructor-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 2px 0 6px;
}

.instructor-stats {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.instructor-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.instructor-stats strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.instructor-stats span {
  text-transform: capitalize;
  font-size: 8px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.instructor-tags {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.instructor-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.slider-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 999px;
}

/* Responsive */
@media (max-width: 1180px) {
  .instructor-card {
    flex: 0 0 calc(50% - 10px);
    min-width: calc(50% - 10px);
  }
}

@media (max-width: 900px) {
  .instructor-card {
    flex: 0 0 100%;
    min-width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .instructor-visual {
    flex: 0 0 auto;
    width: 100%;
    height: 200px;
  }

  .instructor-stats {
    gap: 18px;
  }
}

@media (max-width: 600px) {
  .instructor-card {
    padding: 16px;
    gap: 14px;
  }

  .instructor-visual {
    height: 160px;
  }

  .instructor-info h3 {
    font-size: 16px;
  }

  .instructor-stats strong {
    font-size: 16px;
  }
}

/*  RESPONSIVE  */
@media (max-width: 1180px) {
  .grid-mixed {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    z-index: 50;
    box-shadow: var(--shadow);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .main {
    padding: 20px;
  }
  .promo-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .promo-art {
    align-self: flex-end;
  }
  .popover {
    width: 280px;
    right: -60px;
  }
}

/* ========================================
   CARDS
   ======================================== */

.student-profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* ========================================
   STUDENT PROFILES — ALTERNATING LAYOUT
   ======================================== */

.students-list {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding-top: 50px;
}

.student-card {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 5px 20px;
}

.student-visual {
  flex: 0 0 270px;
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  transform: translateY(-40px);
}

.student-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.student-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.student-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-id {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.student-info h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.student-course {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

.student-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 4px 0 8px;
  max-width: 90%;
}

/* ========================================
   ALTERNATING DIRECTIONS
   ======================================== */

.student-card--left {
  flex-direction: row;
}

.student-card--right {
  flex-direction: row-reverse;
}

.student-card--right .student-info {
  text-align: right;
  align-items: flex-end;
}

.student-card--right .student-desc {
  max-width: 90%;
  margin-left: auto;
}
