/* Main Container */
.pdf-manager-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
}

/* Grid Layout */
.pdf-categories-grid,
.pdf-posts-grid {
    display: grid;
    gap: 30px;
    margin: 30px 0;
}

.pdf-grid-1 { grid-template-columns: repeat(1, 1fr); }
.pdf-grid-2 { grid-template-columns: repeat(2, 1fr); }
.pdf-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pdf-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Category/Post Items */
.pdf-category-item,
.pdf-post-item {
    background: white;
    border-radius: 12px;
    height: auto;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pdf-category-item:hover,
.pdf-post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.pdf-category-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
/* Featured Images*/
.pdf-featured-image{
    display: flex;
    justify-content: center;
    width: 100%;
    max-height: 300px;
}
.pdf-featured-image img{
    width: 100%;
}

/* Stacked Images */
.stacked-images-wrapper {
    position: relative;
    padding: 20px;
}

.stacked-images {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 0 auto;
}

.stacked-image {
    position: absolute;
    left: 30px;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
}

.stacked-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.pdf-placeholder {
    width: 100%;
    height: 100%;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-placeholder .dashicons {
    font-size: 48px;
    color: var(--primary-color);
}

/* Stack positioning and rotation */
.stack-1 {
    transform: rotate(-8deg) translateY(8px) translateX(-4px);
    z-index: 1;
}

.stack-2 {
    transform: rotate(-4deg) translateY(4px) translateX(-2px);
    z-index: 2;
}

.stack-3 {
    transform: rotate(0deg);
    z-index: 3;
}

.stack-4 {
    transform: rotate(4deg) translateY(-4px) translateX(2px);
    z-index: 4;
}

.stack-5 {
    transform: rotate(8deg) translateY(-8px) translateX(4px);
    z-index: 5;
}

/* Hover effect for the entire stack */
.stacked-images:hover .stacked-image {
    transform: scale(1.05);
}

.stacked-images:hover .stack-1 {
    transform: rotate(-10deg) translateY(10px) translateX(-6px) scale(1.05);
}

.stacked-images:hover .stack-2 {
    transform: rotate(-5deg) translateY(5px) translateX(-3px) scale(1.05);
}

.stacked-images:hover .stack-3 {
    transform: rotate(0deg) scale(1.05);
}

.stacked-images:hover .stack-4 {
    transform: rotate(5deg) translateY(-5px) translateX(3px) scale(1.05);
}

.stacked-images:hover .stack-5 {
    transform: rotate(10deg) translateY(-10px) translateX(6px) scale(1.05);
}

/* Info Sections */
.pdf-category-info,
.pdf-post-info {
    padding: 20px;
    text-align: center;
}

.pdf-category-title,
.pdf-post-title {
    margin: 0 0 10px;
    font-size: 18px;
    color: var(--text-color);
}

.pdf-category-title {
    font-weight: 600;
}

.pdf-post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.pdf-post-title a:hover {
    color: var(--primary-color);
}

.pdf-category-count {
    margin: 0;
    font-size: 14px;
    color: var(--dark-gray);
}

/* Category Page*/
.pdf-category-archive-title{
    color: var(--primary-color);
}

/* Download Button */
.pdf-download-btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.pdf-download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: #fff;
}

/* Pagination */
.pdf-posts-pagination {
    text-align: center;
    margin: 40px 0;
}

.load-more-pdf-posts {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.load-more-pdf-posts:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notices */
.pdf-manager-notice {
    text-align: center;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 4px;
    color: var(--dark-gray);
}

/* Responsive */
@media (max-width: 1024px) {
    .pdf-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .pdf-grid-3,
    .pdf-grid-4 { grid-template-columns: repeat(2, 1fr); }
    
    .stacked-images {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .pdf-grid-2,
    .pdf-grid-3,
    .pdf-grid-4 { grid-template-columns: repeat(1, 1fr); }
}