:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --accent: #0d9488;
  --accent-light: #14b8a6;
  --bg-body: #fafbfc;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 60px rgba(37, 99, 235, 0.15);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --transition-fast: all 0.2s ease;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "DM Sans",
    system-ui,
    -apple-system,
    sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background Pattern */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      ellipse 80% 50% at 20% -10%,
      rgba(37, 99, 235, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 10%,
      rgba(13, 148, 136, 0.06) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navbar --- */
.navbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 16px 0;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.brand-logo {
  height: 50px;
  width: auto;
  max-width: 250px;
  object-fit: contain;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.brand:hover .brand-logo {
  transform: scale(1.02);
  filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.2));
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-back i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.btn-back:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-back:hover i {
  transform: translateX(-4px);
}

.btn-back span {
  display: inline;
}

/* Responsive */
@media (max-width: 768px) {
  .brand-logo {
    height: 40px;
    max-width: 200px;
  }

  .btn-back {
    padding: 10px 20px;
    font-size: 14px;
  }

  .btn-back span {
    display: none;
  }

  .btn-back i {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 12px 0;
  }

  .brand-logo {
    height: 35px;
  }

  .btn-back {
    padding: 8px 16px;
  }
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.1) 0%,
    rgba(13, 148, 136, 0.1) 100%
  );
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.hero-badge i {
  font-size: 0.75rem;
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin: 0 0 20px;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* Stats Row */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Controls Area */
.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin-bottom: 60px;
  padding: 0 20px;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  background: white;
  padding: 6px;
  border-radius: 100px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.filter-btn {
  background: transparent;
  border: none;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-btn:hover {
  color: var(--text-main);
  background: var(--border-light);
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Search Bar */
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.search-wrapper input {
  width: 100%;
  padding: 18px 50px 18px 56px;
  border: 2px solid var(--border);
  border-radius: 100px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  background: white;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.search-wrapper input::placeholder {
  color: var(--text-light);
}

.search-wrapper input:focus {
  border-color: var(--primary);
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.1),
    var(--shadow-md);
}

.search-wrapper .fa-search {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
  font-size: 1rem;
}

.search-wrapper .clear-search {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  cursor: pointer;
  font-size: 1rem;
  padding: 6px;
  display: none;
  transition: var(--transition-fast);
  background: var(--border-light);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-wrapper .clear-search:hover {
  color: var(--text-main);
  background: var(--border);
}

.search-wrapper .clear-search.visible {
  display: flex;
}

/* Resource Grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-bottom: 80px;
}

/* Card Styles */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-image {
  height: 200px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card-image::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.1), transparent);
}

.card-content {
  padding: 28px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
}

.tag-ielts {
  background: #eef2ff;
  color: #4338ca;
}
.tag-visa {
  background: #ecfdf5;
  color: #047857;
}
.tag-country {
  background: #fef3c7;
  color: #b45309;
}
.tag-scholarship {
  background: #fce7f3;
  color: #be185d;
}

.card h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text-main);
  line-height: 1.3;
  transition: var(--transition-fast);
}

.card:hover h3 {
  color: var(--primary);
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 24px;
  flex-grow: 1;
  line-height: 1.7;
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  gap: 8px;
}

.card-footer i {
  transition: var(--transition-fast);
}

.card:hover .card-footer i {
  transform: translateX(4px);
}

/* Featured Card */
.card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.card.featured .card-image {
  height: 100%;
  min-height: 380px;
}

.card.featured .card-content {
  padding: 40px;
  justify-content: center;
}

.card.featured h3 {
  font-size: 1.8rem;
}

.card.featured .card-footer {
  font-size: 1rem;
}

.featured-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Newsletter Section */
.newsletter {
  background: linear-gradient(135deg, var(--text-main) 0%, #0f172a 100%);
  color: white;
  padding: 80px 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      ellipse 50% 50% at 20% 80%,
      rgba(37, 99, 235, 0.2) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 40% 40% at 80% 20%,
      rgba(13, 148, 136, 0.15) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.newsletter-content {
  position: relative;
  z-index: 1;
}

.newsletter h2 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.newsletter p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  padding: 16px 24px;
  border-radius: 100px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  width: 100%;
  max-width: 320px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary-light);
  background: rgba(255, 255, 255, 0.15);
}

.newsletter-form button {
  padding: 16px 32px;
  border-radius: 100px;
  border: none;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  color: white;
  font-weight: 700;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.newsletter-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

/* --- Footer --- */
footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 80px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-family: "DM Sans", sans-serif;
}

.footer-col p {
  margin-bottom: 20px;
  line-height: 1.7;
}

.footer-links li {
  margin-bottom: 12px;
}
.footer-links a {
  color: #94a3b8;
}
.footer-links a:hover {
  color: var(--white);
  padding-left: 5px;
}

.footer-socials {
  display: flex;
  gap: 16px;
  font-size: 1.2rem;
  margin-top: 20px;
}
.footer-socials a {
  color: #94a3b8;
  transition: var(--transition);
}
.footer-socials a:hover {
  color: var(--white);
}

.newsletter-form {
  display: flex;
  margin-top: 15px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px 0 0 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: inherit;
}

.newsletter-form input::placeholder {
  color: #cbd5e1;
}

.newsletter-form button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0 20px;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: background 0.3s;
}

.newsletter-form button:hover {
  background: var(--primary-dark);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  font-size: 0.9rem;
}
/* Utility Classes */
.hidden {
  display: none !important;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 40px;
  color: var(--text-muted);
}

.no-results-icon {
  width: 80px;
  height: 80px;
  background: var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.no-results-icon i {
  font-size: 2rem;
  color: var(--text-light);
}

.no-results h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .stats-row {
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .hero {
    padding: 60px 0 40px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .stats-row {
    gap: 24px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .filter-buttons {
    padding: 4px;
    gap: 4px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .resource-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card.featured {
    grid-template-columns: 1fr;
  }

  .card.featured .card-image {
    height: 220px;
    min-height: auto;
  }

  .card.featured .card-content {
    padding: 28px;
  }

  .card.featured h3 {
    font-size: 1.4rem;
  }

  .newsletter {
    padding: 50px 24px;
    border-radius: var(--radius);
  }

  .newsletter h2 {
    font-size: 1.5rem;
  }

  .newsletter-form {
    flex-direction: column;
    align-items: center;
  }

  .newsletter-form input {
    max-width: 100%;
  }

  .btn-back span {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 40px 0 30px;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 6px 14px;
  }

  .stats-row {
    gap: 20px;
  }

  .stat-number {
    font-size: 1.3rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .card-content {
    padding: 20px;
  }

  .card h3 {
    font-size: 1.2rem;
  }

  .tag {
    font-size: 0.65rem;
    padding: 5px 10px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .card {
    opacity: 1;
    transform: none;
  }
}

/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
