:root{
    --primary-color: #ffdd00;
    --secondary-color: #915502;
    --accent-color: #FCF9BE;
    --bg-color: #FAF7F2;
    --text-dark: #2B2B2B;
    --text-light: #FFFFFF;
}
body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    font-family: Arial, Helvetica, sans-serif;
}
.nav {
    background-color: var(--primary-color) !important;
}

.navbar-brand,
.nav-link {
    color: var(--text-dark) !important;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}
body {
  background-color: #f8f9fa;
}


.genre-section {
  min-height: 350px;
  padding: 50px;
  margin-bottom: 20px;
  border-radius: 10px;


  background: linear-gradient(to right, #ccefff, #eaf8ff);
  transition: background 0.6s ease;
}


.genre-list ul {
  list-style: none;
  padding-left: 0;
}

.genre-list li {
  font-size: 2.5rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  margin-bottom: 15px;
  transition: 0.3s;
}

.genre-list li:hover {
  color: #000;
}

.book-card {
  background: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  margin-bottom: 20px;
  text-align: center;
}

.book-card h5 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.book-card p {
  color: #777;
  font-size: 0.9rem;
}

.hero-section {
  min-height: 120px;
  display: flex;
  align-items: center;
  padding: 40px 60px;
  margin-top: 30px;
  margin-bottom: 10px;

  background:
    linear-gradient(
      to right,
      rgba(255, 255, 255, 0) 0%,
      #ae8682 45%,
      #9d5353 100%
    ),
    url("../Images/pexels-ellusionist-19015217.jpg");

  background-size: cover;
  background-position: left center;
  border-radius: 16px;
}

.hero-content {
  margin-left: auto;
  max-width: 500px;
  font-family:'Playfair Display', serif;
  font-style: italic;
}
.foot{
    width:auto;
    height:250px;
    background-color: #ffdd00;
    margin-top: 30px;
    padding: 40px 60px 20px;
  color: #000000;
}


.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-brand h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 0.95rem;
  max-width: 320px;
  opacity: 0.85;
}

.footer-links h5,
.footer-social h5 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.footer-links ul,
.footer-social ul {
  list-style: none;
  padding: 0;
}


.footer-links a,
.footer-social a {
  text-decoration: none;
  color: #000000;
  font-size: 0.95rem;
  transition: 0.3s;
}

.footer-links a:hover,
.footer-social a:hover {
  color: #545454;
}

.footer-bottom {
  font-size: 0.85rem;
  color:#000;
  margin-top: 10px;
}


/* Dropdown styling */
.dropdown-menu {
  border-radius: 12px;
  padding: 10px 0;
  min-width: 180px;
}

.dropdown-item {
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
}
   .nav-item{
        margin-right: 25px
          }
.dropdown-item:hover {
  background-color: #f4f1ff;
  color: #ee4e2e;
  padding-left: 25px;
}

/* Smooth dropdown animation */
.dropdown-menu {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Wider & smooth modal */
.custom-modal {
  border-radius: 16px;
  animation: scaleFade 0.4s ease;
}

/* Modal animation */
@keyframes scaleFade {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Description */
.book-desc {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Keywords badges */
.keywords .badge {
  background-color: #f1f1f1;
  color: #333;
  padding: 8px 14px;
  margin: 4px 6px 4px 0;
  font-size: 0.8rem;
}

/* Product details box */
.product-box {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px;
  margin-top:40px;
}

/* Table text */
.product-box td:first-child {
  color: #777;
}

/* Remove modal body scroll */
/* .modal-body {
  overflow: hidden;
} */
.author-name {
  color: #222;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.author-name:hover {
  color: #ffb703;
  text-decoration: underline;
}

/* Tooltip styling */
.custom-tooltip {
  --bs-tooltip-bg: #ff6363;
  --bs-tooltip-color: #fff;
  --bs-tooltip-font-size: 0.75rem;
  --bs-tooltip-padding-x: 10px;
  --bs-tooltip-padding-y: 6px;
  border-radius: 8px;
}
.author-link {
  color: #6f42c1;
  text-decoration: none;
  font-weight: 500;
}
/* .custom-tooltip {
  --bs-tooltip-bg: #6f42c1;
  --bs-tooltip-color: #fff;
  font-size: 0.85rem;
} */

.author-link:hover {
  text-decoration: underline;
}

.section{
             display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 40px;
        }
 
.book-card{
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: 0.3s ease;
}

/* ===== Card Image ===== */
.book-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
   border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* ===== Card Body ===== */
.book-card .card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
}

/* ===== Title & Text ===== */
.book-card .card-title {
  font-size: 0.95rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.book-card .card-text {
  font-size: 0.85rem;
  margin-bottom: 6px;
}

/* ===== Rating Stars ===== */
.book-card .text-warning i {
  font-size: 0.8rem;
}

/* ===== Button Alignment ===== */
.book-card .btn {
  margin-top: auto;
  font-size: 0.85rem;
  padding: 6px 10px;
}

/* ===== Hover Effect (Optional but Nice) ===== */
.book-card:hover {
  transform: translateY(-5px);
  transition: 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
/* Author Card */
.author-card {
  background: #fff1f1;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  gap: 25px;
  align-items: flex-start;
  box-shadow: 0 40px 30px rgba(0,0,0,0.08);
  transition: all 0.4s ease;
}

.author-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 40px 50px rgba(0, 0, 0, 0.15);
}

/* Author Image */
.author-img img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.author-card:hover .author-img {
  transform: scale(1.08) rotate(1deg);
}
.author-content {
  flex: 1;
}
/* Text */
.author-card .card-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
}
.author-desc {
  margin-top: 12px;
  color: #444;
  font-size: 0.95rem;

  display: -webkit-box;
  -webkit-line-clamp: 3;   /* 👈 3 lines only */
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.4s ease;
}

/* VIEW MORE */
.view-more {
  display: inline-block;
  margin-top: 8px;
  color: #ff9800;
  cursor: pointer;
  font-weight: 500;
}

/* EXPANDED STATE */
.author-card.expanded .author-desc {
  -webkit-line-clamp: unset;
}

.author-card.expanded .author-img img {
  width: 190px;
  height: 190px;
}
.scrollspy-box {
  height: 220px;
  overflow-y: auto;
  position: relative;
  padding-right: 10px;
  background-color:rgb(234, 248, 254)
}
.spy-section {
  min-height: 80px;
  margin-bottom: 20px;
}
/* =========================
   RESPONSIVE FIXES
   ========================= */

/* ---------- TABLETS (≤ 992px) ---------- */
@media (max-width: 992px) {

  /* Navbar spacing */
  .nav-item {
    margin-right: 15px;
  }

  /* Hero section */
  .hero-section {
    padding: 30px 30px;
    background-position: center;
  }

  .hero-content {
    max-width: 100%;
    margin-left: 0;
    text-align: center;
  }

  /* Genre section */
  .genre-section {
    padding: 30px;
  }

  .genre-list li {
    font-size: 2rem;
  }

  /* Book cards grid */
  .section {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  /* Author card */
  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-img img {
    width: 140px;
    height: 140px;
  }

  .author-card.expanded .author-img img {
    width: 160px;
    height: 160px;
  }

  .author-content {
    width: 100%;
  }

  /* Modal */
  .modal-dialog {
    max-width: 90%;
  }

  .product-box {
    margin-top: 20px;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 25px;
  }

  .foot {
    height: auto;
    padding: 30px;
  }
}


/* ---------- MOBILE PHONES (≤ 576px) ---------- */
@media (max-width: 576px) {

  body {
    font-size: 14px;
  }

  /* Navbar */
  .navbar-brand {
    font-size: 1.2rem;
  }

  /* Hero */
  .hero-section {
    padding: 25px 20px;
    min-height: auto;
  }

  .hero-content {
    font-size: 0.9rem;
  }

  /* Genre section */
  .genre-section {
    padding: 20px;
  }

  .genre-list li {
    font-size: 1.6rem;
  }

  /* Book cards */
  .section {
    grid-template-columns: 1fr; /* One card per row */
  }

  .book-card img {
    height: 180px;
  }

  .book-card {
    padding: 15px;
  }

  /* Author cards */
  .author-card {
    padding: 18px;
    gap: 15px;
  }

  .author-img img {
    width: 120px;
    height: 120px;
  }

  .author-card.expanded .author-img img {
    width: 140px;
    height: 140px;
  }

  .author-desc {
    font-size: 0.9rem;
  }

  /* Modal */
  .modal-dialog {
    max-width: 95%;
    margin: 10px auto;
  }

  .modal-body {
    padding: 15px;
  }

  .book-desc {
    font-size: 0.9rem;
  }

  /* Scrollspy content box */
  .scrollspy-box {
    height: 180px;
  }

  /* Footer */
  .footer-brand p {
    max-width: 100%;
  }

  .footer-bottom {
    text-align: center;
  }
}
