/* Downloads Section Structure */
.downloads-section {
    padding: 3rem 0;
}

.downloads-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.downloads-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.downloads-header p {
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* Download Filters */
.downloads-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-button {
    background-color: #f5f5f5;
    border: none;
    color: #555;
    padding: 0.5rem 1.5rem;
    margin: 0.25rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-button:hover {
    background-color: #e0e0e0;
}

.filter-button.active {
    background-color: #0056b3;
    color: white;
}

/* Download Grid Layout */
.downloads-grid,
.download-grid-listing {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.download-grid-listing.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.download-grid-listing.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.download-grid-listing.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media screen and (max-width: 1199px) {
    .download-grid-listing.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 991px) {
    .download-grid-listing.columns-3,
    .download-grid-listing.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 767px) {
    .downloads-grid,
    .download-grid-listing.columns-2,
    .download-grid-listing.columns-3,
    .download-grid-listing.columns-4 {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Download Item Styles */
.download-item-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.download-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    background-color: white;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.download-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.download-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.download-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.download-icon-placeholder {
    font-size: 60px;
    color: #999;
}

.download-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

.download-item h3,
.download-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.download-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.download-content h3 a:hover {
    color: var(--accent-color, #0056b3);
}

/* File Type Badge */
.file-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(0, 86, 179, 0.9);
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Description */
.download-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* Download Actions */
.download-actions {
    margin-top: auto;
}

.view-details-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: transparent;
    color: var(--accent-color, #0056b3);
    border: 1px solid var(--accent-color, #0056b3);
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}

.view-details-button:hover {
    background-color: var(--accent-color, #0056b3);
    color: white;
}

/* No Downloads Message */
.no-downloads {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Loading Animation */
.loading-animation {
    text-align: center;
    padding: 2rem;
    display: none;
}

.loading-animation .spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #0056b3;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Single Download Styles */
.single-download .post-title {
    margin-bottom: 20px;
}

/* Featured Image in Single Download Page */
.download-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.download-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Download Files Section */
.download-files-wrapper {
    margin-top: 30px;
}

.download-files {
    margin-top: 20px;
}

.download-file-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #f7f7f7;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.download-file-item:hover {
    background-color: #f0f0f0;
}

.download-file-icon {
    margin-right: 20px;
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-file-icon i {
    position: relative;
    z-index: 2;
    font-size: 20px;
}

.download-file-icon-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 50%;
    opacity: 0.1;
    z-index: 1;
}

.download-file-info {
    flex: 1;
}

.download-file-title {
    margin-bottom: 5px;
}

.download-file-meta {
    display: flex;
    flex-wrap: wrap;
}

.download-file-ext,
.download-file-size,
.download-file-version {
    margin-right: 15px;
    font-size: 14px;
    color: #666;
}

.download-file-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: #ffffff;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-file-link:hover {
    background-color: var(--secondary-color, #222222);
}

/* PDF Preview Styles */
.pdf-preview-wrapper {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eaeaea;
}

.pdf-preview-wrapper h4 {
    margin-bottom: 20px;
}

.pdf-preview-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 8px;
    flex-wrap: wrap;
}

.pdf-control-btn {
    padding: 6px 12px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #333;
}

.pdf-control-btn:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
}

.pdf-page-info {
    font-size: 14px;
    color: #666;
    margin: 0 10px;
}

.pdf-download-btn {
    margin-left: auto;
    background-color: var(--accent-color, #0056b3);
    color: white;
    border-color: var(--accent-color, #0056b3);
}

.pdf-download-btn:hover {
    background-color: var(--secondary-color, #003d82);
    border-color: var(--secondary-color, #003d82);
    color: white;
}

.pdf-preview-container {
    background-color: #f7f7f7;
    border-radius: 10px;
    overflow: auto;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    min-height: 600px;
    max-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#pdf-canvas {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    color: #666;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdf-preview-notice {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    padding: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.pdf-preview-notice a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.pdf-preview-notice a:hover {
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .download-grid-listing {
        gap: 1rem;
    }
    
    .download-thumbnail {
        height: 150px;
    }
    
    .download-icon-placeholder {
        font-size: 40px;
    }
    
    .file-type-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .pdf-preview-container {
        min-height: 400px;
        max-height: 500px;
    }
    
    .pdf-preview-controls {
        justify-content: center;
    }
    
    .pdf-control-btn {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .pdf-download-btn {
        margin-left: 0;
        width: 100%;
        margin-top: 10px;
    }

    .download-item {
        flex-direction: column;
    }
    
    .download-actions {
        flex-direction: column;
    }
    
    .download-actions .button {
        width: 100%;
    }
    
    .download-file-item {
        flex-direction: column;
        text-align: center;
    }
    
    .download-file-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .download-file-info {
        margin-bottom: 15px;
    }
    
    .download-file-meta {
        justify-content: center;
    }
} 

