/*
 * A full-width photo with a frosted card on top (front page, "Miks valida
 * meid?"). The headline's last words take turns (.yb-rotating-words).
 */
.yb-photo-band {
  position: relative;
  min-height: 900px;
  margin-top: var(--yb-space-section);
  padding-top: 60px;
}

.yb-photo-band__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yb-glass-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 600px;
  min-height: 330px;
  padding: 30px;
  border-radius: var(--yb-radius-panel);
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(1.8) blur(40px);
  backdrop-filter: saturate(1.8) blur(40px);
}

.yb-glass-card__top {
  display: flex;
  align-self: stretch;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 30px;
}

.yb-glass-card__top .yb-tag {
  margin-top: 0;
}

.yb-glass-card__top .yb-icon-badge {
  width: 58px;
  height: 58px;
  margin-top: -8px;
  font-size: 18px;
}

.yb-glass-card h2 {
  margin: 0 0 16px;
}

.yb-glass-card p {
  margin: 0;
}

/* Words that take turns: each shows for 3s, then the next one. */
.yb-rotating-words {
  display: grid;
  color: var(--yb-color-primary-light);
}

.yb-rotating-words > span {
  grid-area: 1 / 1;
  opacity: 0;
  animation: yb-rotate-words 9s infinite;
}

.yb-rotating-words > span:nth-child(2) { animation-delay: 3s; }
.yb-rotating-words > span:nth-child(3) { animation-delay: 6s; }

@keyframes yb-rotate-words {
  0%, 30% { opacity: 1; }
  33%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .yb-rotating-words > span {
    animation: none;
  }

  .yb-rotating-words > span:first-child {
    opacity: 1;
  }
}

/* Tablet, as live: a 600 px band with the card at its bottom. */
@media (min-width: 768px) and (max-width: 1024px) {
  .yb-photo-band {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 600px;
    margin-block: 60px 0; /* the band that follows brings its own 60 px */
    padding-block: 30px;
  }

  .yb-glass-card {
    min-height: 296px;
  }
}

@media (max-width: 767px) {
  .yb-photo-band {
    min-height: 0;
    padding-block: 480px 30px;
  }

  .yb-glass-card {
    padding: 20px;
  }
}
