/* ===========================
   Global Reset
=========================== */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: 'Montserrat', sans-serif;
  color: #f5f5f5;
  line-height: 1.6;

  /* New background image properties with the correct local path */
  background-color: #111; /* Fallback color */
  background-image: url('assets/book_cover_background.png');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
}

body {
  /* Removed padding-top as the header is no longer fixed */
}

/* ===========================
   Premium Black & Gold Navigation
=========================== */
.navbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0; /* Further reduced vertical padding */
  box-sizing: border-box;
  background: linear-gradient(180deg, #111, #000);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  position: relative;
  border-bottom: none;
}

/* Adds a "shiny" line at the bottom that glows in the center */
.navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(223, 192, 148, 0.4), transparent);
}

/* Logo with a vibrant, premium gold feel */
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; /* Slightly reduced font size */
  background: linear-gradient(45deg, #fde4be, #d3b385); /* Metallic gold */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(240, 194, 123, 0.3); /* Enhanced glow */
  white-space: nowrap;
  padding-bottom: 2px; /* Further reduced space below logo */
  text-align: center;
}

/* Navigation links container */
.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  width: 100%;
  margin: 0;
}

.nav-links li {
  padding: 0 20px;
}

/* Links with hover effect to match the gold theme */
.nav-links a {
  text-decoration: none;
  color: #f5f5f5;
  font-weight: 500;
  font-size: 1rem;
  padding: 4px 0; /* Reduced padding on nav links */
  display: inline-block;
  position: relative;
  transition: color 0.4s ease;
  letter-spacing: 0.5px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 50%;
  background: linear-gradient(45deg, #fde4be, #d3b385); /* Match new gold */
  transition: all 0.4s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-links a:hover {
  color: #fde4be; /* Brighter gold on hover */
}

.nav-links a:hover::after {
  width: 50%;
}

/* Mobile */
@media (max-width: 650px) {
  .navbar {
    padding: 5px 0; /* Further reduced vertical padding for mobile */
  }

  .nav-links {
    gap: 10px;
  }

  .nav-links li {
    padding: 0 10px;
  }

  body {
    /* Removed padding-top from mobile as well */
  }

  #swipe-hint {
    top: 240px; /* Adjusted position for mobile */
  }
}

/* ===========================
   Hero Section
=========================== */
.hero {
  min-height: 90vh;
  background: url('https://images.unsplash.com/photo-1526378722370-6a47a0efc9e6?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 0 10px;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 15, 0.6);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  transform: translateY(-5vh); /* This moves the content up a bit */
}

.hero-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: #f0c27b;
}

.hero-content p {
  font-size: clamp(1rem, 4vw, 1.2rem);
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  margin-top: 15px;
  background: linear-gradient(45deg, #f0c27b, #d38312);
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

/* ===========================
   Books Section
=========================== */
#books {
  padding: 60px 0;
  text-align: center;
  width: 100%;
  position: relative;
  scroll-margin-top: -60px; /* This makes the page scroll 60px further down */
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #f0c27b;
  margin-bottom: 20px;
}

/* Carousel Layout */
.book-carousel {
  display: flex;
  overflow: hidden; /* Changed from auto to hidden */
  width: 100%;
  height: auto;
  cursor: grab; /* Indicate draggable content */
}

/* This is a new wrapper for the cards that will be moved by the script */
.carousel-track {
  display: flex;
  transition: transform 0.5s ease-out; /* Animation for snapping */
}

.book-card {
  flex: 0 0 100vw; /* Use viewport width to ensure full-width cards */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  /* background and border removed to make card invisible */
  border-radius: 10px;
  transition: opacity 0.4s ease;
}

.book-card img {
  max-width: 80%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}

.book-card h3 {
  margin: 12px 0 8px;
  color: #ffd194;
}

.book-card p {
  font-size: 0.9rem;
  color: #ccc;
  max-width: 80%;
  margin: 0 auto 10px;
}

/* ===========================
   About Section
=========================== */
.about {
  padding: 60px 5%;
  text-align: center;
}

/* ===========================
   Footer
=========================== */
footer {
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
  background: #000; /* Changed background to black */
  color: #888;
}

/* ===========================
   Swipe Hint Popup
=========================== */
#swipe-hint {
  position: absolute;
  top: 220px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(223, 192, 148, 0.95);
  color: #1a1a1a;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
}

#swipe-hint.show {
  animation: hintFadeInOut 4.5s ease-in-out forwards;
}

@keyframes hintFadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  20%, 80% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
}
