/* Home Italy flipbook viewer */
.hi-flipbook-page {
  --hi-blue: #0b1b30;
  --hi-red: #b30000;
  --hi-muted: #687385;
  --hi-soft: #f3f6fa;
  --hi-card: #ffffff;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 52px;
}

.hi-flipbook-hero {
  min-height: 280px;
  border-radius: 28px;
  padding: clamp(28px, 5vw, 56px);
  color: #fff;
  background:
    linear-gradient(120deg, rgba(11, 27, 48, .96), rgba(179, 0, 0, .72)),
    url('/public/img/testata_home.png') center/cover no-repeat;
  box-shadow: 0 24px 60px rgba(11, 27, 48, .22);
  overflow: hidden;
  position: relative;
}

.hi-flipbook-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -80px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
}

.hi-flipbook-hero-content {
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.hi-flipbook-kicker {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
  margin-bottom: 16px;
}

.hi-flipbook-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1;
  margin: 0 0 18px;
  font-weight: 900;
}

.hi-flipbook-hero p {
  max-width: 700px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  opacity: .95;
  margin-bottom: 24px;
}

.hi-flipbook-actions,
.hi-flipbook-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hi-btn,
.hi-flipbook-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.hi-btn:hover,
.hi-flipbook-btn:hover {
  transform: translateY(-1px);
}

.hi-btn-light {
  background: #fff;
  color: var(--hi-blue);
}

.hi-btn-outline-light {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.45);
}

.hi-btn-primary {
  background: var(--hi-red);
  color: #fff;
}

.hi-flipbook-shell {
  margin-top: 26px;
  border-radius: 28px;
  background: var(--hi-soft);
  padding: clamp(14px, 3vw, 28px);
  box-shadow: 0 18px 52px rgba(11, 27, 48, .12);
}

.hi-flipbook-toolbar {
  justify-content: center;
  margin-bottom: 18px;
}

.hi-flipbook-btn {
  background: #fff;
  color: var(--hi-blue);
  box-shadow: 0 8px 22px rgba(11, 27, 48, .08);
}

.hi-flipbook-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.hi-flipbook-counter {
  background: var(--hi-blue);
  color: #fff;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 800;
}

.hi-flipbook-book {
  min-height: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1600px;
  overflow: hidden;
}

.hi-flipbook-page-canvas-wrap {
  max-width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow:
    0 28px 70px rgba(11, 27, 48, .24),
    inset 0 0 0 1px rgba(11, 27, 48, .06);
  transform-origin: left center;
  transition: transform .32s ease, opacity .32s ease;
}

.hi-flipbook-page-canvas-wrap.is-turning-next {
  transform: rotateY(-7deg) translateX(8px);
  opacity: .65;
}

.hi-flipbook-page-canvas-wrap.is-turning-prev {
  transform: rotateY(7deg) translateX(-8px);
  opacity: .65;
}

.hi-flipbook-page-canvas-wrap canvas {
  display: block;
  width: auto;
  max-width: min(100%, 920px);
  height: auto;
  border-radius: 6px;
}

.hi-flipbook-mobile-hint {
  text-align: center;
  color: var(--hi-muted);
  font-size: .92rem;
  margin-top: 14px;
}

.hi-flipbook-fallback {
  text-align: center;
  background: #fff;
  border-radius: 20px;
  padding: 28px;
}

.hi-flipbook-shell:fullscreen {
  border-radius: 0;
  width: 100vw;
  min-height: 100vh;
  overflow: auto;
  background: #eef2f7;
}

@media (max-width: 767px) {
  .hi-flipbook-page {
    padding-inline: 10px;
  }
  .hi-flipbook-hero {
    border-radius: 22px;
  }
  .hi-flipbook-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .hi-flipbook-counter,
  .hi-flipbook-fullscreen {
    grid-column: span 2;
  }
  .hi-flipbook-page-canvas-wrap {
    padding: 6px;
  }
}
