/* ============================================================
   results.css — Genesis International School
   Academic Results Page Styles
   ============================================================ */

/* ----------------------------------------------------------
   Hero Override
   ---------------------------------------------------------- */
.res-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/gallery-2.jpg');
  background-size: cover;
  background-position: center 30%;
  z-index: 0;
  transform: scale(1.04);
  transition: transform 8s ease;
}

.res-hero:hover .res-hero-bg { transform: scale(1); }

.res-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(23,37,72,0.85) 0%, rgba(23,37,72,0.58) 100%);
  z-index: 1;
}

.res-hero .acad-hero-body { position: relative; z-index: 2; }

/* ----------------------------------------------------------
   Campus Selector Bar
   ---------------------------------------------------------- */
.res-campus-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.res-campus-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--soft-slate);
  background: #fff;
  border: 2px solid rgba(44,60,88,0.12);
  border-radius: 999px;
  padding: 11px 26px;
  cursor: pointer;
  transition: all 0.28s ease;
  box-shadow: 0 4px 14px rgba(23,37,72,0.06);
}

.res-campus-btn i {
  font-size: 12px;
  color: rgba(211,165,95,0.55);
  transition: color 0.28s;
}

.res-campus-btn:hover {
  border-color: var(--brand-gold);
  color: var(--soft-slate);
  box-shadow: 0 8px 28px rgba(211,165,95,0.20);
}

.res-campus-btn.active {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #fff;
  box-shadow: 0 10px 30px rgba(23,37,72,0.25);
}

.res-campus-btn.active i { color: var(--brand-gold); }

/* ----------------------------------------------------------
   Campus Panel (shown/hidden)
   ---------------------------------------------------------- */
.res-campus-panel {
  display: none;
  animation: fadeIn 0.35s ease;
}

.res-campus-panel.active { display: block; }

/* ----------------------------------------------------------
   Year Tabs
   ---------------------------------------------------------- */
.res-year-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.res-year-btn {
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(44,60,88,0.05);
  border: 1px solid rgba(44,60,88,0.12);
  border-radius: 10px;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.res-year-btn:hover { color: var(--soft-slate); background: rgba(211,165,95,0.08); border-color: rgba(211,165,95,0.35); }

.res-year-btn.active {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: #fff;
  box-shadow: 0 6px 18px rgba(211,165,95,0.30);
}

/* ----------------------------------------------------------
   Year Panel (shown/hidden)
   ---------------------------------------------------------- */
.res-year-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.res-year-panel.active { display: block; }

/* ----------------------------------------------------------
   Results Table
   ---------------------------------------------------------- */
.res-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(23,37,72,0.10);
  border: 1px solid rgba(44,60,88,0.08);
}

.res-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Poppins", sans-serif;
  font-size: 13.5px;
  min-width: 760px;
}

.res-table thead tr {
  background: var(--brand-navy);
}

.res-table thead th {
  color: #fff;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  padding: 16px 20px;
  text-align: left;
  white-space: nowrap;
}

.res-table thead th:first-child { border-radius: 17px 0 0 0; }
.res-table thead th:last-child { border-radius: 0 17px 0 0; }

.res-table tbody tr {
  border-bottom: 1px solid rgba(44,60,88,0.07);
  transition: background 0.2s;
}

.res-table tbody tr:last-child { border-bottom: none; }
.res-table tbody tr:hover { background: rgba(211,165,95,0.05); }

.res-table tbody tr:nth-child(even) { background: rgba(44,60,88,0.025); }
.res-table tbody tr:nth-child(even):hover { background: rgba(211,165,95,0.05); }

.res-table tbody td {
  padding: 15px 20px;
  color: var(--soft-text);
  white-space: nowrap;
}

.res-table tbody td:first-child {
  font-weight: 600;
  color: var(--soft-slate);
  white-space: normal;
}

/* Pass % highlight */
.res-table tbody td:nth-child(3) { font-weight: 700; color: #1a9c5b; }

/* Highest Score highlight */
.res-table tbody td:nth-child(5) { font-weight: 700; color: var(--soft-slate); }

/* ----------------------------------------------------------
   Top Achievers
   ---------------------------------------------------------- */
.res-achievers-section {
  background: linear-gradient(180deg, #f9fbff 0%, var(--brand-cream) 100%);
}

.res-achievers-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.res-achiever-card {
  background: #fff;
  border: 1px solid rgba(44,60,88,0.08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(23,37,72,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.res-achiever-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 52px rgba(23,37,72,0.14);
}

.res-achiever-img {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.res-achiever-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.res-achiever-card:hover .res-achiever-img img { transform: scale(1.05); }

.res-achiever-rank {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--brand-navy);
  background: var(--gold-grad);
  padding: 5px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(211,165,95,0.40);
}

.res-achiever-info {
  padding: 18px 18px 20px;
  text-align: center;
}

.res-achiever-info h4 {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--soft-slate);
  margin-bottom: 6px;
}

.res-achiever-score {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-gold);
  margin-bottom: 4px;
}

.res-achiever-year {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 1200px) {
  .res-achievers-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
  .res-campus-bar { gap: 8px; }
  .res-campus-btn { font-size: 12.5px; padding: 9px 20px; }
  .res-achievers-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .res-campus-bar { gap: 8px; }
  .res-campus-btn { font-size: 12px; padding: 8px 16px; gap: 6px; }
  .res-year-btn { font-size: 12px; padding: 7px 16px; }
  .res-achievers-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .res-table thead th, .res-table tbody td { padding: 12px 14px; font-size: 12.5px; }
}

@media (max-width: 480px) {
  .res-campus-btn { flex: 1 1 auto; justify-content: center; min-width: 100px; }
  .res-achievers-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .res-achiever-info h4 { font-size: 12.5px; }
}
