@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Poppins:wght@400;600;700&display=swap");

/* ================= GLOBAL ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
 -webkit-tap-highlight-color: transparent; /* ✅ disables blue tap flash */
}

body {
  font-family: "Roboto", sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
  padding-top: 50px; 
  overflow-x: hidden; 
}

/* ================= NAVBAR ================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 3rem;
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;           /* spacing between items */
  margin: 0;
  margin-left: auto;   /* push nav to the right of the navbar */
  align-items: center;
  padding: 0;
}
.nav-links li {
  margin: 0;           /* spacing controlled by .nav-links gap */
  padding: 0;
}
.nav-links a,
.overlay-links a {
  display: inline-block;               /* inline links on desktop */
  padding: 0;                          /* desktop spacing (mobile uses block padding) */
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #000;
  text-decoration: none;
  border-radius: 0.25rem;              /* optional slight rounding */
  transition: color 0.25s ease;
  background: transparent;             /* ensure no background box on desktop */
}
/* Hover: only change text color (no gray block) */
.nav-links a:hover,
.overlay-links a:hover {
  color: #8f00ff;
  background: transparent;
}
/* Current/active link */
.nav-links a.active,
.overlay-links a.active {
  color: #8f00ff;
  opacity: 1;
}
/* Ensure touch-active class does not show desktop block highlight */
.nav-links li.touch-active,
.overlay-links li.touch-active,
.nav-links a.touch-active,
.overlay-links a.touch-active {
  background: transparent;
}
/* Add this inside your desktop media query */
.nav-links a:focus {
  outline: none;
  box-shadow: none;
  background-color: transparent;
}

.logo {
  font-family: "Poppins", sans-serif;
  font-size: 1.7rem;
  font-weight: bold;
  color: #000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.map {
  width: 25px;
  height: auto;
  vertical-align: middle;
}

/* ✅ Tap feedback for all clickable elements */
a, button, .card, .menu-toggle, .close-btn {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05); /* light gray */
  touch-action: manipulation;
}

/* ================= HAMBURGER (Mobile Only) ================= */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 3px;
  background: #000;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* ================= FULLSCREEN OVERLAY ================= */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.nav-overlay.show {
  opacity: 1;
  visibility: visible;
}

.overlay-links {
  list-style: none;
  text-align: center;
}

.overlay-links li {
  margin: 1.5rem 0;
}

.overlay-links a {
  text-decoration: none;
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  color: #000;
  transition: color 0.3s ease;
}

.overlay-links a:hover {
  color: #8f00ff;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
 .nav-links { 
    display: none; 
  }
  .hamburger { 
    display: flex; 
  }

  /* 👇 Mobile-only nav feedback */
  .nav-links li,
  .overlay-links li {
    border-radius: 8px;
    overflow: visible;
  }

  .nav-links a,
  .overlay-links a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    transition: color 0.3s ease, background-color 120ms linear;
  }

  .nav-links a:active,
  .nav-links a:focus,
  .overlay-links a:active,
  .overlay-links a:focus {
    background-color: rgba(0,0,0,0.08);
    color: inherit;
  }

  .nav-links a:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(143,0,255,0.06);
  } 
   }
/* HERO / FEATURED BOOK */
.hero {
  padding: 2rem 3rem;
  margin-top: 5rem;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
}

.featured-book {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.featured-book img {
  width: 200px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.featured-book .info h2 {
  font-size: 1.8rem;
  margin: 0;
}

.featured-book .info p {
  margin: 0.5rem 0 1rem;
  color: #666;
  margin-bottom: 3rem;
}

.featured-book button {
  padding: 0.6rem 1.2rem;
  border: none;
  background-color: #000;
  color: #fff;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 2rem;
  transition: background 0.3s ease;
}

.featured-book button:hover {
  background-color: #8f00ff;
}
.featured-book button:active {
  background-color: #4a0091;
  transform: scale(0.97);
}
/* SECTION TITLES */
main section h2 {
  padding: 0 3rem;
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* GRID LAYOUT */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
  padding: 0 3rem 2rem;
}

.card {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
/* ===== Footer Section (Properly Placed) ===== */
footer {
  text-align: center;
  padding: 1.2rem 1rem;
  background: #000;
  color: #fff;
  font-size: 0.9rem;
  width: 100%;
  margin-top: auto;
  position: static;
}

footer a {
  color: #8f00ff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}
/* ================= Media query for body contents ================= */
@media (max-width: 768px) {
  /* HERO section */
  .hero {
    padding: 2rem 1.5rem;
    text-align: center;
  }

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

  .featured-book img {
    width: 70%;
    max-width: 250px;
    margin-bottom: 1.5rem;
  }

  .featured-book .info h2 {
    font-size: 1.5rem;
  }

  .featured-book .info p {
    font-size: 0.95rem;
  }

  .featured-book button {
    font-size: 1rem;
    padding: 0.7rem 1.5rem;
  }

  /* GRID cards */
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    padding: 0 1.5rem 2rem;
  }

  .card {
    padding: 0.8rem;
  }

  /* FOOTER */
  footer {
    font-size: 0.8rem;
    padding: 1rem;
  }
}
