html, body {
  margin: 0;
  padding: 0;
  font-family: "IBM Plex Serif", serif;
  background: #fff;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  color: #2193AB;
}

a {
  text-decoration: none;
  color: #E72429;
}

/* ----------- Main container ----------- */
.page-container {
  display: flex;
  flex-direction: column;
  padding-top: 90px; /* space for fixed navbar */
}

@media (max-width: 768px) {
  .page-container {
    padding-top: 120px; /* a little extra on mobile since nav stacks */
  }
}

/* Each book section (natural scrolling layout) */
.book-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 4vh 2rem;
  box-sizing: border-box;
  min-height: 80vh; /* fallback for mobile */
}

.layout-left  { flex-direction: row; }
.layout-right { flex-direction: row-reverse; }

/* Image styling */
.book-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Headings & text */
.book-text1 h1,
.book-text2 h1,
.book-text3 h1,
.book-text4 h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  letter-spacing: 1px;
  font-weight: 800;
  font-size: 6rem;
  color: #fff;
  margin: 0;
  line-height: 1.1;
}

.book-text1 p,
.book-text2 p,
.book-text3 p,
.book-text4 p {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 3vw, 2rem);
  color: #fff;
}

.cover_link_right,
.cover_link_left {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 400;
  color: #fff;
  text-decoration: underline;
  margin-top: 1rem;
  display: inline-block;
}

/* Gradient backgrounds */
.book1 {
  background: linear-gradient(-45deg, #FFCB29, #E98D44, #FFD147, #FFCB29);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}
.book2 {
  background: linear-gradient(-45deg, #7661AA, #725CA7, #5636A3, #7661AA);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}
.book3 {
  background: linear-gradient(-45deg, #D03241, #C02C42, #8B181B, #D03241);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}
.book4 {
  background: linear-gradient(-45deg, #1EBE5D, #2DB64D, #1DA68A, #AA2AEE);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===================== */
/* INNER PAGE STYLING    */
/* ===================== */

.inner-page {
  padding-top: 90px; /* space for fixed navbar */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.inner-section {
  width: 80%;
  max-width: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  padding: 2rem 0;
  box-sizing: border-box;
}

.inner-image {
  display: flex;
  justify-content: center;
}

.inner-image img {
  width: 100%;
  max-width: 350px;
}

.inner-text {
  flex: 1;
}

.inner-text h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  letter-spacing: 1px;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
}

.inner-text p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #2193AB;
}

/* ---------- Mobile / Tablet ---------- */
@media (max-width: 970px) {
  .inner-section {
    flex-direction: column;
    width: 90%;
    text-align: left;
    gap: 2rem;
    padding: 2rem 0;
  }

  .inner-page {
    padding-top: 120px; /* extra padding for stacked mobile nav */
  }

  .inner-image img {
    max-width: 50%;
  }
}



/* ===================== */
/* NAVIGATION STRUCTURE  */
/* ===================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: height 0.3s ease, padding 0.3s ease;
}

.nav-logo {
  flex-shrink: 0;
}

.nav-links {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.5em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 0 50px;
  padding: 0;
  flex: 1;
  text-align: right;
}

.nav-links a {
  color: #E72429;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #91191B;
}

/* Logo resizing on shrink */
.navbar img {
  height: 60px;
  width: auto;
  transition: height 0.3s ease;
}

.navbar.shrink {
  height: 90px;
}

.navbar.shrink img {
  height: 40px;
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.nav-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: #000;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile menu open state */
.navbar.open .nav-toggle .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.navbar.open .nav-toggle .bar:nth-child(2) {
  opacity: 0;
}
.navbar.open .nav-toggle .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile layout */
@media (max-width: 970px) {
  .nav-links {
    position: fixed;
    top: 90px;
    left: 0;
    margin: 20px 0 0 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .navbar.open .nav-links {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-toggle {
    display: flex;
    margin: 0 0 0 -32px;
  }

  .navbar.shrink .nav-links {
    top: 70px;
  }

  body.menu-open {
    overflow: hidden; /* Prevent background scroll */
  }

  .navbar {
    flex-direction: column;
    height: auto;
    padding: 1rem;
  }

  .navbar img {
    height: 50px;
    margin-bottom: 0.5rem;
  }

  .book-text1 h1,
  .book-text2 h1,
  .book-text3 h1,
  .book-text4 h1 {
    font-family: "Bricolage Grotesque", sans-serif;
    letter-spacing: 1px;
    font-weight: 800;
    font-size: 2rem;

}

/* Responsive stacking for smaller screens */
@media (min-width: 769px) {
  .book-section {
    height: 100vh;
    min-height: 100vh;
    padding: 4vh 1.5rem;
  }
}
@media (max-width: 768px) {
  .book-image img {
    width: 80%;
    max-width: 220px;
    margin-bottom: 1.5rem;
  }


}
