/* Location cards: one card per SILO location with an image, the place, the
   name and a few ruled facts. The whole card is one link (the title link
   stretches over it). Home and the aanbod overview. */

@layer components {
  .location-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
    gap: var(--theme-space-sm);
  }

  .location-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    background: var(--theme-color-surface);
    container-type: inline-size;
  }

  .section--white .location-card {
    background: var(--theme-color-background);
  }

  .location-card__media {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--theme-color-panel);
  }

  .location-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale var(--theme-duration) var(--theme-ease-signature);
  }

  .location-card__body {
    display: flex;
    flex-direction: column;
    align-content: start;
    gap: var(--theme-space-2xs);
    padding: var(--theme-space-sm);
  }

  .location-card__place {
    font-size: var(--theme-text-xs);
    font-weight: var(--theme-weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .location-card__title {
    font-size: var(--theme-text-xl);
  }

  .location-card__title a {
    text-decoration: none;
  }

  .location-card__title a::after {
    content: '';
    position: absolute;
    inset: 0;
  }

  .location-card__facts {
    margin-top: var(--theme-space-2xs);
    font-size: var(--theme-text-sm);
  }

  .location-card__more {
    margin-top: auto;
    padding-top: var(--theme-space-2xs);
    font-size: var(--theme-text-sm);
    font-weight: var(--theme-weight-bold);
  }

  .location-card__more::after {
    content: ' →';
  }

  .location-card:has(a:hover) .location-card__title a,
  .location-card:has(a:focus-visible) .location-card__title a {
    text-decoration: underline;
    text-decoration-color: var(--theme-color-accent);
    text-decoration-thickness: 3px;
  }

  @media (prefers-reduced-motion: no-preference) {
    .location-card:has(a:hover) .location-card__media img {
      scale: 1.03;
    }
  }

  /* A location without its own page yet: SILO mark on light blue */
  .location-card--soon .location-card__media {
    display: grid;
    place-items: center;
  }

  .location-card--soon .location-card__media::before {
    content: '';
    width: 22%;
    aspect-ratio: 34 / 46.72;
    background: var(--theme-color-on-dark);
    mask: url('../../media/brand/silo-mark.svg?v=829781ec') center / contain no-repeat;
  }
}
