body {
 
  margin: 0;
  padding: 0;
  font-family: 'Source Serif 4', 'Times New Roman', serif;
  color: #1a1a1a;
}

 .navbar {
    
  font-family: 'Times New Roman', Times, Georgia, serif;
    margin-left: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px;
    border-bottom: 1px solid #EEE;
    background-color: #fff;
  }
  .navbar-left {
    
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .navbar-left img {
    height: 70px;
    width: 80px;
  }
  
  .navbar-center {
    display: flex;
    gap: 40px;
  }
  .navbar-center a {
    text-decoration: none;
    color: black;
    font-weight: 400;
    font-size: 16px;
  }
  .navbar-center a:hover,
  .navbar-center a.active {
    font-weight: 500;
    color: #2a9d8f;
  }
  .navbar-right {
    margin-right: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .search-bar {
    padding: 6px 12px;
    border: 1px solid #000000;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
  }
  .search-icon {
    font-size: 18px;
    cursor: pointer;
    color: #999;
  }
  .btn-signup,
  .btn-login {
    padding: 7px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
  }
  .btn-signup {
    background: transparent;
    border: 1px solid #222;
    background-color: #264653;
    color:white
  }
  .btn-signup:hover {
    background: #2a9d8f;
    color: #fff;
  }
  .btn-login {
    background: #264653;
    color: #fff;
  }
  .btn-login:hover {
    background: #2a9d8f;
  }
.navbar-toggle {
  display: none;
}



/* Books Section */
body {
  
  font-family: 'Georgia', 'Times New Roman', serif;
  margin: 0;
  padding: 0;
  
}
.bookshelf {
  max-width: 1320px;
  margin:  auto;
  padding-bottom: 20px;
  

}
.books-title {
  text-align: center;
  font-size: 2.4rem;
  color: #2a9d8f;
  margin-bottom: 34px;
  font-weight: bold;
  letter-spacing: 1px;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 30px;
}
.book-card {
    max-height: 500px;
   
  background: #e1eee6;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 2px 10px rgba(38,70,83,0.09);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.book-card img {
  width: 100%;
  max-width: 163px;
  aspect-ratio: 3/4;
  object-fit: cover;
  margin: 18px auto 0;
  border-radius: 6px;
  box-shadow: 0 2px 16px rgba(50,80,90,0.12);
  background: #ddd;
  display: block;
}
.book-info {
  padding: 20px 20px 22px 20px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.book-info h2 {
  font-size: 1.18rem;
  margin: 8px 0 3px 0;
  color: #264653;
  font-weight: 600;
}
.author {
  color: #666;
  font-size: 1.03rem;
  margin-bottom: 9px;
}
.desc {
  color: #43535c;
  font-size: 0.99rem;
  margin-bottom: 0;
}

.book-card:hover {
  transform: translateY(-4px) scale(1.025);
box-shadow: 0 10px 34px rgb(51, 128, 210);
}

.read-full-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 24px;
  background-color: #264653;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.read-full-btn:hover {
  background-color: #2a9d8f;
  color: #fff;
}


/* Footer styles */
.main-footer {
  position: relative;
  z-index: 10;
  background: #e7f3e4;
  padding: 42px 0 18px 0;
  text-align: center;
  font-size: 1.08rem;
  color: #333;
  margin-top: 0px;
  box-shadow: 0 -2px 14px rgba(0,0,0,0.03);
}
.footer-content {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 0 18px;
    text-align: left;
}
.footer-logo .footer-title {
  height: auto;
  font-weight: bold;
  font-size: 1.38rem;
  color: #1767fa;
  letter-spacing: 1px;
}
.footer-links {
  display: flex;
  gap: 28px;
}
.footer-links a {
  color: #333;
  text-decoration: none;
  transition: color 0.18s;
}
.footer-links a:hover {
  color: #1767fa;
}
.footer-social {
  display: flex;
  gap: 19px;
}
.footer-meta {
  margin-left: 150px;
  font-size: 0.97rem;
  color: #434141;
  letter-spacing: 0.5px;
  opacity: 0.9;
}
.footer-social .fa {
  padding: 7px;
  font-size: 27px;
  width: 34px;
  height: 30px;
  text-align: center;
  text-decoration: none;
  color: #333;
  border-radius: 50%;
  transition: background-color 0.3s;
  margin: 3px 6px;
}
.footer-social .fa:hover {
  color: white;
}

.footer-social .fa-facebook { background: #618ae1; }
.footer-social .fa-twitter { background: #55acee; }
.footer-social .fa-instagram { background: #db546d; }
.footer-social .fa-linkedin { background: #5ab8eb; }







/* Small phones and smaller (up to 320px) */
@media (max-width: 351px) {
.navbar {
  margin-left: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    position: relative;
  }

  /* Keep navbar-right (search section) aligned right */
  .navbar-right {
    
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* Hide buttons */
  .navbar-right .btn-signup,
  .navbar-right .btn-login {
    display: none;
  }

  /* Style search bar */
  .search-bar {
    width: 70px;
    font-size: 15px;
    padding: 6px 10px;
    border: 1px solid #000;
    border-radius: 8px;
    outline: none;
  }
    .search-icon {
    font-size: 18px;
    color: #666;
    cursor: pointer;
    margin-right: 15px;
  }

  /* Hamburger icon — position to the right of search */
  .navbar-toggle {
    display: block;
    font-size: 22px;
    color: #000;
    cursor: pointer;

    /* position it next to search bar */
    position: absolute;
    right: 20px;   /* stays at far right */
    top: 50%;
    transform: translateY(-50%);
  }

  /* Hide center links initially */
  .navbar-center {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    position: absolute;
    top: 70px;
    left: 0;
    text-align: center;
    z-index: 100;
  }

  .navbar-center.active {
    display: flex;
  }

}

/* Small phones to larger phones (321px - 425px) */
@media (min-width: 352px) and (max-width: 425px) {
.navbar {
    display: flex;
    
    margin-left: 15px;
    padding: 8px 12px;
  
    justify-content: space-between;
    padding: 10px 20px;
    position: relative;
  }

  /* Keep navbar-right (search section) aligned right */
  .navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* Hide buttons */
  .navbar-right .btn-signup,
  .navbar-right .btn-login {
    display: none;
  }

  /* Style search bar */
  .search-bar {
    width: 100px;
    font-size: 15px;
    padding: 6px 10px;
    border: 1px solid #000;
    border-radius: 8px;
    outline: none;
  }
    .search-icon {
    font-size: 18px;
    color: #666;
    cursor: pointer;
    margin-right: 15px;
  }

  /* Hamburger icon — position to the right of search */
  .navbar-toggle {
    display: block;
    font-size: 18px;
    color: #000;
    cursor: pointer;

    /* position it next to search bar */
    position: absolute;
    right: 20px;   /* stays at far right */
    top: 50%;
    transform: translateY(-50%);
  }

  /* Hide center links initially */
  .navbar-center {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    position: absolute;
    top: 70px;
    left: 0;
    text-align: center;
    z-index: 100;
  }

  .navbar-center.active {
    display: flex;
  }

}

/* Tablets portrait (426px - 768px) */
@media (min-width: 426px) and (max-width: 768px) {
  /* Make navbar a proper flex container */
  .navbar {
     margin-left: 20px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
   
    position: relative;
  }

  /* Keep navbar-right (search section) aligned right */
  .navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* Hide buttons */
  .navbar-right .btn-signup,
  .navbar-right .btn-login {
    display: none;
  }

  /* Style search bar */
  .search-bar {
    width: 160px;
    font-size: 15px;
    padding: 6px 10px;
    border: 1px solid #000;
    border-radius: 8px;
    outline: none;
  }
    .search-icon {
    font-size: 18px;
    color: #666;
    cursor: pointer;
    margin-right: 15px;
  }

  /* Hamburger icon — position to the right of search */
  .navbar-toggle {
    display: block;
    font-size: 22px;
    color: #000;
    cursor: pointer;

    /* position it next to search bar */
    position: absolute;
    right: 20px;   /* stays at far right */
    top: 50%;
    transform: translateY(-50%);
  }

  /* Hide center links initially */
  .navbar-center {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    position: absolute;
    top: 70px;
    left: 0;
    text-align: center;
    z-index: 100;
  }

  .navbar-center.active {
    display: flex;
  }





 
}

/* Tablets landscape & small desktops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Desktop: show buttons only in navbar-right, hide in navbar-center */
@media (min-width: 769px) {
  .navbar-center .btn-signup,
  .navbar-center .btn-login {
    display: none;
  }
  .navbar-right .btn-signup,
  .navbar-right .btn-login {
    display: inline-block;
  }
  .navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }
}

/* Mobile: hide buttons in navbar-right, show in navbar-center */
@media (max-width: 768px) {
 .navbar-right .btn-signup,
  .navbar-right .btn-login {
    display: none;
  }
  .navbar-center .btn-signup,
  .navbar-center .btn-login {
    display: block;
    width: 90%;
    margin: 10px auto;
    text-align: center;
  }

  .navbar-center {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    position: absolute;
    top: 80px;
    left: 0;
    border-top: 1px solid #eee;
    z-index: 100;
  }

  .navbar-center.active {
    display: flex;
  }

  .navbar-toggle {
    display: block;
    cursor: pointer;
  }

  .navbar-right {
    display: flex;
    align-items: center;
  }
}

}

/* Desktops (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  .navbar-center .btn-signup,
  .navbar-center .btn-login {
    display: none;
  }
  .navbar {
    margin-left: 50px;
    padding: 12px 18px;
  }
  .navbar-center {
    gap: 40px;
  }
  .search-bar {
    width: 200px;
  }
}

/* Large desktops (1441px and up) */
@media (min-width: 1441px) {
  .navbar-center .btn-signup,
  .navbar-center .btn-login {
    display: none;
  }
  .navbar {
    margin-left: 60px;
    padding: 12px 20px;
  }
  .navbar-center {
    gap: 50px;
  }
  .search-bar {
    width: 220px;
  }
}

/* Responsive Navbar toggle logic */

/* Hide the nav links and show hamburger on smaller screens */

@media (max-width: 768px) {
  .navbar-center {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    position: absolute;
    top: 80px;
    left: 0;
    z-index: 100;
    border-top: 1px solid #eee;
    padding: 10px 0;
  }
  .navbar-center.active {
    display: flex;
  }
  .navbar-toggle {
    display: block;
  }
  .navbar-right {
    margin-right: 10px;
  }
  .navbar {
    flex-wrap: wrap;
    position: relative;
  }
}





@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .footer-meta {
    margin-left: 0;
  }
  
  .footer-logo .navbar-left img {
    max-width: 120px;
    margin: 0 auto;
  }
  
  .footer-social {
    justify-content: center;
    gap: 12px;
  }
  
  .footer-social .fa {
    font-size: 24px;
    width: 30px;
    height: 29px;
    padding: 5px;
    margin: 3px 4px;
  }
}

/* Tablet landscape and small desktops */
@media (min-width: 769px) and (max-width: 1024px) {
  .footer-content {
    justify-content: center;
    gap: 30px;
  }
  
  .footer-meta {
    margin-left: 0;
  }
  
  .footer-logo .navbar-left img {
    max-width: 140px;
  }
  .footer-social .fa {
    font-size: 25px;
  }
}



body{
  
  padding-bottom: env(safe-area-inset-bottom);

  height: 100%;
}
main{
  flex: 1
;
}












/* ===============================
   📱 Small phones (max-width: 480px)
================================= */
@media (max-width: 480px) {
  .bookshelf {
    padding: 0 10px 20px;
  }

  .books-title {
    font-size: 1.7rem;
    margin-bottom: 24px;
  }

  .book-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .book-card {
    max-height: none;
    padding: 10px;
  }

  .book-card img {
    max-width: 120px;
    margin-top: 12px;
  }

  .book-info h2 {
    font-size: 1rem;
  }

  .author {
    font-size: 0.9rem;
  }

  .desc {
    font-size: 0.85rem;
  }

  .read-full-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}


/* ===============================
   📲 Tablets portrait (481px - 768px)
================================= */
@media (min-width: 481px) and (max-width: 768px) {
  .bookshelf {
    padding: 0 20px 30px;
  }

  .books-title {
    font-size: 2rem;
  }

  .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .book-card img {
    max-width: 140px;
  }

  .book-info h2 {
    font-size: 1.05rem;
  }

  .desc {
    font-size: 0.9rem;
  }
}


/* ===============================
   💻 Tablets landscape / Small laptops (769px - 1024px)
================================= */
@media (min-width: 769px) and (max-width: 1024px) {
  .bookshelf {
    padding: 0 40px;
  }

  .books-title {
    font-size: 2.2rem;
  }

  .book-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  .book-card img {
    max-width: 150px;
  }

  .desc {
    font-size: 0.95rem;
  }
}


/* ===============================
   🖥️ Desktops (1025px - 1440px)
================================= */
@media (min-width: 1025px) and (max-width: 1440px) {
  .book-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
  }

  .book-card img {
    max-width: 160px;
  }

  .book-info h2 {
    font-size: 1.15rem;
  }
}


/* ===============================
   🧠 Ultra-wide screens (1441px and up)
================================= */
@media (min-width: 1441px) {
  .bookshelf {
    max-width: 1600px;
  }

  .book-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 35px;
  }

  .book-card img {
    max-width: 170px;
  }

  .book-info h2 {
    font-size: 1.2rem;
  }
}
