/* Custom CSS for Novel Scout */

/* Color Palette */
:root {
    /* Novel Scout Brand Colors - Based on #0B5351 */
    --novel-scout-green: #0B5351;        /* Primary brand color - dark teal green */
    --novel-scout-green-light: #0F6B67;  /* Lighter version for hover states */
    --novel-scout-green-dark: #074240;   /* Darker version for active states */
    --novel-scout-green-pale: #E8F4F3;   /* Very light tint for backgrounds */
    --novel-scout-green-soft: #B8D4D2;   /* Soft version for subtle accents */
    
    /* Complementary Colors */
    --novel-scout-coral: #8B4A47;        /* Complementary warm color (opposite on color wheel) */
    --novel-scout-coral-light: #A85E5A;  /* Lighter coral for hover */
    --novel-scout-coral-pale: #F2EEEE;   /* Very light coral for backgrounds */
    
    /* Triadic Colors (120° apart) */
    --novel-scout-gold: #8B7A0B;         /* Golden yellow-green */
    --novel-scout-purple: #4A0B53;       /* Deep purple */
    
    /* Neutral Palette */
    --novel-scout-charcoal: #2C3E3C;     /* Dark charcoal with green undertone */
    --novel-scout-slate: #5A6B69;        /* Medium slate with green undertone */
    --novel-scout-mist: #A8B5B3;         /* Light mist gray-green */
    --novel-scout-pearl: #F7F9F8;        /* Off-white with subtle green tint */
    
    /* Semantic Colors */
    --primary-color: #0B5351;            /* Using Novel Scout green as primary */
    --secondary-color: #5A6B69;          /* Novel Scout slate */
    --success-color: #0F6B67;            /* Novel Scout green light */
    --info-color: #4A0B53;               /* Novel Scout purple */
    --warning-color: #8B7A0B;            /* Novel Scout gold */
    --danger-color: #8B4A47;             /* Novel Scout coral */
    --light-color: #F7F9F8;              /* Novel Scout pearl */
    --dark-color: #2C3E3C;               /* Novel Scout charcoal */
    
    /* Legacy Support (keeping old variables for compatibility) */
    --pastel-green: #0F6B67;             /* Map to lighter Novel Scout green */
    --light-green: #E8F4F3;              /* Map to pale Novel Scout green */
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

/* Navbar styling */
.bg-pastel-green {
    background: linear-gradient(135deg, var(--novel-scout-green) 0%, var(--novel-scout-green-light) 100%) !important;
}

.navbar-brand-large {
    font-size: 2.25rem !important; /* Increased from 1.5625rem to 2.25rem (two steps bigger) */
}

.navbar-brand-large i {
    font-size: 2.25rem !important; /* Make icon same size as text */
}

/* Responsive navbar brand sizing */
@media (max-width: 575.98px) {
    .navbar-brand-large {
        font-size: 1.5rem !important; /* Smaller on mobile phones */
    }
    .navbar-brand-large i {
        font-size: 1.5rem !important;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .navbar-brand-large {
        font-size: 1.75rem !important; /* Medium size on small tablets */
    }
    .navbar-brand-large i {
        font-size: 1.75rem !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-brand-large {
        font-size: 2rem !important; /* Slightly smaller on tablets */
    }
    .navbar-brand-large i {
        font-size: 2rem !important;
    }
}

@media (min-width: 992px) {
    .navbar-brand-large {
        font-size: 2.25rem !important; /* Full size on desktop and larger */
    }
    .navbar-brand-large i {
        font-size: 2.25rem !important;
    }
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 1) !important;
}

/* Footer styling */

/* Main content container with max width */
.container-fluid {
    max-width: 1300px; /* Reduced to fit 4 cards with minimal gaps */
    margin: 0 auto;
}

/* Content area with sidebar layout */
.content-container {
    max-width: 1300px; /* Reduced to fit 4 cards with minimal gaps */
    margin: 0 auto;
}

/* Book Cards */
.book-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 0 !important; /* Override general card styling to remove rounded corners */
    overflow: hidden;
    max-width: 240px !important; /* Force maximum size but allow responsive scaling */
    width: auto; /* Allow responsive width up to max-width */
    margin: 0 auto; /* Center cards in their columns */
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* Book card title styling */
.book-card .card-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.book-card .card-title a:hover {
    color: var(--novel-scout-green);
}

/* Author styling */
.book-card .card-text:first-of-type a,
.detail-item a[href*="/authors/"],
.authors-column a,
.genres-column a,
.locations-column a,
.lead a[href*="/authors/"] {
    color: var(--novel-scout-charcoal);
    text-decoration: none;
    transition: color 0.3s ease;
}

.book-card .card-text:first-of-type a:hover,
.detail-item a[href*="/authors/"]:hover,
.authors-column a:hover,
.genres-column a:hover,
.locations-column a:hover,
.lead a[href*="/authors/"]:hover {
    color: var(--novel-scout-purple);
}

/* Publisher styling */
.book-card .card-text:last-of-type a,
.detail-item a[href*="/publishers/"],
.publishers-column a,
.publisher-item a {
    color: var(--novel-scout-slate);
    text-decoration: none;
    transition: color 0.3s ease;
}

.book-card .card-text:last-of-type a:hover,
.detail-item a[href*="/publishers/"]:hover,
.publishers-column a:hover,
.publisher-item a:hover {
    color: var(--novel-scout-coral);
}

/* Navigation styling */
.nav-books:hover {
    color: var(--novel-scout-green) !important;
}

.nav-authors:hover {
    color: var(--novel-scout-purple) !important;
}

.nav-publishers:hover {
    color: var(--novel-scout-coral) !important;
}

/* Top navigation bar styling */
.navbar-dark .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 1) !important;
}

/* Sidebar navigation - apply colors to Books link */
.sidebar-nav .nav-books:hover {
    color: var(--novel-scout-green) !important;
}

.sidebar-nav .nav-authors:hover {
    color: var(--novel-scout-purple) !important;
}

.sidebar-nav .nav-publishers:hover {
    color: var(--novel-scout-coral) !important;
}

/* Breadcrumb styling */
.breadcrumb-item a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a[href*="index.html"]:hover {
    color: var(--novel-scout-green);
}

.breadcrumb-item a[href*="authors"]:hover {
    color: var(--novel-scout-purple);
}

.breadcrumb-item a[href*="publishers"]:hover {
    color: var(--novel-scout-coral);
}

/* Responsive grid spacing */
.row.g-4 {
    --bs-gutter-x: 1.0rem; /* Reduced for tighter spacing */
    --bs-gutter-y: 1.0rem; /* Reduced for tighter spacing */
}

.book-image-container {
    position: relative;
    height: 0;
    padding-bottom: 120%; /* Reduced from 150% for shorter book cards */
    overflow: hidden;
    background: #ffffff; /* White background to match book card */
}

.book-image-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1rem; /* Same as typical Bootstrap card padding - matches gap below image */
    background: #ffffff; /* Same as book card background */
    z-index: 2; /* Above the image */
}

.book-image {
    position: absolute;
    top: 1rem; /* Push image down below the top bar */
    left: 0;
    height: calc(100% - 1rem); /* Reduce height to account for top bar */
    width: 100%;
    object-fit: contain; /* Changed from cover to contain to show full image */
    transition: transform 0.3s ease;
}

/* Removed image zoom on hover for cleaner interaction */

.book-image-placeholder {
    position: absolute;
    top: 1rem; /* Push placeholder down below the top bar */
    left: 0;
    height: calc(100% - 1rem); /* Reduce height to account for top bar */
    width: 100%;
    background: #ffffff; /* White background to match book card */
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255,255,255,0.8) !important;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--novel-scout-green-pale) 0%, var(--novel-scout-green-soft) 100%);
}

/* Pagination */
.pagination .page-link {
    color: var(--novel-scout-green);
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--novel-scout-green);
    border-color: var(--novel-scout-green);
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background-color: var(--novel-scout-green);
    border-color: var(--novel-scout-green);
}

/* Header Pagination - Compact Style */
.pagination-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination-header .page-item {
    margin: 0;
}

.pagination-header .page-link {
    background: none;
    border: none;
    color: #333;
    padding: 4px 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.2s ease;
    min-width: 32px;
    text-align: center;
}

.pagination-header .page-link:hover {
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
}

.pagination-header .page-link:focus {
    outline: none;
    box-shadow: none;
}

.pagination-header .page-item.active .page-link {
    background-color: transparent;
    color: var(--novel-scout-green);
    font-weight: 600;
}

.pagination-header .page-item.disabled .page-link {
    color: #6c757d;
    background-color: transparent;
    cursor: default;
}

.pagination-header .page-item.disabled .page-link:hover {
    background-color: transparent;
    color: #6c757d;
}

.pagination-header .page-nav {
    color: #666;
    font-size: 16px;
    padding: 4px 8px;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.2s ease;
    min-width: 50px;
    text-align: center;
}

.pagination-header .page-nav:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: #333;
}

.pagination-header .page-nav:focus {
    outline: none;
    box-shadow: none;
}

.pagination-header .page-nav.active {
    background-color: var(--novel-scout-green);
    color: white;
    font-weight: 600;
    cursor: default;
}

.pagination-header .page-nav.active:hover {
    background-color: var(--novel-scout-green);
    color: white;
}

.pagination-header .page-nav.invisible {
    visibility: hidden;
}

/* Badges */
.badge {
    font-size: 0.75em;
    padding: 0.5em 0.75em;
    border-radius: 10px;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--novel-scout-green) 0%, var(--novel-scout-green-light) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--novel-scout-green-dark) 0%, var(--novel-scout-green) 100%);
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Breadcrumb */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2em;
    color: var(--secondary-color);
}

/* Sidebar */
.sidebar-sticky {
    position: sticky;
    top: 1rem;
    height: calc(100vh - 2rem);
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar-nav {
    padding: 0.1rem 1rem 1rem 1rem; /* Reduced top padding from 1rem to 0.1rem */
    background: var(--novel-scout-pearl);
    border-radius: 8px;
    border: 1px solid var(--novel-scout-green-soft);
}

.sidebar-nav .nav-link {
    color: var(--novel-scout-charcoal);
    font-weight: 500;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--novel-scout-green-pale);
    color: var(--novel-scout-green-dark);
    transform: translateX(3px);
}

.sidebar-nav .nav-link.active {
    background-color: var(--novel-scout-green);
    color: white;
}

.sidebar-heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--novel-scout-slate);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

/* Advanced Search Sidebar Styles */
.form-label-sm {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--novel-scout-charcoal);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sidebar-nav .form-control-sm,
.sidebar-nav .form-select-sm {
    border: 1px solid var(--novel-scout-mist);
    border-radius: 6px;
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
    transition: all 0.2s ease;
    background-color: var(--novel-scout-pearl);
}

.sidebar-nav .form-control-sm:focus,
.sidebar-nav .form-select-sm:focus {
    border-color: var(--novel-scout-green);
    box-shadow: 0 0 0 0.2rem rgba(11, 83, 81, 0.15);
    background-color: white;
}

.sidebar-nav .form-control-sm::placeholder {
    color: var(--novel-scout-mist);
    font-size: 0.75rem;
}

/* Advanced Search Buttons */
#applyFilters {
    background: linear-gradient(135deg, var(--novel-scout-green) 0%, var(--novel-scout-green-light) 100%);
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#applyFilters:hover {
    background: linear-gradient(135deg, var(--novel-scout-green-light) 0%, var(--novel-scout-green) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 83, 81, 0.2);
}

#clearFilters {
    border: 1px solid var(--novel-scout-mist);
    color: var(--novel-scout-slate);
    background: transparent;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

#clearFilters:hover {
    background: var(--novel-scout-coral-pale);
    border-color: var(--novel-scout-coral);
    color: var(--novel-scout-coral);
}

/* Results Counter */
#resultsCounter {
    background: var(--novel-scout-green-pale);
    border: 1px solid var(--novel-scout-green-soft);
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: var(--novel-scout-charcoal);
}

#resultCount {
    font-weight: 600;
    color: var(--novel-scout-green);
}

/* Price Range Inputs */
.sidebar-nav .row.g-1 .col-6 {
    padding-left: 0.125rem;
    padding-right: 0.125rem;
}

.sidebar-nav .row.g-1 .col-6:first-child {
    padding-left: 0;
}

.sidebar-nav .row.g-1 .col-6:last-child {
    padding-right: 0;
}

/* No Results Styling */
.no-results {
    padding: 3rem 1rem;
    text-align: center;
}

.no-results i {
    display: block;
    margin-bottom: 1rem;
}

.no-results h4 {
    color: var(--novel-scout-slate);
    margin-bottom: 1rem;
}

.no-results p {
    color: var(--novel-scout-mist);
    margin-bottom: 1.5rem;
}

/* Advanced Search Section Spacing */
.sidebar-nav .mt-4 .mb-3 {
    margin-bottom: 1rem !important;
}

/* Collapsible Filter Headers */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    margin-bottom: 0.5rem;
}

.filter-header:hover {
    background-color: var(--novel-scout-green-pale);
}

.collapse-icon {
    font-size: 0.875rem;
    color: var(--novel-scout-slate);
    transition: transform 0.3s ease;
}

.filter-header[aria-expanded="false"] .collapse-icon {
    transform: rotate(-90deg);
}

.filter-header[aria-expanded="true"] .collapse-icon {
    transform: rotate(0deg);
}

/* Checkbox Groups Styling */
.checkbox-group {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--novel-scout-pearl);
    border: 1px solid var(--novel-scout-green-soft);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.checkbox-group .form-check {
    margin-bottom: 0.25rem;
    padding-left: 1.25rem;
}

.checkbox-group .form-check:last-child {
    margin-bottom: 0;
}

.checkbox-group .form-check-input {
    border: 1px solid var(--novel-scout-mist);
    border-radius: 3px;
    background-color: white;
    transition: all 0.2s ease;
}

.checkbox-group .form-check-input:checked {
    background-color: var(--novel-scout-green);
    border-color: var(--novel-scout-green);
}

.checkbox-group .form-check-input:focus {
    border-color: var(--novel-scout-green-light);
    box-shadow: 0 0 0 0.2rem rgba(11, 83, 81, 0.15);
}

.checkbox-group .form-check-label {
    font-size: 0.8rem;
    color: var(--novel-scout-charcoal);
    cursor: pointer;
    line-height: 1.3;
    padding-left: 0.25rem;
    transition: color 0.2s ease;
}

.checkbox-group .form-check-input:checked + .form-check-label {
    color: var(--novel-scout-green-dark);
    font-weight: 500;
}

/* Scrollbar styling for checkbox groups */
.checkbox-group::-webkit-scrollbar {
    width: 6px;
}

.checkbox-group::-webkit-scrollbar-track {
    background: var(--novel-scout-green-pale);
    border-radius: 3px;
}

.checkbox-group::-webkit-scrollbar-thumb {
    background: var(--novel-scout-green-soft);
    border-radius: 3px;
}

.checkbox-group::-webkit-scrollbar-thumb:hover {
    background: var(--novel-scout-green);
}

/* Enhance Select Dropdowns */
.sidebar-nav .form-select-sm {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235A6B69' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 16px 12px;
}

/* Mobile Responsive Adjustments for Advanced Search */
@media (max-width: 991px) {
    .sidebar-nav {
        background: var(--novel-scout-pearl);
        border: 1px solid var(--novel-scout-green-soft);
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .sidebar-heading {
        padding-left: 0;
        text-align: center;
        border-bottom: 1px solid var(--novel-scout-green-soft);
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .sidebar-sticky {
        position: static;
        height: auto;
    }
}

/* Loading Animation */
.book-image {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Responsive Design Improvements */
@media (max-width: 576px) {
    .book-card {
        max-width: 100%; /* Allow full width on mobile */
        margin: 0; /* Remove centering margin on mobile */
    }
    
    .book-image-container {
        padding-bottom: 110%; /* Reduced from 140% for shorter mobile cards */
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .book-card {
        max-width: 180px !important; /* Smaller max size for small tablets, responsive within column */
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .book-card {
        max-width: 180px !important; /* Smaller max size for tablets, responsive within column */
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .book-card {
        max-width: 180px !important; /* Smaller max size for large tablets, responsive within column */
    }
}

@media (min-width: 1200px) {
    .book-card {
        max-width: 240px !important; /* Smaller max size for desktop, responsive within column */
    }
}

.book-image.loaded {
    opacity: 1;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(11, 83, 81, 0.25);
}

/* Print Styles */
@media print {
    .navbar,
    .pagination,
    footer {
        display: none !important;
    }
    
    .book-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* Custom Utilities */
.text-novel-scout-green {
    color: var(--novel-scout-green) !important;
}

.text-novel-scout-coral {
    color: var(--novel-scout-coral) !important;
}

.text-novel-scout-purple {
    color: var(--novel-scout-purple) !important;
}

.text-novel-scout-gold {
    color: var(--novel-scout-gold) !important;
}

.text-novel-scout-charcoal {
    color: var(--novel-scout-charcoal) !important;
}

.text-novel-scout-slate {
    color: var(--novel-scout-slate) !important;
}

.bg-novel-scout-green {
    background-color: var(--novel-scout-green) !important;
}

.bg-novel-scout-green-light {
    background-color: var(--novel-scout-green-light) !important;
}

.bg-novel-scout-green-pale {
    background-color: var(--novel-scout-green-pale) !important;
}

.bg-novel-scout-coral {
    background-color: var(--novel-scout-coral) !important;
}

.bg-novel-scout-coral-pale {
    background-color: var(--novel-scout-coral-pale) !important;
}

.bg-novel-scout-pearl {
    background-color: var(--novel-scout-pearl) !important;
}

/* Gradient Utilities */
.bg-gradient-novel-scout {
    background: linear-gradient(135deg, var(--novel-scout-green) 0%, var(--novel-scout-green-light) 100%) !important;
}

.bg-gradient-novel-scout-coral {
    background: linear-gradient(135deg, var(--novel-scout-coral) 0%, var(--novel-scout-coral-light) 100%) !important;
}

/* Border Utilities */
.border-novel-scout-green {
    border-color: var(--novel-scout-green) !important;
}

.border-novel-scout-green-soft {
    border-color: var(--novel-scout-green-soft) !important;
}

/* Alphabet Navigation Links */
.alphabet-nav-link {
    color: var(--dark-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.alphabet-nav-link:hover {
    color: var(--novel-scout-green);
    background-color: var(--novel-scout-green-pale);
    text-decoration: none;
    transform: translateY(-1px);
}

.alphabet-nav-link:active {
    transform: translateY(0);
}

/* Alphabetical Section Styles - Shared by authors and publishers */
.alphabet-nav .btn {
    min-width: 40px;
    font-weight: 600;
}

.alphabet-nav .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.alphabet-section {
    scroll-margin-top: 100px; /* Offset for fixed header */
}

.alphabet-header h2 {
    font-size: 3rem;
    letter-spacing: 0.1em;
}

.alphabet-header hr {
    border-top: 3px solid #dee2e6;
    opacity: 0.8;
}

.alphabetical-column {
    padding-right: 1rem;
}

.alphabetical-item {
    transition: background-color 0.2s ease;
}

.alphabetical-item:hover {
    background-color: var(--novel-scout-green-pale);
}

.alphabetical-item:last-child {
    border-bottom: none !important;
}

.alphabetical-name a {
    color: var(--dark-color);
}

.alphabetical-name a:hover {
    color: var(--novel-scout-green);
}

.alphabetical-count {
    font-size: 0.875rem;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .alphabetical-column {
        margin-bottom: 1rem;
        padding-right: 0;
    }
    
    .alphabet-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .alphabet-nav .btn {
        min-width: 35px;
        font-size: 0.875rem;
    }
    
    .alphabet-header h2 {
        font-size: 1.5rem;
    }
}

/* Book Detail Page Styles */
.book-cover-large {
    max-height: 400px;
    width: 100%;
    object-fit: contain; /* Changed from cover to contain to prevent clipping */
    background: var(--light-color); /* Match page background */
    border-radius: 0 !important; /* Remove any rounded corners */
    box-shadow: none !important; /* Remove any shadows */
}

.book-cover-section {
    background: var(--light-color); /* Match page background */
    border-radius: 0; /* Remove rounded corners from container */
    padding: 1rem;
}

.book-cover-placeholder {
    height: 400px;
    width: 100%;
}

.description-text {
    font-size: 1.0rem;
    line-height: 1.6;
    color: #495057;
}

.store-listing-compact {
    transition: all 0.2s ease;
}

.store-listing-compact:hover {
    transform: translateY(-1px);
}

.store-listing-compact .border {
    border-color: #dee2e6 !important;
    transition: all 0.2s ease;
}

.store-listing-compact:hover .border {
    border-color: var(--novel-scout-green) !important;
    box-shadow: 0 0.125rem 0.25rem rgba(11, 83, 81, 0.15);
}

.store-listing-compact .fw-medium {
    color: var(--dark-color);
}

.detail-item {
    padding: 0.25rem 0;
}

/* Author Profile Styles */
.author-profile .card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
}

.author-bio {
    min-height: 60px;
}

.author-image-placeholder .placeholder-box {
    width: 120px;
    height: 120px;
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    margin: 0 auto;
}

.author-image-placeholder small {
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .publisher-header .display-4 {
        font-size: 2rem;
    }
}

/* Custom 4-column grid for book displays */
@media (min-width: 1200px) {
    .col-5-books {
        flex: 0 0 25%;
        max-width: 25%; /* 4 books per row on extra large screens */
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .col-5-books {
        flex: 0 0 25%;
        max-width: 25%; /* 4 books per row on large screens */
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .col-5-books {
        flex: 0 0 33.333333%;
        max-width: 33.333333%; /* 3 books per row on medium screens */
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .col-5-books {
        flex: 0 0 50%;
        max-width: 50%; /* 2 books per row on small screens */
    }
}

@media (max-width: 575.98px) {
    .col-5-books {
        flex: 0 0 100%;
        max-width: 100%; /* 1 book per row on extra small screens */
    }
}
