/* =========================================================
   MY BOOKS PAGE
   White page. Each book section has a big cyan/rose shape image as its
   background (right side), text on the left, and the book cover sitting
   on the shape.
========================================================= */

.books-wrap {
  width: min(1280px, 90%);
  margin-inline: auto;
}

/* ---------- PAGE TITLE ---------- */

.books-hero {
  --header-h: 153px; /* height of the header strip. Set to 0px if the header does NOT overlay the page */
  padding: calc(var(--header-h) + 1rem) 0 0 !important;
  background: #ffffff;
}

.books-title {
  margin: 0;

  font-family: var(--serif, "Playfair Display", Georgia, serif);
  font-size: clamp(3.8rem, 6.6vw, 7.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #050505;
}

.books-title .accent {
  color: var(--gold, #eba42d);
}

/* ---------- BOOK SECTION ---------- */

.book-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  display: flex;
  align-items: center;

  min-height: clamp(860px, 72vw, 1400px); /* taller section = bigger (zoomed) shape */
  padding: clamp(2rem, 3vw, 3.5rem) 0 clamp(4rem, 8vw, 9rem) !important;
  background-color: #ffffff;
}

/* BACKGROUND IMAGE LAYER (the cyan/rose shape).
   Set per section: style="--book-bg: url('Images/your-file.jpg')"
   It starts at the top, hugs the right edge and grows with the section height. */
.book-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background-image: var(--book-bg, none);
  background-repeat: no-repeat;
  background-position: right top;
  /* The image is exactly as tall as the section, so the shape shows WHOLE:
     rounded top AND rounded bottom, nothing cut. To zoom it more, make the
     section taller (min-height above). */
  background-size: auto 100%;
}

.book-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  align-items: center;
  gap: clamp(2rem, 2.5vw, 3rem);
}

/* ---------- TEXT ---------- */

.book-content {
  max-width: 740px;
}

.book-tagline {
  margin: 0 0 0.5rem;

  font-family: var(--serif, "Playfair Display", Georgia, serif);
  font-size: clamp(0.9rem, 0.95vw, 1.1rem);
  font-weight: 600;
  color: var(--gold, #eba42d);
}

.book-title {
  margin: 0 0 1.2rem;

  font-family: var(--serif, "Playfair Display", Georgia, serif);
  font-size: clamp(2.4rem, 3.4vw, 3.8rem);
  font-weight: 600;
  line-height: 1.1;
  color: #050505;
}

.book-content p:not(.book-tagline) {
  margin: 0 0 1.1rem;

  font-family: var(--sans, "Montserrat", Arial, sans-serif);
  font-size: clamp(1rem, 0.93vw, 1.15rem);
  line-height: 1.32;
  color: #111111;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* ---------- AMAZON IMAGE BUTTON ---------- */

.amazon-link {
  display: inline-block;
  line-height: 0;
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * clamp(1rem, 2.6vw, 3rem)); /* pulls the button up toward the book. Bigger number = closer */
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.amazon-link img {
  width: clamp(150px, 11vw, 190px);
  height: auto;
}

.amazon-link:hover,
.amazon-link:focus-visible {
  transform: translateY(-3px);
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.3));
}

/* ---------- BOOK COVER (sits on the shape) ---------- */

.book-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem; /* space between the book and the Amazon button */
}

.book-cover {
  width: clamp(300px, 26vw, 520px);
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.3));
}

/* ---------- SECOND BOOK: cover on the left, text on the right, background mirrored ---------- */

.book-section--reverse .book-grid {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
}

.book-section--reverse .book-visual {
  order: -1;
}

/* background flipped so the shape sits on the LEFT, behind the cover */
.book-section--reverse::before {
  transform: scaleX(-1);
}

/* ---------- MOBILE ---------- */

@media (max-width: 860px) {
  .books-hero {
    --header-h: 100px;
  }

  .books-title {
    text-align: center;
  }

  .book-section,
  .book-section--reverse {
    display: block;
    min-height: 0;
    padding-bottom: 0 !important;
  }

  .book-grid,
  .book-section--reverse .book-grid {
    grid-template-columns: 1fr;
  }

  /* On mobile the cover always comes after the text */
  .book-section--reverse .book-visual {
    order: 0;
  }

  .book-content p:not(.book-tagline) {
    font-size: 1.05rem;
    line-height: 1.5;
  }

  /* shape becomes a banner behind the cover, text stays on white */
  .book-section::before {
    top: auto;
    height: 540px;
    background-position: center;
    background-size: cover;
    transform: scale(1.15);
    transform-origin: center;
  }

  .book-section--reverse::before {
    transform-origin: center;
    transform: scale(-1.15, 1.15);
  }


  .book-visual {
    min-height: 540px;
  }

  .book-cover {
    width: min(320px, 72%);
  }

  .amazon-link img {
    width: 160px;
  }
}

/* =========================================================
   FOOTER LINKS: no underline (email, phone, "Developed by")
========================================================= */

.site-footer a,
.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: none !important;
  border-bottom: 0 !important;
}