/* =========================================
   HERO VIDEO
========================================= */

.hero-section {
  width: 100%;
  height: 100vh;
  min-height: 500px;

  position: relative;

  background: #000;

  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  display: block;
}

/* =========================================
   AUTHOR INTRODUCTION SECTION
========================================= */

.author-intro-section {
  width: 100%;
  min-height: 100vh;

  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 100px 25px 90px;

  background: #000;

  overflow: hidden;
}

/* =========================================
   BACKGROUND VIDEO
========================================= */

.author-intro-video {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  z-index: 0;
}

/* =========================================
   VIDEO OVERLAY
========================================= */

.author-intro-overlay {
  position: absolute;
  inset: 0;

  z-index: 1;

  background: rgba(0, 0, 0, 0.72);

  pointer-events: none;
}

/* =========================================
   CONTENT CONTAINER
========================================= */

.author-intro-container {
  width: 100%;
  max-width: 850px;

  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: center;

  text-align: center;
}

/* =========================================
   AUTHOR PORTRAIT
========================================= */

.author-portrait {
  width: 230px;
  height: 230px;

  margin-bottom: 15px;

  border-radius: 50%;
  overflow: hidden;

  border: 3px solid rgba(255, 255, 255, 0.12);

  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.author-portrait img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
  object-position: center;
}

/* =========================================
   HEADING
========================================= */

.author-intro-title {
  max-width: 750px;

  margin-bottom: 18px;

  color: #fff;

  font-size: clamp(32px, 4vw, 58px);
  font-weight: 800;

  line-height: 1.2;
  letter-spacing: -1px;
}

.author-intro-title span {
  display: block;
}

/* =========================================
   DESCRIPTION
========================================= */

.author-intro-description {
  width: 100%;
  max-width: 800px;

  color: rgba(255, 255, 255, 0.95);

  font-size: clamp(16px, 1.45vw, 24px);
  font-weight: 400;

  line-height: 1.65;
  letter-spacing: -0.2px;

  margin-bottom: 22px;
}

/* =========================================
   LEARN MORE BUTTON
========================================= */

.author-intro-button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding: 12px 25px;

  background: #f5a623;
  color: #792a28;

  border-radius: 30px;

  text-decoration: none;

  font-size: 15px;
  font-weight: 800;

  letter-spacing: 0.5px;

  transition: all 0.3s ease;
}

.author-intro-button:hover {
  background: #fff;
  color: #812d2b;

  transform: translateY(-4px);

  box-shadow: 0 8px 25px rgba(245, 166, 35, 0.25);
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */

@media (max-width: 900px) {
  .author-intro-section {
    padding: 100px 30px 80px;
  }

  .author-portrait {
    width: 190px;
    height: 190px;
  }

  .author-intro-description {
    max-width: 700px;
    font-size: 18px;
  }
}

@media (max-width: 700px) {
  .author-intro-section {
    min-height: 100vh;
    padding: 110px 22px 70px;
  }

  .author-portrait {
    width: 160px;
    height: 160px;
    margin-bottom: 22px;
  }

  .author-intro-title {
    font-size: 34px;
    line-height: 1.2;
    margin-bottom: 18px;
  }

  .author-intro-description {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 25px;
  }

  .author-intro-button {
    font-size: 13px;
    padding: 12px 23px;
  }
}

@media (max-width: 400px) {
  .author-intro-title {
    font-size: 29px;
  }

  .author-intro-description {
    font-size: 15px;
  }

  .author-portrait {
    width: 140px;
    height: 140px;
  }
}

/* =========================================
   BOOK SHOWCASE SECTION
========================================= */

.books-showcase {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 55px 30px 80px;
  overflow: hidden;
  isolation: isolate;

  background:
    linear-gradient(rgba(255, 255, 255, 0.77), rgba(255, 255, 255, 0.82)),
    url("images/books-background.jpg") center / cover no-repeat,
    #eee9e8;
}

/* =========================================
   MAIN CONTAINER
========================================= */

.books-container {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;

  align-items: start;
}

/* =========================================
   BOOK ITEM
========================================= */

.book-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

/* =========================================
   BOOK COVER IMAGE
========================================= */

.book-image {
  width: 100%;
  height: 320px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 15px;
}

.book-image img {
  width: 400px;
  height: 370px;

  object-fit: contain;

  filter: drop-shadow(7px 10px 7px rgba(0, 0, 0, 0.3));

  transition: transform 0.4s ease;
}

.book-item:hover .book-image img {
  transform: translateY(-6px);
}

/* =========================================
   BOOK TITLE
========================================= */

.book-content {
  width: 100%;
  max-width: 330px;
}

.book-content h2 {
  font-family: "Poppins", Arial, sans-serif;

  font-size: 21px;
  font-weight: 700;

  line-height: 1.5;
  letter-spacing: -0.45px;

  color: #87352f;

  margin: 0 0 8px;
}

/* =========================================
   BOOK DESCRIPTION
========================================= */

.book-content p {
  font-family: "Poppins", Arial, sans-serif;

  font-size: 16px;
  font-weight: 400;

  line-height: 1.78;
  letter-spacing: 0;

  color: #666666;

  text-indent: 35px;
  text-align: justify;

  margin: 0 0 25px;
}

/* =========================================
   BUY BUTTON
========================================= */

.book-button {
  display: inline-block;

  padding: 9px 20px;

  font-family: "Poppins", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  font-style: italic;

  color: #87352f;
  background: #ffad29;

  text-decoration: none;
  border-radius: 30px;

  transition: all 0.3s ease;
}

.book-button:hover {
  background: #87352f;
  color: #ffffff;

  transform: translateY(-3px);

  box-shadow: 0 6px 16px rgba(135, 53, 47, 0.2);
}

/* =========================================
   TABLET RESPONSIVE
========================================= */

@media (max-width: 900px) {
  .books-container {
    gap: 25px;
  }

  .book-image {
    height: 270px;
  }

  .book-image img {
    width: 190px;
    height: 245px;
  }

  .book-content h2 {
    font-size: 18px;
  }

  .book-content p {
    font-size: 13px;
  }
}

/* =========================================
   MOBILE RESPONSIVE
========================================= */

@media (max-width: 650px) {
  .books-showcase {
    padding: 45px 20px 65px;
  }

  .books-container {
    grid-template-columns: 1fr;
    gap: 55px;
    max-width: 430px;
  }

  .book-image {
    height: 300px;
    margin-bottom: 10px;
  }

  .book-image img {
    width: 220px;
    height: 280px;
  }

  .book-content {
    max-width: 100%;
  }

  .book-content h2 {
    font-size: 21px;
  }

  .book-content p {
    font-size: 14px;
    line-height: 1.8;
  }

  .book-button {
    font-size: 15px;
  }
}

.books-bg-image {
  position: absolute;
  inset: 0;
  z-index: -1;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: 100% 40%;

  transform: scale(1.1);
  transform-origin: 100% 40%;

  opacity: 0.35;
  filter: blur(15px);

  pointer-events: none;
}

/* ==============================
   GET IN TOUCH SECTION
============================== */

.contact-cta {
  position: relative;
  width: 100%;
  min-height: 440px;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
  padding: 80px 25px;

  overflow: hidden;
  isolation: isolate;
}

/* BACKGROUND IMAGE */

.contact-cta-bg {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  z-index: -2;
}

/* IMAGE OVERLAY */

.contact-cta-overlay {
  position: absolute;
  inset: 0;

  z-index: -1;
}

/* CONTENT */

.contact-cta-content {
  position: relative;

  width: 100%;
  max-width: 800px;

  margin: auto;
  z-index: 1;
}

.contact-cta-content h2 {
  font-family: "Poppins", Arial, sans-serif;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 800;

  color: #842b25;

  margin-bottom: 20px;
  line-height: 1.2;
}

.contact-cta-content p {
  font-family: "Poppins", Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;

  line-height: 1.8;
  color: #171717;

  margin-bottom: 42px;
}

.contact-cta-button {
  display: inline-block;

  padding: 11px 24px;

  background: #842b25;
  color: #ffffff;

  font-family: "Poppins", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;

  text-decoration: none;
  border-radius: 50px;

  transition: all 0.3s ease;
}

.contact-cta-button:hover {
  background: #171717;
  color: #ffffff;
  transform: translateY(-3px);
}

/* ==============================
   RESPONSIVE DESIGN
============================== */

@media (max-width: 768px) {
  .contact-cta {
    min-height: 380px;
    padding: 65px 22px;
  }

  .contact-cta-content h2 {
    font-size: 32px;
  }

  .contact-cta-content p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
  }
}

@media (max-width: 480px) {
  .contact-cta {
    min-height: 350px;
    padding: 55px 20px;
  }

  .contact-cta-content h2 {
    font-size: 27px;
  }

  .contact-cta-content p {
    font-size: 14px;
  }
}

/* BOOK IMAGE SCROLL ANIMATION */

.book-image {
  opacity: 0;
  transform: translateY(-70px);

  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.book-image.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==============================
   AUTHOR INTRO SCROLL ANIMATION
============================== */

.author-portrait,
.author-intro-title,
.author-intro-description,
.author-intro-button {
  opacity: 0;
  transform: translateY(50px);

  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-portrait.show,
.author-intro-title.show,
.author-intro-description.show,
.author-intro-button.show {
  opacity: 1;
  transform: translateY(0);
}

/* STAGGERED ANIMATION */

.author-portrait {
  transition-delay: 0.1s;
}

.author-intro-title {
  transition-delay: 0.25s;
}

.author-intro-description {
  transition-delay: 0.4s;
}

.author-intro-button {
  transition-delay: 0.55s;
}

/* =====================================================================
   ADDED: EXTRA RESPONSIVE RULES
   (Appended only - nothing above this line was changed.)
===================================================================== */

/* ---------- Global safety ---------- */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

video,
img {
  max-width: 100%;
}

/* ---------- Mobile browsers: 100vh includes the address bar,
              so use the "small viewport height" where supported ---------- */

@supports (height: 100svh) {
  .hero-section {
    height: 100svh;
  }

  .author-intro-section,
  .books-showcase {
    min-height: 100svh;
  }
}

/* =====================================================================
   HERO VIDEO
===================================================================== */

/* Tablets / phones in PORTRAIT:
   a wide logo video with object-fit: cover gets its left and right
   sides cropped off. Here we show the whole video instead, centred
   on the black background, at its natural aspect ratio. */

@media (max-width: 900px) and (orientation: portrait) {
  .hero-section {
    height: auto;
    min-height: 45vh;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-video {
    position: relative;
    inset: auto;

    width: 100%;
    height: auto;
    max-height: 100vh;

    object-fit: contain;
  }
}

/* Phones in LANDSCAPE (very short screens):
   keep the full video visible and avoid a cut-off logo */

@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    height: 100vh;
    min-height: 0;
  }

  .hero-video {
    object-fit: contain;
  }
}

/* Very large / ultra-wide monitors: stop the section from
   becoming absurdly tall or over-zooming the video */

@media (min-width: 1800px) {
  .hero-section {
    max-height: 1100px;
  }
}

/* =====================================================================
   AUTHOR INTRO
===================================================================== */

/* Short landscape screens: don't force a tall section
   that squashes the content */

@media (max-height: 600px) and (orientation: landscape) {
  .author-intro-section {
    min-height: auto;
    padding: 80px 30px 60px;
  }

  .author-portrait {
    width: 120px;
    height: 120px;
    margin-bottom: 14px;
  }
}

/* Large screens: keep line length comfortable */

@media (min-width: 1600px) {
  .author-intro-container {
    max-width: 950px;
  }
}

/* =====================================================================
   BOOKS SHOWCASE
===================================================================== */

/* Cover images were fixed at 400px wide, which can overflow
   their column - let them shrink to fit instead */

.book-image img {
  max-width: 100%;
}

.book-content p {
  overflow-wrap: break-word;
}

/* Small laptops / large tablets */

@media (max-width: 1100px) and (min-width: 901px) {
  .books-showcase {
    padding: 55px 24px 70px;
  }

  .books-container {
    gap: 32px;
  }

  .book-image {
    height: 300px;
  }

  .book-image img {
    width: 100%;
    height: 100%;
  }
}

/* Tablets: 3 narrow columns get cramped, so use 2 */

@media (max-width: 900px) and (min-width: 651px) {
  .books-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 45px 30px;
  }

  .book-image {
    height: 300px;
  }

  .book-image img {
    width: 220px;
    height: 280px;
  }

  .book-content {
    max-width: 100%;
  }

  .book-content p {
    font-size: 14px;
  }
}

/* Phones */

@media (max-width: 650px) {
  .book-image img {
    max-width: 85%;
  }

  .book-content p {
    text-indent: 25px;
  }
}

/* Very small phones */

@media (max-width: 380px) {
  .books-showcase {
    padding: 40px 16px 55px;
  }

  .book-image {
    height: 260px;
  }

  .book-image img {
    width: 190px;
    height: 240px;
  }

  .book-content h2 {
    font-size: 19px;
  }

  .book-content p {
    font-size: 13.5px;
  }
}

/* =====================================================================
   CONTACT CTA
===================================================================== */

@media (max-width: 380px) {
  .contact-cta-content h2 {
    font-size: 24px;
  }

  .contact-cta-button {
    font-size: 14px;
    padding: 10px 20px;
  }
}

@media (min-width: 1600px) {
  .contact-cta {
    min-height: 520px;
  }
}

/* =====================================================================
   ACCESSIBILITY: respect "reduce motion"
===================================================================== */

@media (prefers-reduced-motion: reduce) {
  .book-image,
  .author-portrait,
  .author-intro-title,
  .author-intro-description,
  .author-intro-button {
    transition: none;
  }
}
