/* Seasonal row on the home page (partials/seasonal_feature.html) */
.seasonal-feature {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 2.5rem auto 0.5rem;
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #d7cbb9);
  border-top: 4px solid var(--accent-warm, #ae5c40);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.seasonal-feature__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.1rem;
}

.seasonal-feature__heading h2 {
  margin: 0;
  color: var(--highlight, #784527);
  font-size: 1.6rem;
  line-height: 1.2;
}

.seasonal-feature__heading h2 i {
  color: var(--accent-warm, #ae5c40);
  margin-right: 0.15em;
}

.seasonal-feature__text {
  margin: 0.4rem 0 0;
  max-width: 60ch;
  color: var(--text-secondary, #665e53);
}

.seasonal-feature__link {
  flex-shrink: 0;
  color: var(--accent-warm, #ae5c40);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.seasonal-feature__link:hover,
.seasonal-feature__link:focus-visible {
  color: var(--highlight, #784527);
  text-decoration: underline;
}

/* The recipes inside the box are the normal recipe cards
   (partials/blog_card.html); only the grid's outer spacing is changed so it
   fits inside the box instead of lining up with the page */
.seasonal-feature .seasonal-feature__grid {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  transform: none;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* Line up with the recipe grid, which has 20px side margins in this range */
@media (min-width: 1025px) and (max-width: 1240px) {
  .seasonal-feature {
    width: calc(100% - 40px);
  }
}

/* Phones: one swipeable row instead of a tall grid */
@media (max-width: 640px) {
  .seasonal-feature {
    margin: 1.5rem 0 0.5rem;
    padding: 1.1rem 0 1rem 1rem;
  }
  .seasonal-feature__header {
    padding-right: 1rem;
  }
  .seasonal-feature__heading h2 {
    font-size: 1.35rem;
  }
  /* One swipeable row of cards instead of a long stack */
  .seasonal-feature .seasonal-feature__grid {
    display: flex;
    justify-content: flex-start;   /* the page grid centres; that would hide the first cards */
    align-items: stretch;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.25rem 1rem 0.75rem 0;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }
  .seasonal-feature .seasonal-feature__grid .blog-card {
    flex: 0 0 82%;
    width: auto;
    margin: 0;
    scroll-snap-align: start;
  }
}
