/* Rivista page specific styles */
.bfz-rivista {
  position: relative;
  padding-bottom: 44px;
}

.bfz-rivista-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 70px) 0 clamp(76px, 8vw, 116px);
  background: var(--bfz-blue);
}

.bfz-rivista-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(243, 244, 247, 0), rgba(243, 244, 247, 0.96));
  pointer-events: none;
}

.bfz-rivista-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
}

.bfz-rivista-hero-copy {
  max-width: 900px;
  text-align: center;
}

.bfz-rivista-hero-copy h1 {
  margin: 0;
  color: var(--bfz-white);
  font-size: clamp(1.85rem, 4vw, 3.6rem);
  line-height: 1.05;
  font-weight: 800;
}

.bfz-rivista-hero-copy p {
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.87);
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  line-height: 1.5;
  max-width: 64ch;
}

.bfz-rivista-content-wrap {
  margin-top: clamp(-72px, -6vw, -48px);
  position: relative;
  z-index: 3;
}

.bfz-rivista-card {
  background: #f3f4f7;
  border: 1px solid rgba(23, 72, 142, 0.14);
  border-radius: 22px;
  box-shadow: 0 24px 48px rgba(23, 43, 70, 0.18);
  overflow: hidden;
}

/* Left side: Preview section */
.bfz-rivista-preview-side {
  height: 100%;
  padding: clamp(24px, 3.5vw, 40px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.42));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.bfz-rivista-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.bfz-rivista-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #1d4f96;
  background: rgba(29, 79, 150, 0.08);
}

.bfz-rivista-preview-image {
  width: 100%;
  max-width: min(360px, 100%);
  flex-shrink: 0;
}

.bfz-rivista-cover-link {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(14, 60, 123, 0.16);
  box-shadow: 0 10px 20px rgba(17, 40, 84, 0.18);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
  background: #ffffff;
  width: 100%;
}

.bfz-rivista-cover-link:hover,
.bfz-rivista-cover-link:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 28px rgba(17, 40, 84, 0.24);
}

.bfz-rivista-cover-link img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.bfz-rivista-empty-preview {
  min-height: 240px;
  border-radius: 16px;
  border: 1px dashed rgba(15, 78, 169, 0.28);
  background: rgba(255, 255, 255, 0.5);
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  color: #365888;
  padding: 20px;
  width: 100%;
}

.bfz-rivista-empty-preview i {
  font-size: 2.8rem;
  color: var(--bfz-blue);
}

.bfz-rivista-empty-preview p {
  margin: 0;
  font-weight: 700;
}

.bfz-rivista-info-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 12px;
  color: #204679;
  background: rgba(33, 84, 153, 0.12);
  border: 1px solid rgba(33, 84, 153, 0.2);
  font-size: 0.96rem;
  font-weight: 700;
  margin-top: auto;
}

/* Right side: Info section */
.bfz-rivista-info {
  height: 100%;
  padding: clamp(24px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bfz-rivista-intro {
  margin: 0 0 16px;
  color: #384765;
  line-height: 1.6;
  font-size: 1.2rem;
}

.bfz-rivista-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bfz-rivista-content-description {
  margin: 0;
  color: #4d6286;
  line-height: 1.65;
  font-size: 1.15rem;
  text-align: left;
}

.bfz-rivista-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.bfz-rivista-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 62px;
  padding: 0 32px;
  border-radius: 999px;
  border: 0;
  color: var(--bfz-white);
  background: var(--bfz-blue);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 12px 22px rgba(10, 54, 167, 0.27);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.bfz-rivista-btn:hover,
.bfz-rivista-btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 16px 30px rgba(10, 54, 167, 0.31);
  color: var(--bfz-white);
}

.bfz-rivista-btn:active {
  transform: translateY(0) scale(0.98);
}

.bfz-rivista-btn.is-primary {
  color: var(--bfz-white);
  background: var(--bfz-blue);
}

.bfz-rivista-btn.is-primary:hover,
.bfz-rivista-btn.is-primary:focus-visible {
  color: var(--bfz-white);
}

.bfz-rivista-card.is-revealed {
  animation: bfzRivistaCardIn 0.48s ease both;
}

@keyframes bfzRivistaCardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 991.98px) {
  .bfz-rivista-hero {
    padding-bottom: 70px;
  }

  .bfz-rivista-hero-inner {
    display: block;
  }

  .bfz-rivista-content-wrap {
    margin-top: -40px;
  }

  .bfz-rivista-preview-side {
    border-bottom: 1px solid rgba(23, 72, 142, 0.14);
  }
}

@media (max-width: 575.98px) {
  .bfz-rivista {
    padding-bottom: 28px;
  }

  .bfz-rivista-hero {
    padding: 22px 0 62px;
  }

  .bfz-rivista-hero-copy h1 {
    font-size: clamp(1.56rem, 8vw, 2.06rem);
  }

  .bfz-rivista-hero-copy p {
    margin-top: 10px;
    font-size: 1.05rem;
  }

  .bfz-rivista-content-wrap {
    margin-top: -30px;
  }

  .bfz-rivista-card {
    border-radius: 16px;
  }

  .bfz-rivista-preview-side,
  .bfz-rivista-info {
    padding: 18px;
  }

  .bfz-rivista-badge {
    font-size: 0.88rem;
    padding: 8px 13px;
  }

  .bfz-rivista-actions {
    flex-direction: column;
  }

  .bfz-rivista-btn {
    width: 100%;
    min-height: 50px;
    font-size: 1.06rem;
  }

  .bfz-rivista-empty-preview {
    min-height: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bfz-rivista-btn,
  .bfz-rivista-cover-link,
  .bfz-rivista-card {
    transition: none;
    animation: none;
  }

  .bfz-rivista-btn:hover,
  .bfz-rivista-btn:focus-visible,
  .bfz-rivista-btn:active,
  .bfz-rivista-cover-link:hover,
  .bfz-rivista-cover-link:focus-visible {
    transform: none;
  }
}
