:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --success-color: #38b000;
}

html {
    overflow-y: scroll; 
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: #f8f9fa;
    line-height: 1.6;

    padding-right: 0 !important; 
    transition: padding-right 0.3s ease; 
}

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Navbar */
.navbar {
    background-color: transparent !important;
    box-shadow: none;
    padding: 15px 0;
    transition: all 0.3s ease;

    will-change: transform, background-color;
    transform: translateY(-10px);
    opacity: 0;
    animation: fadeInNav 0.5s ease forwards 0.3s;
}

@keyframes fadeInNav {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
}

.navbar-search {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-icon-circle svg {
    width: 18px;
    height: 18px;
    color: var(--dark-color);
}

.search-icon-circle:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .search-icon-circle {
        width: 36px;
        height: 36px;
    }
    
    .search-icon-circle svg {
        width: 16px;
        height: 16px;
    }
}

.navbar-menu {
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.menu-icon-circle svg {
    width: 18px;
    height: 18px;
    color: var(--dark-color);
}

.menu-icon-circle:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .menu-icon-circle {
        width: 36px;
        height: 36px;
    }
    
    .menu-icon-circle svg {
        width: 16px;
        height: 16px;
    }
}

.search-icon-circle svg,
.menu-icon-circle svg {
    color: white;
    transition: all 0.3s ease;
}

.navbar.scrolled .search-icon-circle svg,
.navbar.scrolled .menu-icon-circle svg {
    color: var(--dark-color);
}

.navbar.scrolled img {
    opacity: 1;
    visibility: visible;
}

.navbar-menu img {
    height: 50px;
    transition: all 0.3s ease;
}

.navbar-collapse {
    flex-grow: 0; 
}

.navbar > .container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    position: relative;
}

.nav-link {
    font-weight: 500;
    color: white !important;
    margin: 0 8px;
    position: relative;
    padding: 8px 12px !important;
}
  
.navbar.scrolled .nav-link {
    color: var(--dark-color) !important; 
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}
  
.navbar.scrolled .nav-link:after {
    background-color: var(--primary-color);
}

.nav-link:hover:after {
    width: 100%;
}
  
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}
  
.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}
  
.footer-logo img {
    height: 60px;
    margin-bottom: 20px;
}
  
.footer-links h5 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}
  
.footer-links h5:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
}
  
.footer-links ul {
    list-style: none;
    padding: 0;
}
  
.footer-links li {
    margin-bottom: 10px;
}
  
.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}
  
.footer-links a:hover {
    color: white;
    padding-left: 5px;
}
  
.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-right: 10px;
    transition: all 0.3s ease;
}
  
.social-icons a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}
  
.copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 40px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
} 
  
/* Animations */
@keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
}
  
.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}
  
@media (max-width: 992px) {
    .hero-section h1 {
      font-size: 2.8rem;
    }
}
  
@media (max-width: 768px) {
    .hero-section {
      height: auto;
      padding: 100px 0;
    }
    
    .hero-section h1 {
      font-size: 2.2rem;
    }
    
    .hero-section p {
      font-size: 1rem;
    }

    .navbar-menu img {
        height: 40px;
    }
}

/* Search Page Styles */
.search-hero-section {
    position: relative;
    height: 100vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(26, 26, 46, 0.7), rgba(26, 26, 46, 0.7)), 
                url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1776&q=80') no-repeat center center/cover;
    color: white;
    padding: 100px 0 60px;
}

.search-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.search-container {
    margin-top: 30px;
}

.search-container .input-group {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 50px;
    overflow: hidden;
}

.search-container .form-control {
    padding: 15px 25px;
    border: none;
    font-size: 1.1rem;
}

.search-container .btn {
    padding: 15px 30px;
    border-radius: 0 50px 50px 0;
}

/* Recommended Books Section */
.recommended-section {
    padding: 100px 0 80px;
    background-color: #f8f9fa;
}

.section-title {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 60px; 
    margin-top: 20px; 
}

.section-title:after {
    content: '';
    position: absolute;
    width: 15%;
    height: 3px;
    bottom: -15px; 
    left: 1;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.book-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    height: 100%;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.book-cover {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-info {
    padding: 20px;
}

.book-info h5 {
    margin-bottom: 5px;
    font-weight: 600;
}

.author {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.availability {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 4px;
}

.availability.available {
    background-color: #e6f7ee;
    color: var(--success-color);
}

.availability.limited {
    background-color: #fff8e6;
    color: #ff9900;
}

.availability.unavailable {
    background-color: #ffebee;
    color: #f44336;
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
    background-color: white;
}

.category-card {
    display: block;
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: #333;
    text-decoration: none;
    height: 100%;
}

.category-card:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.2);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.category-card:hover .category-icon {
    color: white;
}

.category-card h5 {
    margin-bottom: 5px;
    font-weight: 600;
}

.category-card p {
    margin-bottom: 0;
    opacity: 0.8;
    font-size: 0.9rem;
}