/* RESET + BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: #fff;
  color: #000;
  line-height: 1.6;
  /* Add top padding for fixed navbar */
  padding-top: 100px;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  margin: 0 auto;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.1s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 50px;
  background-color: #fff;
  border-bottom: 0.5px solid #ccc;

}

.navbar .logo a {
  font-family: 'Instrument Serif', serif;
  font-size: 2rem;
}

.navbar .links {
  display: flex;
  gap: 1.5rem;
}

.navbar .links a {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.navbar .links a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 0.8px;
}

.navbar--hidden {
  transform: translateY(-100%);
}

/* Add this after your navbar styles */
@media (max-width: 600px) {
  body {
    padding-top: 105px;
  }
}

/* BOOK GRID */
.list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 2rem 60px;
}

@media (min-width: 992px) {
  .list {
    grid-template-columns: repeat(4, 1fr); /* Max 4 items per row */
  }
}

.listItem {
  display: flex;
  flex-direction: column;
}

.listItemLink {
  display: block;
}

.listItemImage {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #000;
  object-fit: cover;
  display: block;
}

.listItemText {
  margin-top: 0.5rem;
}

.listItemTitle {
  font-size: 0.9rem;
}

.listItemAuthor {
  font-size: 0.75rem;
  color: #555;
}

/* SINGLE PAGE FALLBACK */
.single {
  padding: 2rem 0;
  font-size: 1.25rem;
  text-align: center;
}

/* FOOTER */
.footer {
  width: 100%;
  background-color: #000;
  color: #fff;
  padding: 1.5rem 60px;
}

.footerLogo a {
  font-family: 'Instrument Serif', serif;
  font-size: 128px;
  color: #fff;
  display: block;
  text-align: left; /* Align logo to the left */
  margin-left: 0;
  margin-bottom: 2rem;
  padding-top: 60px;
  padding-bottom: 60px;
  border-bottom: 0.5px solid #ccc;
}

.footerBody {
  margin: 0 auto;
  text-align: left; /* Align footer body content to the left */
  padding-top: 60px;
  padding-bottom: 24px;
}

.footerLinks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start; /* Align links to the left */
  gap: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.footerLinksColumn {
  flex: 1 1 150px;
}

.footerHeading {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  color: #aaa;
  letter-spacing: 0.04em;
}

.footerLinksColumn a {
  display: block;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footerLinksColumn a:hover {
  text-decoration: underline;
}

.footerInfo {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  text-align: left; /* Align footer info to the left */
  font-size: 0.75rem;
  color: #aaa;
  padding-top: 148px;
}

.footerInfo a {
  color: #fff;
  text-decoration: underline;
}

/* Hamburger styles */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  gap: 6px;
  z-index: 1001;
}
.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #000;
  border-radius: 2px;
  transition: 0.3s;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}


/* Not Found Page */
 .notfound-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 0 2rem;
  }

  .notfound-title {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
  }

  .notfound-desc {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: #222;
  }

  .notfound-back {
    display: inline-block;
    margin-bottom: 2.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 0.5px solid #000;
    transition: color 0.2s, border-bottom 0.2s;
  }

  .notfound-back:hover {
    color: blue;
    border-color: blue;
  }

  .notfound-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
  }

  .notfound-item {
    display: flex;
    flex-direction: column;
  }

  .notfound-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #000;
    margin-bottom: 0.75rem;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .notfound-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .notfound-book-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
  }

  .notfound-book-author {
    font-size: 0.75rem;
    color: #555;
  }

/* ===== Updates List Page ===== */
.list.listUpdates {
  display: flex;
  flex-direction: column;
  gap: 5rem; /* Increased gap between updates */
  padding: 2rem 60px;
  max-width: 100vw;
}

.listTitle {
  font-size: 2rem;
  font-weight: bold;
  margin: 2rem 60px 0 60px; /* Match the book grid .listTitle margin */
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.listSubtitle {
  font-size: 1rem;
  margin: 0 60px 2.5rem 60px; /* Match the book grid .listSubtitle margin */
  color: #222;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.listUpdatesItem {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: stretch;
  width: 100%;
}

.listUpdatesText,
.listUpdatesImageWrap {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}

.listUpdatesImageWrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listUpdatesTitle {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.listUpdatesDate {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
}

.listUpdatesSummary {
  font-size: 0.95rem;
  color: #111;
  line-height: 1.5;
}

.listUpdatesImage,
.listUpdatesImage--placeholder {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 2px;
  background: #000;
  display: block;
}

/* Responsive: match .list grid on mobile */
@media (max-width: 900px) {
  .list.listUpdates {
    padding: 1rem 0.5rem;
  }
  .listTitle,
  .listSubtitle {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  .listUpdatesItem {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .listUpdatesImageWrap {
    justify-content: flex-start;
  }
  .listUpdatesImage,
  .listUpdatesImage--placeholder {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .list.listUpdates {
    padding: 1rem 16px;
  }
  .listTitle,
  .listSubtitle {
    margin-left: 16px;
    margin-right: 16px;
  }
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footerLinks {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footerLinksColumn {
    flex: 1 1 100%;
  }
}

@media (max-width: 600px) {
  .container {
    max-width: 100vw;
  }

  .navbar {
    position: fixed; /* Ensure fixed on mobile */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.3s ease; /* Animate hide/show */
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding: 1rem 16px;
  }

  .navbar--hidden {
    transform: translateY(-100%);
  }

  .logo {
    flex: 1 1 auto;
  }

  .hamburger {
    display: flex;
    margin-left: 1rem;
  }

  .navbar .links {
    flex-direction: column;
    gap: 1rem;
    width: 100vw;
    min-width: 0;
    min-height: 100vh;
    height: 100vh;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 5rem 16px 2rem 16px;
    z-index: 1000;
    overflow-y: auto;
  }
  .navbar .links.open {
    display: flex;
  }

  .list {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem 0;
    padding-left: 16px;
    padding-right: 16px;
  }

  .listItemImage {
    aspect-ratio: 1 / 1;
    max-width: 100%;
    height: auto;
  }

  .footer {
    padding-left: 16px;
    padding-right: 16px;
    text-align: center;
  }

  .footerBody {
    max-width: 100vw;
    text-align: center;
  }

  .footerLinks {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .footerLinksColumn {
    flex: 1 1 100%;
  }

  .footerLogo a {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
  }

  .footerInfo {
    text-align: center;
  }

  /* Mobile nav styles */
  .hamburger {
    display: flex;
  }
  .navbar .links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 16px;
    z-index: 1000;
  }
  .navbar .links.open {
    display: flex;
  }

  .navbar .links a {
    font-size: 1.25rem;
  }

  .footerLinksColumn a {
    font-size: 1.1rem;
  }

  .notfound-container {
      padding: 1.5rem 0.5rem;
    }

    .notfound-title {
      font-size: 1.3rem;
    }

    .notfound-list {
      grid-template-columns: 1fr;
      gap: 1rem;
    }

    .footerLinksColumn a {
      font-size: 1.1rem;
    }


}

/* No Scroll */
.no-scroll {
  overflow: hidden !important;
  height: 100vh !important;
}