/* ====================
   Base Styles
==================== */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  background-color: #fdfdfd;
  color: #222;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: auto;
}

/* ====================
   Navigation Bar
==================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #333;
  padding: 0.5rem 0;
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.nav-links li a:hover {
  text-decoration: underline;
}

/* ====================
   Hero Section
==================== */
.hero {
  background-color: #111;
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

/* ====================
   Intro
==================== */
.intro {
  text-align: center;
  margin: 2rem 0;
}

/* ====================
   Author Cards
==================== */
.authors {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-around;
  margin-bottom: 3rem;
}

.author-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  width: 280px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  text-align: center;
}

.author-card img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
}

/* ====================
   Merch Grid
==================== */
.merch-grid {
  padding: 2rem;
  text-align: center;
  background: #f8f8f8;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.merch-item {
  max-width: 200px;
}

.merch-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
}

/* ====================
   Featured Book
==================== */
.featured-book {
  background-color: #fff;
  padding: 2rem 1rem;
  border-top: 1px solid #eee;
}

.featured-slider-wrapper {
  overflow: hidden;
  width: 100%;
}

.featured-slider {
  display: flex;
  width: 300%;
  animation: slideBooks 18s infinite;
  transition: transform 1s ease-in-out;
}

.featured-slide {
  flex: 0 0 100%;
  display: flex;
  flex-direction: row;  /* Ensures side-by-side */
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2rem;
  padding: 1rem;
  box-sizing: border-box;
}

.featured-image {
  flex-shrink: 0;
  position: relative;
}

.featured-image img {
  width: 220px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: crimson;
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
}

.featured-description {
  flex: 1;
  min-width: 250px;
}

.featured-description h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.featured-description p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* ====================
   Animation
==================== */
@keyframes slideBooks {
  0% { transform: translateX(0%); }
  33.33% { transform: translateX(0%); }
  36.66% { transform: translateX(-100%); }
  66.66% { transform: translateX(-100%); }
  69.99% { transform: translateX(-200%); }
  99.99% { transform: translateX(-200%); }
  100% { transform: translateX(0%); }
}

/* ====================
   Buttons
==================== */
.button {
  display: inline-block;
  margin-top: 0.5rem;
  background: #111;
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s ease;
}
.button:hover {
  background: #444;
}

/* ====================
   Footer
==================== */
footer {
  background-color: #111;
  color: white;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
}

.footer-links {
  margin-top: 0.5rem;
}
.footer-links a {
  color: #ccc;
  margin: 0 0.5rem;
}
.footer-links a:hover {
  color: white;
  text-decoration: underline;
}

.social-icons {
  margin-top: 1rem;
}
.social-icons a {
  display: inline-block;
  margin: 0 0.5rem;
}
.social-icons img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}
.social-icons img:hover {
  transform: scale(1.1);
}

/* ====================
   Responsive Fix
==================== */
@media (max-width: 768px) {
  .featured-slide {
    flex-direction: column;
    text-align: center;
  }

  .featured-image img {
    width: 100%;
    max-width: 300px;
  }

  .featured-description {
    text-align: center;
  }
}
