.pl-section-local-recommendations {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
}

.pl-section-local-recommendations .pl-section-body {
  flex: 0 1 auto;
  min-height: 0;
}

.pl-local-reco-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

.pl-local-reco-card {
  min-width: 0;
  width: 100%;
}

.pl-local-reco-card__link {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--pl-content-border);
  background: var(--pl-content-surface);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.pl-local-reco-card__link:hover {
  border-color: var(--pl-accent-soft-safe-border-hover);
  background: var(--pl-accent-soft-safe-bg-hover);
  transform: translateY(-1px);
}

.pl-local-reco-card__link:hover .pl-local-reco-card__title,
.pl-local-reco-card__link:hover .pl-local-reco-card__description {
  color: var(--pl-content-text, var(--pl-shell-text, #101828));
}

.pl-local-reco-card__link:hover .pl-local-reco-card__title {
  color: var(--pl-content-accent, var(--pl-accent, #0b63ce));
}

.pl-local-reco-card__link:active {
  border-color: var(--pl-accent-soft-safe-border-active);
  background: var(--pl-accent-soft-safe-bg-active);
}

.pl-local-reco-card__link:active .pl-local-reco-card__title,
.pl-local-reco-card__link:active .pl-local-reco-card__description {
  color: var(--pl-content-text, var(--pl-shell-text, #101828));
}

.pl-local-reco-card__link:active .pl-local-reco-card__title {
  color: var(--pl-content-accent, var(--pl-accent, #0b63ce));
}

.pl-local-reco-card__link:visited {
  color: inherit;
}

.pl-local-reco-card__link:focus-visible {
  outline: 2px solid var(--pl-focus-ring);
  outline-offset: 2px;
}

.pl-local-reco-card__media {
  position: absolute;
  inset: 0;
  background: var(--pl-content-surface-alt);
}

.pl-local-reco-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pl-local-reco-card__initial {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pl-accent-soft-safe-fg);
  background: var(--pl-accent-soft-safe-bg);
}

.pl-local-reco-card__media.is-fallback .pl-local-reco-card__initial {
  display: flex;
}

.pl-local-reco-card__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 0.15rem;
  padding: 0.5rem 0.65rem 0.6rem;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--pl-accent-safe-bg, var(--pl-content-accent, #0b63ce)) 97%, transparent) 0%,
    color-mix(in srgb, var(--pl-accent-safe-bg, var(--pl-content-accent, #0b63ce)) 88%, transparent) 85%,
    transparent 100%
  );
}

.pl-local-reco-card__title {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  color: var(--pl-accent-safe-fg-hover, #ffffff);
}

.pl-local-reco-card__description {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.25;
  color: var(--pl-accent-safe-fg-hover, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-local-reco-card__link:not(:hover):not(:active) .pl-local-reco-card__title,
.pl-local-reco-card__link:not(:hover):not(:active) .pl-local-reco-card__description {
  color: var(--pl-accent-safe-fg-hover, #ffffff) !important;
}

.pl-local-reco-card__link:hover .pl-local-reco-card__content {
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--pl-content-surface, #ffffff) 96%, transparent) 0%,
    color-mix(in srgb, var(--pl-content-surface, #ffffff) 84%, transparent) 85%,
    transparent 100%
  );
}

.pl-local-reco-card__link:active .pl-local-reco-card__content {
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--pl-content-surface, #ffffff) 96%, transparent) 0%,
    color-mix(in srgb, var(--pl-content-surface, #ffffff) 84%, transparent) 85%,
    transparent 100%
  );
}

@media (min-width: 768px) {
  .pl-local-reco-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .pl-section-local-recommendations {
    height: auto;
    min-height: 0;
    align-self: stretch;
  }

  .pl-section-local-recommendations .pl-section-body {
    flex: 0 1 auto;
    min-height: 0;
  }

  .pl-local-reco-grid {
    justify-content: center;
    align-content: start;
    grid-template-columns: repeat(3, minmax(0, 14rem));
    gap: 0.7rem;
  }

  .pl-local-reco-grid[data-count="1"] {
    grid-template-columns: minmax(0, 19rem);
  }

  .pl-local-reco-grid[data-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 16rem));
  }

  .pl-local-reco-grid[data-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 14rem));
  }

  .pl-local-reco-grid[data-count="5"] {
    grid-template-columns: repeat(3, minmax(0, 14rem));
  }

  .pl-local-reco-grid[data-count="5"] > .pl-local-reco-card:nth-child(4) {
    grid-column: 1 / 2;
    justify-self: stretch;
    width: 100%;
  }

  .pl-local-reco-grid[data-count="5"] > .pl-local-reco-card:nth-child(5) {
    grid-column: 3 / 4;
    justify-self: stretch;
    width: 100%;
  }

}
