.homepage-discovery {
  display: grid;
  gap: 28px;
}

.homepage-discovery > * {
  width: 100%;
}

/* =========================================================
   Hero
========================================================= */
.home-hero {
  display: block;
  padding: 30px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(11, 87, 208, 0.16), transparent 35%),
    linear-gradient(180deg, rgba(14, 21, 34, 0.96), rgba(10, 15, 24, 0.96));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.home-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  color: #fff;
}

.home-hero p {
  margin: 0 0 22px;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
  font-size: 1.02rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hero-stats > div {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

.hero-stats strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
}

.hero-stats span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* =========================================================
   Meal section
========================================================= */
.home-meals {
  display: block;
  margin-top: 2px;
}

.home-meals h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1.15;
}

.homepage-discovery .meal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.homepage-discovery .meal-card {
  position: relative;
  display: block;
  width: 100%;
  height: 220px;
  min-height: 220px;
  max-height: 220px;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #111827;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.homepage-discovery .meal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 87, 208, 0.45);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.homepage-discovery .meal-card__image,
.homepage-discovery .meal-card__overlay,
.homepage-discovery .meal-card__label {
  position: absolute;
  inset: 0;
}

.homepage-discovery .meal-card__image {
  z-index: 0;
  display: block;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 30, 46, 0.95), rgba(10, 15, 24, 0.98));
}

.homepage-discovery .meal-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.homepage-discovery .meal-card:hover .meal-card__image img {
  transform: scale(1.05);
}

.homepage-discovery .meal-card__overlay {
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(5, 10, 18, 0.12) 0%,
    rgba(5, 10, 18, 0.25) 38%,
    rgba(5, 10, 18, 0.82) 100%
  );
}

.homepage-discovery .meal-card__label {
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   Results spacing
========================================================= */
.results #hits {
  margin-top: 14px;
}

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 920px) {
  .hero-stats,
  .homepage-discovery .meal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .homepage-discovery .meal-card {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
  }
}

@media (max-width: 768px) {
  .grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .results {
    order: 1;
  }

  .filters {
    order: 2;
  }

  .homepage-discovery {
    gap: 20px;
  }

  .homepage-discovery .meal-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .homepage-discovery .meal-card {
    height: 190px;
    min-height: 190px;
    max-height: 190px;
  }
}

@media (max-width: 640px) {
  .home-hero {
    padding: 14px;
    border-radius: 16px;
  }

  .home-hero h1 {
    font-size: 1.45rem;
    line-height: 1.15;
    margin-bottom: 8px;
  }

  .home-hero p {
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 12px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-stats > div {
    padding: 8px 6px;
    border-radius: 10px;
    text-align: center;
  }

  .hero-stats strong {
    font-size: 0.95rem;
    margin-bottom: 2px;
  }

  .hero-stats span {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .home-meals h2 {
    font-size: 1.45rem;
    margin-bottom: 12px;
  }

  .homepage-discovery .meal-card {
    height: 180px;
    min-height: 180px;
    max-height: 180px;
  }
}