/* Library Hero Section */
.library-hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 0;
    margin-top: 0;
}

@media (min-width: 769px) {
    .library-hero {
        margin-top: 80px;
    }
}

.library-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    -webkit-mask-image: linear-gradient(to bottom, #012c39 0%, #012c39 0%, #00000000 85%);
    mask-image: linear-gradient(to bottom, #012c39 0%, #012c39 0%, #00000000 85%);
    opacity: 0.3;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.8;
    -webkit-mask-image: linear-gradient(to bottom, #012c39 0%, #012c39 0%, #00000000 85%);
    mask-image: linear-gradient(to bottom, #012c39 0%, #012c39 0%, #00000000 85%);
}



.library-hero-content {
    max-width: 800px;
    padding: 0 20px;
    z-index: 1;
    margin-top: 60px;
}

.library-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--yellow-600);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.library-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: #ffffff;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Advanced Search Bar */
.library-search-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    position: relative;
    flex-direction: column;
    align-items: center;
}

.search-wrapper {
    display: flex;
    max-width: 600px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.library-search-input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    outline: none;
    background: transparent;
    color: #333;
}

.library-search-input::placeholder {
    color: #666;
}

.category-select {
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    outline: none;
    background: transparent;
    color: #333;
    cursor: pointer;
    border-left: 1px solid #e0e0e0;
}

.search-btn {
    background: var(--green-300);
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--green-300);
    transform: scale(1.03);
}

.search-btn i {
    color: #012c39;
    font-size: 18px;
}

/* Live Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.search-suggestions.show {
    display: block;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(224, 224, 224, 0.5);
}

.suggestion-item:hover {
    background: rgba(1, 44, 57, 0.1);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

/* Fallback visual when no image is available */
.suggestion-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #012C39, #8B4513);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 4px 10px rgba(0,0,0,0.1);
}
.suggestion-placeholder i {
    font-size: 26px;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-weight: 600;
    color: #012C39;
    font-size: 14px;
    margin-bottom: 4px;
}

.suggestion-author {
    font-size: 12px;
    color: #8B4513;
    margin-bottom: 4px;
}

.suggestion-description {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggestion-type {
    background: linear-gradient(135deg, #012C39, #8B4513);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 10px;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 20px;
}

/* Full-width section banners for headings + descriptions */
.section-banner {
    width: 100%;
    padding: clamp(24px, 4vw, 56px) 20px;
    background: rgba(2, 67, 57, 0.6);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15);
    margin-bottom: clamp(24px, 4vw, 48px);
    border-radius: 12px;
}

.section-banner .section-banner-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.section-banner h2 {
    color: var(--primary-orange-500) !important;
    text-align: center;
}

.section-banner p {
    color: #ffffff !important;
    font-weight: 300 !important;
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.7;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #012C39;
    margin-bottom: 1rem;
    font-weight: 600;
}

.section-header p {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: #777;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
    text-align: justify;
}

/* Main Sections */
.books-section,
.sound-library-section,
.video-library-section {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 40px auto;
}

/* Grid Layouts */
.books-grid,
.sounds-grid,
.videos-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 3rem;
}

/* Card Styles */
.book-card,
.sound-card,
.video-card {
    background: var(--light-green-50);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(1, 44, 57, 0.06);
    transition: all 0.25s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card:hover,
.sound-card:hover,
.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

/* Book Card Specific */
.book-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    padding-top: 16px;
    background: #f5f0e8;
    box-sizing: border-box;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.book-card:hover .book-image img { transform: none; }

.book-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.book-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    font-size: 1rem;
    color: #8B4513;
    margin-bottom: 15px;
    font-weight: 500;
}

.book-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.amazon-btn,
.about-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.amazon-btn {
    background: linear-gradient(135deg, #FF9500, #FFB84D);
    color: white;
}

.amazon-btn:hover {
    background: linear-gradient(135deg, #E6850E, #E6A83D);
    transform: scale(1.02);
}

.about-btn {
    background: linear-gradient(135deg, #012C39, #8B4513);
    color: white;
}

.about-btn:hover {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    transform: scale(1.02);
}

/* Sound Card Specific */
.sound-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #012C39, #8B4513);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.sound-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.08)"/><circle cx="75" cy="25" r="1.5" fill="rgba(255,255,255,0.06)"/><circle cx="25" cy="75" r="1.2" fill="rgba(255,255,255,0.07)"/><circle cx="75" cy="75" r="0.8" fill="rgba(255,255,255,0.09)"/></svg>');
    opacity: 0.3;
}

.sound-icon {
    font-size: 3rem;
    color: white;
    z-index: 1;
}


.sound-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sound-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sound-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sound-duration {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.play-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #012C39, #8B4513);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
}

.play-btn:hover {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    transform: scale(1.02);
}

/* Video Card Specific */
.video-thumbnail {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-card:hover .play-overlay {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-overlay i {
    color: white;
    font-size: 24px;
    margin-left: 3px;
}

.video-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.video-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

.watch-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #DC143C, #FF6B6B);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    margin-top: auto;
}

.watch-btn:hover {
    background: linear-gradient(135deg, #B91C3C, #EF4444);
    transform: scale(1.02);
}

/* Show More Button */
.show-more-container {
    text-align: center;
    margin-top: 2rem;
}

.show-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: var(--green-300);
    color: #012c39;
    border: none;
    border-radius: 8px;
    font-size: clamp(0.85rem, 1.6vw, 0.95rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.show-more-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--primary-dark-blue-500), var(--primary-green-500));
    border: 0.5px solid var(--primary-orange-500);
    border-radius: 8px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease;
    opacity: 0;
    z-index: 0;
}

.show-more-btn::after {
    content: attr(data-label);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-orange-500);
    font-weight: 700;
    font-size: inherit;
    line-height: 1;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.4s ease;
}

.show-more-btn:hover::before { transform: scaleX(1.5); opacity: 1; }
.show-more-btn:hover { color: transparent; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.show-more-btn:hover::after { opacity: 1; }

/* Hidden Cards */
.book-card.hidden,
.sound-card.hidden,
.video-card.hidden {
    display: none;
}

/* Book Modal */
.book-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    /* Center modal content */
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.book-modal-content {
    background-color: white;
    margin: 0;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.book-modal-header {
    background: linear-gradient(135deg, #012C39, #8B4513);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.book-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.book-modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.book-modal-close:hover {
    transform: scale(1.2);
}

.book-modal-body {
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

.book-modal-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.book-modal-details h3 {
    color: #012C39;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.book-description h4 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.book-description p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: justify;
}

.book-modal-actions {
    display: flex;
    gap: 15px;
}

.book-modal-actions .amazon-btn {
    padding: 15px 25px;
    font-size: 16px;
    flex: none;
}

/* Media (Sound) Modal */
.media-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.media-modal-content {
    background-color: #000;
    margin: 0;
    border-radius: 15px;
    width: 92%;
    max-width: 900px;
    max-height: 88vh;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.media-modal-header {
    background: linear-gradient(135deg, #012C39, #8B4513);
    color: white;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.media-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.media-modal-close {
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.media-modal-close:hover { transform: scale(1.15); }

.media-modal-body { padding: 0; }

.media-iframe-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.media-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .books-grid,
    .sounds-grid,
    .videos-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .books-grid,
    .sounds-grid,
    .videos-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
    
    .library-title {
        font-size: clamp(1.5rem, 6.5vw, 2rem); /* Standardized for all pages */
        color: var(--yellow-600);
    }
    
    .search-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        border-radius: 8px;
    }
    
    .library-search-input {
        flex: 1 1 100%;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .category-select {
        flex: 1;
        border-left: none;
        border-right: 1px solid #e0e0e0;
    }
    
    .search-btn {
        flex: 0 0 auto;
        border-radius: 0 0 8px 0;
    }
    
    .book-modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-banner {
        padding: clamp(20px, 3vw, 40px) 15px;
    }
    
    .section-banner .section-banner-inner {
        padding: 0 20px;
        text-align: center;
    }
    
    .section-banner h2 {
        text-align: center;
    }
    
    .section-banner p {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .books-section,
    .sound-library-section,
    .video-library-section {
        padding: 40px 15px;
        margin: 30px auto;
    }
    
    .books-grid,
    .sounds-grid,
    .videos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    
    .library-hero {
        height: 100vh;
        min-height: 100vh;
        padding-top: 80px;
        margin-top: 0;
    }
    
    .library-hero-content {
        padding: 0 15px;
        margin-top: 0;
    }
    
    .library-subtitle {
        font-size: clamp(0.85rem, 3vw, 1rem);
        margin-bottom: 1.5rem;
    }
    
    .library-search-container {
        margin-top: 1.5rem;
    }
    
    .search-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        max-width: 90%;
        border-radius: 12px;
    }
    
    .library-search-input {
        flex: 1 1 100%;
        padding: 14px 16px;
        font-size: 15px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .category-select {
        flex: 1;
        padding: 14px 16px;
        font-size: 15px;
        border-left: none;
        border-right: 1px solid rgba(0,0,0,0.1);
    }
    
    .search-btn {
        flex: 0 0 auto;
        padding: 14px;
        border-radius: 0 0 12px 0;
    }
    
    .search-btn i {
        font-size: 20px;
    }
    
    /* Adjust Library hero to be more compact on tablet */
    .library-hero {
        min-height: 70vh;
        height: auto;
    }
    
    .book-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .amazon-btn,
    .about-btn {
        flex: none;
        width: 100%;
        justify-content: center;
    }
    
    .book-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .book-modal-body {
        padding: 20px;
    }
    
    .book-modal-header {
        padding: 15px 20px;
    }
    
    .section-banner {
        padding: clamp(18px, 2.5vw, 32px) 10px;
    }
    
    .section-banner .section-banner-inner {
        padding: 0 15px;
        text-align: center;
    }
    
    .section-banner h2 {
        text-align: center;
    }
    
    .section-banner p {
        text-align: left;
    }
}

@media (max-width: 480px) {
    /* Make Library hero more compact on mobile */
    .library-hero {
        min-height: 60vh;
        height: auto;
    }
    
    .books-grid,
    .sounds-grid,
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .library-search-container {
        padding: 0 10px;
        margin-top: 1.5rem;
    }
    
    .search-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        max-width: 95%;
        border-radius: 10px;
    }
    
    .library-search-input {
        flex: 1 1 100%;
        padding: 13px 14px;
        font-size: 14px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .category-select {
        flex: 1;
        padding: 13px 14px;
        font-size: 14px;
        border-left: none;
        border-right: 1px solid rgba(0,0,0,0.1);
    }
    
    .search-btn {
        flex: 0 0 auto;
        padding: 13px;
        border-radius: 0 0 10px 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .book-content,
    .sound-content,
    .video-content {
        padding: 15px;
    }
    
    .book-title,
    .sound-title,
    .video-title {
        font-size: 1.1rem;
    }
    
    .library-hero {
        height: 100vh;
        min-height: 100vh;
        padding-top: 80px;
    }
    
    .library-title {
        font-size: clamp(1.5rem, 6.5vw, 2rem); /* Standardized for all pages */
        margin-bottom: 0.75rem;
        color: var(--yellow-600);
    }
    
    .library-subtitle {
        font-size: clamp(0.8rem, 3.2vw, 0.95rem);
        margin-bottom: 1.5rem;
    }
    
    .section-banner {
        padding: 16px 10px;
        border-radius: 8px;
    }
    
    .section-banner .section-banner-inner {
        padding: 0 10px;
        text-align: center;
    }
    
    .section-banner h2 {
        text-align: center;
    }
    
    .section-banner p {
        text-align: left;
    }
    
    .section-banner h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 0.75rem;
    }
    
    .section-banner p {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        line-height: 1.6;
    }
}

/* Extra Small Mobile (320px - 375px) */
@media (max-width: 375px) {
    .library-hero {
        height: 100vh;
        min-height: 100vh;
        padding-top: 80px;
    }
    
    .library-title {
        font-size: clamp(1.5rem, 6.5vw, 2rem); /* Standardized for all pages */
        margin-bottom: 0.6rem;
        color: var(--yellow-600); /* Yellow color on mobile */
    }
    
    .library-subtitle {
        font-size: clamp(0.75rem, 3.5vw, 0.88rem);
        margin-bottom: 1.25rem;
    }
    
    .library-search-container {
        margin-top: 1.25rem;
    }
    
    .search-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        max-width: 95%;
    }
    
    .library-search-input {
        flex: 1 1 100%;
        padding: 12px 12px;
        font-size: 13px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .category-select {
        flex: 1;
        padding: 12px 12px;
        font-size: 13px;
        border-left: none;
        border-right: 1px solid rgba(0,0,0,0.1);
    }
    
    .search-btn {
        flex: 0 0 auto;
        padding: 12px;
    }
    
    .books-section,
    .sound-library-section,
    .video-library-section {
        padding: 30px 10px;
    }
    
    .section-banner {
        padding: 14px 8px;
    }
    
    .section-banner .section-banner-inner {
        padding: 0 8px;
        text-align: center;
    }
    
    .section-banner h2 {
        font-size: 1.4rem;
        text-align: center;
    }
    
    .section-banner p {
        font-size: 0.875rem;
        text-align: left;
    }
    
    .book-card,
    .sound-card,
    .video-card {
        border-radius: 10px;
    }
}

/* Large Desktop (1920px+) */
@media (min-width: 1920px) {
    .library-hero {
        height: 65vh;
    }
    
    .books-section,
    .sound-library-section,
    .video-library-section {
        max-width: 1600px;
    }
    
    .section-banner .section-banner-inner {
        max-width: 1560px;
    }
    
    .books-grid,
    .sounds-grid,
    .videos-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 32px;
    }
}

/* Loading States */
.loading-card {
    background: #f0f0f0;
    border-radius: 15px;
    height: 400px;
    position: relative;
    overflow: hidden;
}

.loading-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Search Results Highlighting */
.search-highlight {
    background-color: #FFE135;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Accessibility Improvements */
.book-card:focus,
.sound-card:focus,
.video-card:focus {
    outline: 3px solid #8B4513;
    outline-offset: 2px;
}

.amazon-btn:focus,
.about-btn:focus,
.play-btn:focus,
.watch-btn:focus,
.show-more-btn:focus {
    outline: 3px solid #8B4513;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .library-hero,
    .book-modal,
    .show-more-container {
        display: none;
    }
    
    .books-grid,
    .sounds-grid,
    .videos-grid {
        display: block;
    }
    
    .book-card,
    .sound-card,
    .video-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}
