/* =========================================================
   GCSE Maths Categories Landing
   ========================================================= */

.categories-page {
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.16), transparent 28rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 30rem),
    linear-gradient(180deg, #eef4ff 0%, #f8fbff 50%, #ffffff 100%);
  padding: 3rem 1rem 4rem;
}

.categories-hero,
.categories-section {
  width: min(1120px, 100%);
  margin: 0 auto 2rem;
}

.categories-hero {
  background:
    linear-gradient(rgba(11, 18, 32, 0.78), rgba(17, 28, 52, 0.88)),
    url("/static/img/home/home_hero_normal.avif");
  background-size: cover;
  background-position: center;
  color: #ffffff;
  border-radius: 30px;
  padding: clamp(2rem, 5vw, 4rem);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.24);
}

.categories-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.categories-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 1.1rem;
  line-height: 1.75;
}

.categories-section {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dbeafe;
  border-radius: 26px;
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.categories-section h2 {
  margin: 0 0 0.85rem;
  color: #1e40af;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.categories-intro {
  max-width: 820px;
  color: #475569;
  line-height: 1.75;
  font-size: 1.05rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 230px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 24px;
  padding: 1.35rem;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: #93c5fd;
  box-shadow: 0 22px 45px rgba(37, 99, 235, 0.14);
}

.category-card h3 {
  margin: 0 0 0.8rem;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1.2;
}

.category-card p {
  margin: 0;
  color: #475569;
  line-height: 1.65;
}

.category-card span {
  align-self: flex-start;
  margin-top: 1.2rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #facc15;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .categories-page {
    padding: 2rem 1rem 3rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }
}