/* =============================================
   MAKERERE MODERN SS — academics.css
   Styles specific to the Academics page
   ============================================= */

/* --- HERO --- */
.academics-hero {
  position: relative;
  min-height: 88vh;
  background:
    linear-gradient(135deg, rgba(10,31,68,0.87) 0%, rgba(26,77,179,0.70) 100%),
    url('academics hero.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.academics-hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 65% 50%, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.academics-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 40px;
  padding-bottom: 40px;
  max-width: 680px;
}

/* --- DIRECTOR OF STUDIES --- */
.dos-inner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: center;
}
.dos-image {
  position: relative;
}
.dos-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.dos-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: var(--white);
  border-left: 4px solid var(--blue-500);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.dos-badge strong { font-size: 0.9rem; color: var(--blue-900); }
.dos-badge span   { font-size: 0.75rem; color: var(--gray-500); }
.dos-text .section-title { margin-bottom: 20px; }
.dos-text p {
  color: var(--gray-500);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 14px;
}

/* --- CURRICULUM --- */
.curriculum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.curriculum-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
}
.curriculum-card-header {
  padding: 24px 28px 20px;
  background: var(--blue-800);
  color: var(--white);
}
.curriculum-card--a .curriculum-card-header {
  background: var(--blue-900);
}
.curriculum-level {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.curriculum-card-header h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}
.curriculum-list {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}
.curriculum-list li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.88rem;
}
.curriculum-list li:last-child { border-bottom: none; }
.cl-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-500);
}
.curriculum-list li span:last-child {
  color: var(--gray-700);
  line-height: 1.5;
}

/* --- DEPARTMENTS --- */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.dept-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.dept-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}
.dept-img-wrap {
  position: relative;
  height: 180px;
  overflow: hidden;
}
.dept-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.dept-card:hover .dept-img-wrap img { transform: scale(1.06); }
.dept-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,31,68,0.65) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.dept-overlay span { font-size: 1.8rem; }
.dept-info { padding: 18px 20px 22px; }
.dept-info h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 8px;
}
.dept-info p {
  font-size: 0.83rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin: 0;
}

/* --- RESULTS --- */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.results-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--gray-100);
}
.results-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--blue-900);
}
.results-card-header h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}
.results-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  padding: 4px 12px;
  border-radius: 20px;
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.results-table thead tr {
  background: var(--blue-50);
}
.results-table th {
  padding: 12px 20px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-800);
  border-bottom: 1px solid var(--blue-100);
}
.results-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}
.results-table tbody tr:last-child td { border-bottom: none; }
.results-table tbody tr:hover { background: var(--gray-50); }

/* Progress bar style for pass rate */
.rate-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--blue-800);
}
.rate-bar::before {
  content: '';
  display: inline-block;
  width: 60px;
  height: 6px;
  border-radius: 3px;
  background: var(--blue-100);
  position: relative;
  overflow: hidden;
}
/* Pseudo trick — we use a box-shadow to fill the bar */
.rate-bar::before {
  background: linear-gradient(to right, var(--blue-500) var(--pct), var(--blue-100) var(--pct));
}

.trend { font-size: 1.1rem; font-weight: 700; }
.trend--up   { color: #16a34a; }
.trend--down { color: #dc2626; }

/* --- BACK TO TOP --- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px; height: 44px;
  background: var(--blue-800);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: background var(--transition), transform var(--transition);
  z-index: 999;
}
.back-to-top:hover { background: var(--blue-900); transform: translateY(-2px); }
.back-to-top.visible { display: flex; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
  .dos-inner { grid-template-columns: 1fr; gap: 36px; }
  .dos-image img { height: 320px; }
  .results-grid { grid-template-columns: 1fr; }
  .curriculum-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .dept-grid { grid-template-columns: 1fr; }
  .academics-hero { min-height: 70vh; }
}
