/* ========================================
   Community Book Search - Fully Responsive CSS
   Matching the provided screenshot design
   ======================================== */
/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* ========================================
   MAIN WRAPPER
   ======================================== */
.scb-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
/* ========================================
   HEADER STYLES
   ======================================== */
.scb-header {
    margin-bottom: 30px;
}
.scb-header-center {
    text-align: center;
}
.scb-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1F2A44;
    margin-bottom: 10px;
}
.scb-subtitle {
    margin: 10px 0 5px 0;
    font-size: 1.1em;
    color: #555;
}
.scb-breadcrumb {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 10px;
}
.scb-breadcrumb a {
    color: #1F2A44;
    text-decoration: none;
    transition: color 0.3s ease;
}
.scb-breadcrumb a:hover {
    color: #2980b9;
    text-decoration: underline;
}
/* ========================================
   CATEGORY SECTION
   ======================================== */
.scb-category {
    margin-bottom: 50px;
}
.scb-category h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.scb-count {
    font-size: 1rem;
    font-weight: 400;
    color: #7f8c8d;
}
/* ========================================
   GRID LAYOUT - RESPONSIVE
   ======================================== */
.scb-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
/* Tablet - 4 columns */
@media (max-width: 1200px) {
    .scb-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
/* Small Tablet - 3 columns */
@media (max-width: 992px) {
    .scb-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Mobile - 2 columns */
@media (max-width: 768px) {
    .scb-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}
/* Small Mobile - 1 column */
@media (max-width: 480px) {
    .scb-grid {
        grid-template-columns: 1fr;
    }
}
/* ========================================
   BOOK CARD LINK WRAPPER
   ======================================== */
.scb-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
/* ========================================
   BOOK CARD STYLES
   ======================================== */
.scb-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}
.scb-card-link:hover .scb-card {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
/* ========================================
   BOOK IMAGE
   ======================================== */
.scb-image {
    position: relative;
    width: 100%;
    padding-top: 140%;
    /* 1.4:1 aspect ratio for book covers */
    overflow: hidden;
    background: #f8f9fa;
}
.scb-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    
    object-fit: cover;
}
/* ========================================
   BOOK CONTENT
   ======================================== */
.scb-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}
/* ========================================
   BOOK AUTHOR (Overlay at bottom of image)
   ======================================== */
.scb-book-author {
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: #1F2A44;
    color: #fff;
    padding: 8px 16px;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    z-index: 10;
    width: 100%;
}
/* ========================================
   BOOK TITLE
   ======================================== */
.scb-book-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1F2A44;
    line-height: 1.4;
    margin: 0;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ========================================
   VIEW ALL CARD (Dark Blue Card)
   ======================================== */
.scb-card-view-all {
    background: linear-gradient(135deg, #1F2A44 0%, #34495e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.scb-card-view-all:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.scb-view-all-content {
    text-align: center;
    color: #fff;
    padding: 30px 20px;
}
.scb-view-all-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
.scb-view-all-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}
.scb-view-all-content p {
    font-size: 0.95rem;
    color: #ecf0f1;
    margin-bottom: 20px;
}
.scb-btn-view-all {
    display: inline-block;
    padding: 12px 30px;
    background: #fff;
    color: #1F2A44;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.scb-btn-view-all:hover {
    background: #1F2A44;
    color: #fff;
    transform: scale(1.05);
}
/* ========================================
   MESSAGES & ALERTS
   ======================================== */
.scb-message,
.scb-warning,
.scb-no-results {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}
.scb-message {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}
.scb-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}
.scb-no-results {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}
.scb-no-results p {
    font-size: 1.1rem;
    margin: 10px 0;
}
/* ========================================
   VIEW ALL PAGE SPECIFIC STYLES
   ======================================== */
.scb-view-all-page {
    padding: 30px 20px;
}
.scb-book-count {
    margin-bottom: 20px;
    text-align: center;
    color: #666;
    font-size: 1rem;
}
.scb-book-count strong {
    color: #1F2A44;
    font-size: 1.2rem;
}
.scb-back-link {
    margin-top: 40px;
    text-align: center;
}
.scb-btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: #1F2A44;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.scb-btn-primary:hover {
    background: #2980b9;
    transform: scale(1.05);
}
.scb-btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background: #1F2A44;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.scb-btn-secondary:hover {
    background: #fff;
    transform: scale(1.05);
}
/* ========================================
   RESPONSIVE TYPOGRAPHY
   ======================================== */
@media (max-width: 768px) {
    .scb-header h2 {
        font-size: 1.5rem;
    }
    .scb-category h3 {
        font-size: 1.2rem;
    }
    .scb-book-title {
        font-size: 0.9rem;
    }
    .scb-book-author {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}
@media (max-width: 480px) {
    .scb-wrapper {
        padding: 15px;
    }
    .scb-header h2 {
        font-size: 1.3rem;
    }
    .scb-category h3 {
        font-size: 1.1rem;
    }
    .scb-book-title {
        font-size: 0.85rem;
    }
    .scb-book-author {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
    .scb-view-all-icon {
        font-size: 3rem;
    }
    .scb-view-all-content h4 {
        font-size: 1.1rem;
    }
}
/* ========================================
   ACCESSIBILITY
   ======================================== */
.scb-card-link:focus {
    outline: 2px solid #1F2A44;
    outline-offset: 2px;
    border-radius: 8px;
}
.scb-btn-view-all:focus,
.scb-btn-primary:focus,
.scb-btn-secondary:focus {
    outline: 2px solid #1F2A44;
    outline-offset: 2px;
}
/* ========================================
   LOADING STATES
   ======================================== */
.scb-loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}
.scb-loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}
@keyframes dots {
    0%,
    20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%,
    100% {
        content: '...';
    }
}
/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .scb-btn,
    .scb-btn-view-all,
    .scb-btn-primary,
    .scb-btn-secondary {
        display: none;
    }
    .scb-card {
        break-inside: avoid;
    }
}