/* FIXED: Full-width hero, boxed content layout */
.pdf-library-hero {
    background: #f0f4ff;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

.pdf-library-hero-title {
    font-family: 'Brush Script MT', cursive, serif;
    font-size: 48px;
    font-weight: 600;
    color: #0000CD;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.pdf-library-hero-description {
    font-size: 18px;
    color: #666666;
    margin: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.pdf-library-section-heading {
    font-family: 'Brush Script MT', cursive, serif;
    font-size: 36px;
    font-weight: 600;
    color: #0000CD;
    text-align: center;
    margin: 0 0 40px 0;
}

/* FIXED: Added container for boxed layout */
.pdf-library-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.pdf-library-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

.pdf-library-grid {
    display: grid;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.pdf-library-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.pdf-library-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pdf-library-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pdf-library-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.pdf-library-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.pdf-library-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 0, 205, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.pdf-library-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 205, 0.2);
}

.pdf-library-icon {
    width: 80px;
    height: 80px;
    background: #f0f4ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.pdf-library-item:hover .pdf-library-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, #f0f4ff 0%, #e6edff 100%);
}

.pdf-library-title {
    font-family: 'Brush Script MT', cursive, serif;
    font-size: 18px;
    font-weight: 600;
    color: #0000CD;
    margin: 0;
    padding: 0;
    line-height: 1.4;
    word-wrap: break-word;
    max-width: 100%;
}

.pdf-library-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
}

.pdf-library-btn {
    flex: 1;
    max-width: 120px;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.pdf-library-icon-view,
.pdf-library-icon-download {
    flex-shrink: 0;
}

.pdf-library-btn-view {
    background: #0000CD;
    color: #ffffff;
}

.pdf-library-btn-view:hover {
    background: #0000b3;
    transform: scale(1.05);
}

.pdf-library-btn-download {
    background: #ffffff;
    color: #0000CD;
    border: 2px solid #0000CD;
}

.pdf-library-btn-download:hover {
    background: #0000CD;
    color: #ffffff;
    transform: scale(1.05);
}

.pdf-library-icon-download {
    display: none;
}

.pdf-library-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    font-style: italic;
}

.pdf-library-modal {
    background: #ffffff;
    padding: 20px;
    max-width: 95%;
    width: 1200px;
    margin: 0 auto;
    position: relative;
    border-radius: 10px;
}

.pdf-library-viewer-container {
    width: 100%;
    height: 80vh;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.pdf-library-viewer {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}

.mfp-bg {
    background: rgba(0, 0, 205, 0.9);
}

.mfp-close {
    color: #ffffff;
    font-size: 40px;
    opacity: 1;
}

.mfp-close:hover {
    opacity: 0.8;
}

@media (max-width: 1200px) {
    .pdf-library-cols-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .pdf-library-cols-4,
    .pdf-library-cols-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .pdf-library-hero-title {
        font-size: 40px;
    }
    
    .pdf-library-section-heading {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .pdf-library-cols-3,
    .pdf-library-cols-4,
    .pdf-library-cols-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pdf-library-item {
        padding: 20px 15px;
    }
    
    .pdf-library-title {
        font-size: 16px;
    }
    
    .pdf-library-icon {
        width: 60px;
        height: 60px;
    }
    
    .pdf-library-modal {
        padding: 15px;
    }
    
    .pdf-library-viewer-container {
        height: 70vh;
        min-height: 400px;
    }
    
    .pdf-library-hero-title {
        font-size: 32px;
    }
    
    .pdf-library-hero-description {
        font-size: 16px;
    }
    
    .pdf-library-section-heading {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .pdf-library-cols-1,
    .pdf-library-cols-2,
    .pdf-library-cols-3,
    .pdf-library-cols-4,
    .pdf-library-cols-5 {
        grid-template-columns: 1fr;
    }
    
    .pdf-library-actions {
        flex-direction: column;
    }
    
    .pdf-library-btn {
        max-width: 100%;
    }
    
    .pdf-library-icon-download {
        display: inline-block;
    }
    
    .pdf-library-viewer-container {
        height: 60vh;
        min-height: 300px;
    }
    
    .pdf-library-hero {
        padding: 40px 15px;
    }
    
    .pdf-library-hero-title {
        font-size: 28px;
    }
    
    .pdf-library-hero-description {
        font-size: 14px;
    }
    
    .pdf-library-section-heading {
        font-size: 24px;
    }
}
