/* =======================================
   EBOOK PAGE - stili aggiuntivi
   Dipende da style.css (classi base)
   ======================================= */

/* Titolo hero: italic dorato */
.ebook-hero-title em {
  color: var(--gold);
  font-style: italic;
}

/* Numero capitolo grande */
.ebook-chapter-num {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 38px;
  font-weight: 600;
  color: var(--gold);
  opacity: .30;
  line-height: 1;
  margin-bottom: 8px;
}

.ebook-chapter-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.3;
}

/* Quote centrale */
.ebook-quote {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(17px, 2.2vw, 22px);
  color: var(--text);
  font-style: italic;
  line-height: 1.5;
  margin: 0;
  position: relative;
}

.ebook-quote::before {
  content: '\201C';
  font-size: 64px;
  color: var(--gold);
  opacity: .20;
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-56px);
  line-height: 1;
  pointer-events: none;
}

/* Layout form + colonna laterale */
.ebook-form-wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  margin-top: 36px;
  align-items: start;
}

/* Copertina ebook 3D */
.ebook-cover-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 12px;
}

.ebook-cover {
  position: relative;
  width: 210px;
  flex-shrink: 0;
  perspective: 900px;
}

.ebook-cover-inner {
  width: 210px;
  min-height: 290px;
  background: linear-gradient(155deg, #2e2a22 0%, #1a160f 45%, #252018 100%);
  border: 1px solid rgba(215,199,166,.30);
  border-radius: 4px 16px 16px 4px;
  padding: 26px 22px 22px;
  box-shadow:
    4px 8px 24px rgba(0,0,0,.60),
    0 0 0 1px rgba(215,199,166,.10),
    inset 0 0 36px rgba(0,0,0,.40);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transform: rotateY(-8deg);
  transition: transform .35s ease, box-shadow .35s ease;
}

.ebook-cover-inner::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(215,199,166,.16);
  border-radius: 2px 11px 11px 2px;
  pointer-events: none;
}

.ebook-cover:hover .ebook-cover-inner {
  transform: rotateY(-2deg);
  box-shadow:
    10px 16px 36px rgba(0,0,0,.65),
    0 0 0 1px rgba(215,199,166,.18),
    inset 0 0 36px rgba(0,0,0,.40);
}

.ebook-cover-kicker {
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
  opacity: .80;
}

.ebook-cover-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  color: #F2F1ED;
  margin-bottom: 10px;
}

.ebook-cover-subtitle {
  font-size: 11px;
  color: rgba(242,241,237,.55);
  line-height: 1.45;
  font-weight: 400;
}

.ebook-cover-bottom {
  border-top: 1px solid rgba(215,199,166,.20);
  padding-top: 12px;
}

.ebook-cover-author {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 13px;
  color: var(--gold);
  font-weight: 500;
}

.ebook-cover-role {
  font-size: 10px;
  color: rgba(242,241,237,.40);
  margin-top: 3px;
  letter-spacing: .05em;
}

.ebook-cover-spine {
  position: absolute;
  left: -13px;
  top: 0;
  width: 13px;
  height: 100%;
  background: linear-gradient(90deg, #0d0b08, #2e2a22);
  border-radius: 4px 0 0 4px;
  box-shadow: -3px 4px 12px rgba(0,0,0,.55);
}

.ebook-cover-shadow {
  position: absolute;
  bottom: -16px;
  left: 12px;
  right: -6px;
  height: 24px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.40) 0%, transparent 75%);
  filter: blur(5px);
  pointer-events: none;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 900px) {
  .ebook-cover-wrap {
    justify-content: center;
    padding-right: 0;
    margin-top: 12px;
  }

  .ebook-cover-inner {
    transform: rotateY(0deg);
  }

  .ebook-form-wrap {
    grid-template-columns: 1fr;
  }

  .ebook-form-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .ebook-cover {
    width: 175px;
  }

  .ebook-cover-inner {
    width: 175px;
    min-height: 245px;
  }

  .ebook-cover-title {
    font-size: 20px;
  }

  .ebook-form-side {
    grid-template-columns: 1fr;
  }
}
