/* Reels - desktop */

.reels {
  padding-block: 24px 40px;
}

.reels__header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

.reels__heading {
  margin: 0;
  color: var(--color-main, #000000);
  font-family: var(--font-family-main, sans-serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.reels__heading-link {
  color: inherit;
  text-decoration: none;
}

.reels__list {
  display: flex;
  gap: 16px;
  margin: 0;
  padding-block-start: 8px;
  padding-inline: 0;
  list-style: none;
}

.reels__item {
  flex: 1 1 0;
  min-width: 0;
}

/* Kafelek jest buttonem (otwiera popup), wiec zerujemy style przegladarki. */
.reels__link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  appearance: none;
}

.reels__media {
  display: block;
  position: relative;
  aspect-ratio: 180 / 320;
  overflow: hidden;
  border-radius: var(--radius-reels, 0);
}

/* Miniatura z CMS-a przychodzi w dowolnych proporcjach  - kadrujemy ja do slotu 9:16 */
.reels__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.reels__play {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  width: 56px;
  height: 56px;
  translate: -50% -50%;
  border-radius: 50%;
  background: url(../images/play.svg) no-repeat center / 56px 56px;
  pointer-events: none;
  transition: box-shadow 0.2s ease-in-out;
}

.reels__link:hover .reels__play {
  box-shadow: 0 0 0 2.5px rgba(255, 255, 255, 0.4);
}

.reels__overlay {
  display: block;
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  padding: 24px 16px 16px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.6) 50%,
    #000000 100%
  );
}

.reels__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
  margin: 0;
  color: var(--color-white, #ffffff);
  font-family: var(--font-family-main, sans-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
