/* Place card in the list view (site/snippets/place-card.php). */

.place-card {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 100%;
  max-width: 64rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  text-align: left;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.4s ease;
}

.place-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}

.place-card__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.place-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.place-card__desc {
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
  line-height: 1.5;
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.place-card__arrow {
  align-self: flex-start;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
}

/* Hover: a slightly deeper shadow and a black arrow that nudges right.
   Limited to real hover devices so touch screens don't get a "stuck"
   hover after tapping; keyboard focus gets the same treatment. */

@media (hover: hover) {
  .place-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  }
  .place-card:hover .place-card__arrow {
    color: #000;
    transform: translateX(6px);
  }
}

.place-card:focus-visible {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.place-card:focus-visible .place-card__arrow {
  color: #000;
  transform: translateX(6px);
}

@media (prefers-reduced-motion: reduce) {
  .place-card__arrow {
    transform: none !important;
  }
}

@media (min-width: 768px) {
  .place-card {
    flex-direction: row;
    align-items: flex-start;
    max-height: 320px;
    height: 100%;
  }
  .place-card__image {
    width: 50%;
    height: 100%;
  }
  .place-card__body {
    width: 50%;
    height: 100%;
    padding: 1.5rem;
  }

  .place-card__title {
    font-size: 1.5rem;
  }
  .place-card__desc {
    font-size: 1rem;
  }
}
