/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,0.08), transparent 35%),
    radial-gradient(circle at bottom left, rgba(139,92,246,0.08), transparent 35%),
    #f8fafc;
  color: #0f172a;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Top Bar */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.top-bar h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
}

/* Back Button */
.back-btn {
  text-decoration: none;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
  padding: 11px 18px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
  white-space: nowrap;
}

.back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

/* Main Container */
.exam-container {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

/* Exam Card */
.exam-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.06),
    0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.exam-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 5px;
  width: 100%;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.exam-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 22px 50px rgba(15, 23, 42, 0.12),
    0 4px 12px rgba(15, 23, 42, 0.05);
}

/* Image */
.exam-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: #e2e8f0;
}

/* Content */
.exam-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Exam Title */
.exam-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
  line-height: 1.3;
}

/* Description */
.desc {
  color: #475569;
  font-size: 0.95rem;
  margin-bottom: 18px;
  line-height: 1.7;
  padding: 14px;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

/* Details */
.exam-content p {
  font-size: 0.95rem;
  color: #334155;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.5;
}

.exam-content strong {
  color: #0f172a;
  font-weight: 600;
}

/* Fees Section */
.fees {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.fees span {
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  color: #1e3a8a;
  padding: 12px 10px;
  border-radius: 14px;
  font-weight: 700;
  text-align: center;
  border: 1px solid #dbeafe;
  font-size: 0.92rem;
}

/* Button */
.apply-btn {
  margin-top: auto;
  text-decoration: none;
  text-align: center;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  font-weight: 700;
  font-size: 0.97rem;
  transition: all 0.3s ease;
  box-shadow: 0 12px 25px rgba(79, 70, 229, 0.22);
}

.apply-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(79, 70, 229, 0.3);
}

/* No Data */
.no-data {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  background: white;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

/* Tablet */
@media (max-width: 992px) {
  .top-bar {
    padding: 16px 20px;
  }

  .top-bar h1 {
    font-size: 1.5rem;
  }

  .exam-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
    padding: 0 18px 30px;
  }

  .exam-image {
    height: 200px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .top-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 14px;
    padding: 16px;
  }

  .top-bar h1 {
    font-size: 1.35rem;
  }

  .back-btn {
    width: fit-content;
    align-self: flex-start;
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .exam-container {
    grid-template-columns: 1fr;
    margin: 24px auto;
    padding: 0 14px 24px;
    gap: 18px;
  }

  .exam-card {
    border-radius: 20px;
  }

  .exam-image {
    height: 190px;
  }

  .exam-content {
    padding: 18px;
  }

  .exam-content h2 {
    font-size: 1.15rem;
  }

  .desc {
    font-size: 0.9rem;
    padding: 12px;
  }

  .exam-content p {
    font-size: 0.9rem;
  }

  .fees {
    grid-template-columns: 1fr;
  }

  .apply-btn {
    padding: 13px;
    font-size: 0.95rem;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .top-bar h1 {
    font-size: 1.15rem;
  }

  .back-btn {
    font-size: 0.85rem;
    padding: 9px 14px;
  }

  .exam-image {
    height: 170px;
  }

  .exam-content {
    padding: 16px;
  }

  .exam-content h2 {
    font-size: 1.05rem;
  }

  .desc,
  .exam-content p {
    font-size: 0.86rem;
  }

  .fees span {
    font-size: 0.85rem;
    padding: 10px;
  }
}