/* ===== CSS Variables ===== */
:root {
  --green-primary: #059669;
  --green-dark: #047857;
  --green-light: #34d399;
  --orange-accent: #f59e0b;
  --orange-dark: #d97706;
  
  --bg-white: #ffffff;
  --bg-gray: #f8fafc;
  --bg-dark: #0f172a;
  --bg-glass: rgba(255, 255, 255, 0.85);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #ffffff;
  
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-green: 0 10px 15px -3px rgba(5, 150, 105, 0.25), 0 4px 6px -4px rgba(5, 150, 105, 0.15);
  
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  --ease-expo-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  
  --container-max: 1280px;
}

/* ===== Dark Mode ===== */
[data-theme="dark"] {
  --bg-white: #0f172a;
  --bg-gray: #020617;
  --bg-dark: #1e293b;
  --bg-hover: #334155;
  --bg-glass: rgba(15, 23, 42, 0.85);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
}


[data-theme="dark"] .btn-white {
  background: var(--bg-dark);
  color: var(--green-primary);
}

[data-theme="dark"] .btn-white:hover {
  background: var(--border-color);
}

[data-theme="dark"] .stats {
  background: radial-gradient(ellipse at center, var(--bg-gray), var(--bg-dark));
}

[data-theme="dark"] .stat-card {
  background: var(--bg-dark);
}

[data-theme="dark"] .categories {
  background: var(--bg-white);
}

[data-theme="dark"] .category-card {
  background: var(--bg-dark);
}

[data-theme="dark"] .uni-card {
  background: var(--bg-dark);
}

[data-theme="dark"] .uni-image img {
  background: var(--bg-gray);
}

[data-theme="dark"] .hero-wave svg path {
  fill: var(--bg-white);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bg-gray);
}

/* Dark mode toggle button */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s;
  flex-shrink: 0;
}

.navbar.scrolled .dark-mode-toggle {
  color: var(--text-secondary);
}

.dark-mode-toggle:hover {
  color: var(--green-primary);
  transform: rotate(15deg);
}

.dark-mode-toggle .icon-sun,
.dark-mode-toggle .icon-moon {
  width: 1.25rem;
  height: 1.25rem;
}

[data-theme="dark"] .dark-mode-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .dark-mode-toggle .icon-moon {
  display: none;
}

.dark-mode-toggle .icon-sun {
  display: none;
}

.dark-mode-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .type-badge.public {
  background: rgba(76, 175, 80, 0.2);
  color: #66bb6a;
}

[data-theme="dark"] .type-badge.private {
  background: rgba(255, 152, 0, 0.2);
  color: #ffb74d;
}

[data-theme="dark"] .type-badge.international {
  background: rgba(66, 165, 245, 0.2);
  color: #64b5f6;
}

[data-theme="dark"] .rank-badge {
  background: rgba(76, 175, 80, 0.2);
  color: #66bb6a;
}

[data-theme="dark"] .rank-badge.asia {
  background: rgba(255, 152, 0, 0.2);
  color: #ffb74d;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Hind Siliguri', system-ui, -apple-system, sans-serif;
  background: var(--bg-white);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* ===== Utilities ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.hidden {
  display: none !important;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-top: 4rem;
  position: sticky;
  top: 52px;
  z-index: 40;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.breadcrumb-list a {
  color: var(--text-secondary);
  transition: color 0.3s;
}

.breadcrumb-list a:hover {
  color: var(--green-primary);
}

.breadcrumb-separator {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .breadcrumb {
    margin-top: 3.5rem;
    top: 48px;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.3s var(--ease-expo-out);
}

.range-slider input[type=range]::-webkit-slider-thumb {
  pointer-events: all;
  width: 18px;
  height: 18px;
  -webkit-appearance: none;
  border-radius: 50%;
  background: var(--green-primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s var(--ease-expo-out), box-shadow 0.2s var(--ease-expo-out);
}

.range-slider input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: var(--shadow-green);
}

.range-slider input[type=range]::-moz-range-thumb {
  pointer-events: all;
  width: 18px;
  height: 18px;
  -moz-appearance: none;
  border-radius: 50%;
  background: var(--green-primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s var(--ease-expo-out), box-shadow 0.2s var(--ease-expo-out);
}

.range-slider input[type=range]::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: var(--shadow-green);
}

.btn-primary {
  background: var(--green-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--green-dark);
  transform: scale(1.05);
  box-shadow: var(--shadow-green);
}

.btn-white {
  background: white;
  color: var(--green-primary);
}

.btn-white:hover {
  background: #f5f5f5;
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  background: transparent;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.btn-outline-dark {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  background: rgba(0, 0, 0, 0.3);
}

.btn-outline-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-full {
  width: 100%;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1.25rem 0;
  transition: all 0.5s var(--ease-expo-out);
  animation: slideDown 0.6s var(--ease-expo-out);
}

.navbar.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 0;
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s;
}

.logo:hover {
  transform: scale(1.02);
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-dark) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.logo-text {
  font-weight: 700;
  font-size: 1.125rem;
  color: white;
  transition: color 0.3s;
}

.navbar.scrolled .logo-text {
  color: var(--text-primary);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  transition: color 0.3s;
}

.navbar.scrolled .nav-link {
  color: var(--text-secondary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-primary);
  transition: width 0.3s;
}

.nav-link:hover {
  color: var(--green-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  color: white;
  transition: color 0.3s;
}

.navbar.scrolled .mobile-menu-btn {
  color: var(--text-primary);
}

.mobile-menu {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.navbar.scrolled .mobile-menu {
  border-color: var(--border-color);
}

.mobile-nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  transition: color 0.3s;
}

.navbar.scrolled .mobile-nav-link {
  color: var(--text-secondary);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .nav-cta {
    display: block;
  }

  .nav-actions {
    gap: 0.75rem;
  }

  .mobile-menu-btn {
    display: none;
  }

  .mobile-menu {
    display: none !important;
  }
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-dark) 100%);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  animation: gradientShift 20s ease infinite;
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-dark) 40%, #064e3b 80%, var(--green-primary) 100%);
  background-size: 400% 400%;
}

.floating-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  animation: pulseFloat 10s ease-in-out infinite;
  filter: blur(8px);
}

@keyframes pulseFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
    background: rgba(255, 255, 255, 0.03);
  }
  50% {
    transform: translateY(-20px) scale(1.1);
    background: rgba(255, 255, 255, 0.08);
  }
}

.shape-1 {
  width: 5rem;
  height: 5rem;
  top: 5rem;
  left: 10%;
}

.shape-2 {
  width: 4rem;
  height: 4rem;
  top: 10rem;
  right: 15%;
  border-radius: var(--radius-md);
  transform: rotate(45deg);
  animation-delay: -2s;
}

.shape-3 {
  width: 6rem;
  height: 6rem;
  bottom: 8rem;
  left: 20%;
  background: rgba(255, 255, 255, 0.05);
  animation-delay: -3s;
}

.shape-4 {
  width: 3rem;
  height: 3rem;
  bottom: 5rem;
  right: 25%;
  border-radius: var(--radius-md);
  transform: rotate(12deg);
  animation-delay: -4s;
}

.shape-5 {
  width: 2rem;
  height: 2rem;
  top: 33%;
  left: 5%;
  animation-delay: -2s;
}

.shape-6 {
  width: 3.5rem;
  height: 3.5rem;
  top: 25%;
  right: 8%;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  transform: rotate(45deg);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 64rem;
  margin: 0 auto;
  padding: 5rem 1rem 2rem;
  text-align: center;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  perspective: 1000px;
}

.hero-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px) rotateX(-30deg);
  animation: heroTitleIn 0.8s var(--ease-expo-out) forwards;
}

.hero-title span:nth-child(1) { animation-delay: 0.3s; }
.hero-title span:nth-child(2) { animation-delay: 0.4s; }
.hero-title span:nth-child(3) { animation-delay: 0.5s; }
.hero-title span:nth-child(4) { animation-delay: 0.6s; }

.hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  opacity: 0;
  filter: blur(10px);
  animation: heroSubtitleIn 0.6s var(--ease-expo-out) 0.7s forwards;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 0.6s var(--ease-bounce) 1.1s forwards;
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.hero-wave svg {
  width: 100%;
  display: block;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .hero-cta {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.75rem;
  }
}

/* ===== Statistics Section ===== */
.stats {
  padding: 5rem 0;
  background: radial-gradient(ellipse at center, #F5F5F5 0%, #E0E0E0 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.5s var(--ease-expo-out);
  opacity: 0;
  transform: translateY(60px) scale(0.9);
}

.stat-card.animate {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  background: rgba(5, 150, 105, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-primary);
  transition: all 0.3s;
}

.stat-card:hover .stat-icon {
  background: var(--green-primary);
  color: white;
}

.loc-chip {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.3s var(--ease-expo-out);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.loc-chip:hover:not(:disabled) {
  border-color: var(--green-primary);
  background: var(--bg-gray);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.loc-chip.active {
  background: var(--green-primary);
  color: white;
  border-color: var(--green-primary);
  box-shadow: var(--shadow-green);
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--green-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== Categories Section ===== */
.categories {
  padding: 6rem 0;
  background: white;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s var(--ease-expo-out);
}

.section-header.animate {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 30rem;
  margin: 0 auto;
}

.categories-grid {
  display: grid;
  gap: 2rem;
}

.category-card {
  position: relative;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all 0.5s var(--ease-expo-out);
  opacity: 0;
  transform: translateY(80px);
}

.category-card.animate {
  opacity: 1;
  transform: translateY(0);
}

.category-card:hover {
  border-color: var(--green-primary);
  box-shadow: var(--shadow-green);
  transform: translateY(-12px);
}

.category-icon {
  width: 4rem;
  height: 4rem;
  background: rgba(5, 150, 105, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-primary);
  margin-bottom: 1.5rem;
  transition: all 0.5s;
}

.category-card:hover .category-icon {
  background: var(--green-primary);
  color: white;
  transform: rotate(360deg);
}

.category-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.category-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: rgba(5, 150, 105, 0.1);
  color: var(--green-primary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.category-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--green-primary);
  font-weight: 600;
  transition: gap 0.3s;
}

.category-link:hover {
  gap: 0.5rem;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background: linear-gradient(to bottom right, rgba(5, 150, 105, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.category-card:hover::before {
  opacity: 1;
}

@media (min-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .section-title {
    font-size: 2.25rem;
  }
}

/* ===== Featured Universities Section ===== */
.featured {
  padding: 6rem 0;
  background: var(--bg-gray);
}

.featured-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s var(--ease-expo-out);
}

.featured-header.animate {
  opacity: 1;
  transform: translateY(0);
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--green-primary);
  font-weight: 600;
  margin-top: 1rem;
  transition: gap 0.3s;
}

.view-all-link:hover {
  gap: 0.75rem;
}

.universities-grid {
  display: grid;
  gap: 1.5rem;
}

.uni-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s var(--ease-expo-out);
  opacity: 0;
  transform: translateY(60px);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.uni-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.uni-card.animate {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.uni-image {
  position: relative;
  height: 10rem;
  overflow: hidden;
}

.uni-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f5f5f5;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.7s;
}

.uni-image img.loaded {
  opacity: 1;
}

.uni-card:hover .uni-image img {
  transform: scale(1.1);
}

.uni-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.uni-type {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
}

.uni-type.public {
  background: var(--green-primary);
}

.uni-type.private {
  background: var(--orange-accent);
}

.uni-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.uni-name {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  transition: color 0.3s;
  min-height: 2.8em;
}

.uni-card:hover .uni-name {
  color: var(--green-primary);
}

.uni-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  margin-top: auto;
}

.uni-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.uni-ranking {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.rank-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(5, 150, 105, 0.1);
  color: var(--green-primary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.rank-badge.asia {
  background: rgba(255, 152, 0, 0.1);
  color: var(--orange-dark);
}

.uni-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.view-details {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--green-primary);
}

.view-details:hover {
  text-decoration: underline;
}

@media (min-width: 640px) {
  .universities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .featured-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
  
  .view-all-link {
    margin-top: 0;
  }
}

@media (min-width: 1024px) {
  .universities-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== CTA Section ===== */
.cta {
  position: relative;
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-dark) 100%);
  overflow: hidden;
}

.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 10;
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s var(--ease-expo-out);
}

.cta-content.animate {
  opacity: 1;
  transform: translateY(0);
}

.cta-title {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1.5rem;
}

.cta-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  max-width: 30rem;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .cta-title {
    font-size: 2.5rem;
  }
  
  .cta-buttons {
    flex-direction: row;
  }
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: var(--text-muted);
}

.footer-border {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--green-primary), var(--orange-accent), var(--green-primary));
  background-size: 200% 100%;
  animation: shimmer 8s linear infinite;
}

.footer-content {
  padding: 4rem 0;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s var(--ease-expo-out);
}

.footer-content.animate {
  opacity: 1;
  transform: translateY(0);
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
}

.footer-brand {
  grid-column: 1 / -1;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.footer-logo .logo-text {
  color: white;
}

.footer-description {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 20rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.3s;
}

.social-link:hover {
  background: var(--green-primary);
  color: white;
}

.footer-title {
  color: white;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--green-light);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.copyright, .credit {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.heart {
  color: #ef4444;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }
  
  .footer-brand {
    grid-column: auto;
  }
}

/* ===== Coming Soon Badge ===== */
.coming-soon {
  position: relative;
}

.coming-soon::after {
  content: 'Soon';
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--orange-dark);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 6px;
  line-height: 1.4;
  pointer-events: none;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s var(--ease-expo-out);
  white-space: nowrap;
}

.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Animations ===== */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroTitleIn {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

@keyframes heroSubtitleIn {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Animation delays for staggered effects */
[data-animate] {
  transition-delay: calc(var(--index, 0) * 0.12s);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--green-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, background 0.3s;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--green-dark);
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-green);
}

.back-to-top svg {
  width: 1.25rem;
  height: 1.25rem;
}


[data-theme="dark"] .back-to-top {
  background: #2a2a2a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .back-to-top:hover {
  background: #333333;
}

@media (max-width: 640px) {
  .back-to-top {
    width: 2.5rem;
    height: 2.5rem;
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .back-to-top svg {
    width: 1.125rem;
    height: 1.125rem;
  }


}

/* ===== PWA Install Banner ===== */
.install-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
  background: var(--green-primary);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  max-width: 90vw;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

.install-banner-text {
  font-weight: 500;
  white-space: nowrap;
}

.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.install-banner-btn {
  background: white;
  color: var(--green-primary);
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.install-banner-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}


.install-banner-dismiss {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}

.install-banner-dismiss:hover {
  color: white;
}

[data-theme="dark"] .install-banner {
  background: #1e1e1e;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .install-banner-btn {
  background: var(--green-primary);
  color: white;
}

@media (max-width: 640px) {
  .install-banner {
    bottom: 0.75rem;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .install-banner-text {
    font-size: 0.8rem;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--green-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green-dark);
}
