/* ===== University list styling ===== */
.university-list {
  border-radius: 12px;
  overflow: hidden;
}

.university-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: #0d0d0d;
  background-color: #f8fff8;
  border-bottom: 1px solid #e4e4e4;
  transition: all 0.3s ease;
}

.university-item.alt-row {
  background-color: #eef7ff; /* Alternate colour */
}

.university-item:hover {
  background-color: #dfffe2;
  transform: translateX(5px);
}

.university-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #146c43; /* GBT green */
}

.university-city {
  font-size: 0.95rem;
  color: #555;
}

@media (max-width: 576px) {
  .university-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}






/* ===== Rankings section ===== */
.ranking-card {
  --gbt-green: #198754;
}

.section-title {
  font-weight: 700;
  color: var(--gbt-green);
  margin-bottom: 1rem;
}

.ranking-box {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}

.ranking-year {
  font-weight: 600;
  margin-bottom: .75rem;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ranking-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .65rem 0;
  border-bottom: 1px dashed rgba(0,0,0,.08);
  font-size: 1.05rem;
}

.ranking-list li:last-child {
  border-bottom: none;
}

.ranking-list li span {
  opacity: .85;
}

.ranking-list li strong {
  font-weight: 700;
  color: #111;
}

/* Mobile tweaks */
@media (max-width: 576px) {
  .ranking-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
  }
}







/* 🎓 Find University Section Styling */
section.bg-light {
  background: linear-gradient(to bottom right, #f8f9fa, #eafbea);
  border-top: 2px solid #19875410;
  border-bottom: 2px solid #19875410;
}

section.bg-light h2 {
  font-size: 1.8rem;
}

section.bg-light .btn-success {
  font-size: 1.2rem;
}






/* =========================================
   🌍 BASE + RESET STYLES
   ========================================= */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Ensures footer stays at bottom */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fff;
  color: #212529;
}

/* Main content fills remaining space between header and footer */
main {
  flex: 1 0 auto;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: underline;
}

/* =========================================
   🧭 NAVBAR + HEADER
   ========================================= */
.navbar {
  padding: 0.6rem 1rem;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap !important; /* ✅ keep one line on mobile */
}

/* Left logo */
.navbar-brand img {
  max-height: 50px;
  transition: all 0.3s ease-in-out;
}

/* Center title */
.navbar h2 {
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
  color: #198754;
  margin: 0;
  text-align: center;
  flex-grow: 1;
}

/* Right menu button */
.navbar .btn {
  padding: 0.4rem 0.7rem;
  font-size: 1.3rem;
  border-radius: 6px;
}

/* Dropdown styling */
.dropdown-menu {
  min-width: 220px;
  font-size: 1rem;
}

.dropdown-item:hover {
  background-color: #f0fdf4;
  color: #198754;
}

/* =========================================
   🦶 FOOTER (Sticky at bottom)
   ========================================= */
footer {
  flex-shrink: 0;
  background-color: #198754;
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
  padding: 1.5rem 0;
  margin-top: auto;
}

footer a {
  color: #fff;
  text-decoration: underline;
}

footer a:hover {
  text-decoration: none;
}

/* =========================================
   🖼️ HERO IMAGE / BANNER
   ========================================= */
section img.img-fluid {
  border-radius: 0;
  object-fit: cover;
}

h1, h2, h3 {
  font-weight: 700;
}

/* =========================================
   🌈 BUTTONS + FOCUS STATES
   ========================================= */
.btn-success {
  background-color: #198754;
  border-color: #198754;
  transition: background-color 0.3s ease;
}

.btn-success:hover {
  background-color: #157347;
  border-color: #146c43;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #198754;
}

/* =========================================
   📱 RESPONSIVE DESIGN
   ========================================= */

/* Tablets */
@media (max-width: 991px) {
  .navbar h2 {
    font-size: 1.25rem;
  }

  .navbar-brand img {
    max-height: 45px;
  }

  .navbar .btn {
    padding: 0.35rem 0.6rem;
    font-size: 1.2rem;
  }
}

/* Mobiles */
@media (max-width: 768px) {
  .navbar h2 {
    font-size: 1.1rem;
  }

  .navbar-brand img {
    max-height: 40px;
  }

  .dropdown-menu {
    font-size: 0.95rem;
  }

  .container {
    padding: 0 1rem;
  }
}

/* Extra small devices */
@media (max-width: 576px) {
  .navbar {
    padding: 0.5rem 0.7rem;
  }

  .navbar-brand img {
    max-height: 38px;
  }

  .navbar h2 {
    font-size: 1rem;
  }

  .navbar .btn {
    font-size: 1.1rem;
    padding: 0.3rem 0.5rem;
  }
}

/* =========================================
   💡 UTILITIES + SMALL DETAILS
   ========================================= */
.text-success {
  color: #198754 !important;
}

.shadow-sm {
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important;
}

.text-shadow {
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

section {
  padding: 3rem 0;
}

.container {
  max-width: 1140px;
}

.mt-auto {
  margin-top: auto !important;
}
