/**
 * @file
 * Teaser component styles.
 */

.teasers-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xl);
}

.teaser {
  display: flex;
  flex-direction: column;
  background: var(--color-gray-900);
  border-radius: var(--border-radius-base);
  overflow: hidden;
  position: relative;
  flex: 0 0 calc(33.33% - var(--spacing-xl));
}

.teaser:hover,
.teaser:focus-within {
  background: hsla(0, 0%, 100%, 0.05);
}

.teaser__image {
  position: relative;
  width: 100%;
}

.teaser__image:after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  background-color: var(--overlay-dark-20);
  transition: background-color 0.3s ease;
}

.teaser__link:after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
}

.teaser:hover .teaser__image:after,
.teaser:focus-within .teaser__image:after {
  background: transparent;
}

.teaser__image img {
  width: 100%;
  min-height: 300px;
  display: block;
  border-radius: var(--border-radius-base) var(--border-radius-base) 0 0;
  object-fit: cover;
}

.teaser__content {
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  min-height: 160px;
}

.teaser__title {
  font-size: var(--font-size);
  font-weight: var(--font-weight-medium);
  margin-bottom: 0;
}

.teaser__text {
  display: none;
}

.teaser__meta {
  font-size: var(--font-size-sm);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  order: 1;
  margin-top: auto;
  justify-content: space-between;
  align-items: center;
}

.teaser__meta .tag {
  padding: var(--spacing-xs);
}

.teaser__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

@media screen and (min-width: 80em) {
  .teaser {
    flex: 0 0 calc(25% - var(--spacing-xl));
  }

  .teaser__content {
    min-height: 435px;
  }

  .teaser__title {
    font-size: var(--font-size-xl);
  }

  .teaser__text {
    display: block;
  }

  .full--homepage .teaser {
    flex: 0 0 calc(50% - var(--spacing-xl));
  }
}
