.category-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 25px;
  flex-wrap: wrap;
}

.category-card {
  flex: 1;
  min-width: 260px;
  height: 520px; /* Made slightly taller to match the wider layout */
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  /* Fluid scaling animation */
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

/* Whole block grows on hover */
.category-card:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

/* Background Images for each category column */
.scotland-bg {
  background-image: url('../assets/cityMaps/startScreen/scotland_start.png'); 
  background-color: #34495e; /* Fallback color */
}
.uk-bg {
  background-image: url('../assets/cityMaps/startScreen/uk_start.png');
  background-color: #2c3e50;
}
.international-bg {
  background-image: url('../assets/cityMaps/startScreen/international_start.png');
  background-color: #232526;
}

/* Translucent dark gradient layer so white text stays perfectly readable */
.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 15px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 60%;
}

.card-title {
  color: #ffffff;
  font-size: 2.1rem;
  margin: 0 0 12px 0;
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-family: 'Georgia', 'Times New Roman', serif;
}

.play-button {
  background-color: #1a1a1a;
  color: #ffffff;
  border: none;
  padding: 10px 38px;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 3px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Play button shifts to a custom pinkish-red color on hover */
.play-button:hover {
  background-color: #ff3838; 
}

/* Back Link Utilities */
.quiz-top-nav {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.back-home-link {
  text-decoration: none;
  color: #7f8c8d;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.back-home-link:hover {
  color: #ff3838;
}

/* Mobile Responsive View: Stack columns vertically if screen is narrow */
@media (max-width: 768px) {
  .category-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers the cards */
  }
  .category-card {
    width: 100%;
    max-width: 400px; /* Prevents them from getting absurdly wide on tablets */
    height: 360px;
    flex: none; /* Crucial Fix: Stops flex-basis from collapsing the height */
  }
}
