/*
* download/css/download.css
* Styles for the document downloads page - matches results style
*/

/* Downloads Page Container */
.downloads-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Document Detail Container - Use site width */
.document-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header Section - Full width banner */
.downloads-header {
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    color: #fff;
    text-align: center;
    margin-bottom: 40px;
    padding: 80px 20px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.downloads-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background-image: url('../images/dots-pattern.png');
    background-size: contain;
    opacity: 0.1;
    z-index: 1;
}

.downloads-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 250px;
    height: 250px;
    background-image: url('../images/circles-pattern.png');
    background-size: contain;
    opacity: 0.1;
    z-index: 1;
}

.downloads-header h1 {
    color: #fff;
    font-size: 42px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    font-weight: 700;
}

.downloads-header p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    line-height: 1.6;
}

/* Downloads Tabs/Filters */
.downloads-tabs {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.downloads-tab {
    padding: 10px 20px;
    background-color: #f5f5f5;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.downloads-tab:hover {
    background-color: #e0e0e0;
}

.downloads-tab.active {
    background-color: #f27935;
    color: white;
}

/* Category Sections */
.category-section {
    margin-bottom: 40px;
}

.category-title {
    border-bottom: 2px solid #f27935;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 24px;
    color: #2a5298;
}

/* Documents Grid for Cards */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    align-items: start;
}

/* Document Card styling */
.document-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.document-card-header {
    background: linear-gradient(135deg, #28a745, #f27935);
    color: white;
    padding: 15px;
    position: relative;
    overflow: hidden;
    height: 60px;
    display: flex;
    align-items: center;
}

.document-card-header h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    padding-right: 40px;
    white-space: nowrap;
    flex: 1;
    font-stretch: condensed;
    font-family: 'Arial Narrow', Arial, sans-serif;
}


.document-type-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #2a5298;
    color: white;
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 0 8px 0 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.document-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.document-thumbnail-preview {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    overflow: hidden;
}

.document-thumbnail-preview img {
    width: 100%;
    height: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.no-thumbnail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    min-height: 200px;
    width: 100%;
}

.no-thumbnail i {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.document-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    flex-direction: row;
    padding: 15px;
}

.document-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
}

.document-btn i {
    margin-right: 5px;
}

.view-btn {
    background-color: #28a745;
    color: white;
}

.view-btn:hover {
    background-color: #218838;
    color: white;
}

.download-btn {
    background-color: #f27935;
    color: white;
}

.download-btn:hover {
    background-color: #e56717;
    color: white;
}

/* Single Document View Styles */
.back-btn {
    display: inline-flex;
    align-items: center;
    margin-bottom: 20px;
    color: #f27935;
    text-decoration: none;
    font-weight: 500;
}

.back-btn i {
    margin-right: 5px;
}

.document-header {
    margin-bottom: 30px;
}

.document-header h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #2a5298;
}

.document-meta {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.document-meta-item {
    display: flex;
    align-items: center;
    color: #666;
}

.document-meta-item i {
    margin-right: 8px;
    color: #f27935;
}

.document-description {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    line-height: 1.6;
}

.document-download {
    margin: 30px 0;
    text-align: center;
}

.document-download .download-btn {
    padding: 12px 25px;
    font-size: 16px;
}

.document-thumbnail {
    margin: 30px 0;
    text-align: center;
}

.document-thumbnail img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* No documents message */
.no-documents-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.no-documents-message i {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
    opacity: 0.5;
    color: #ccc;
}

/* Go to top button */
#go-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #f27935;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

#go-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

#go-top-btn:hover {
    background-color: #e56717;
}

/* Responsive styles */
@media (max-width: 768px) {
    .downloads-header h1 {
        font-size: 32px;
    }

    .document-header h1 {
        font-size: 28px;
    }

    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .document-meta {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .downloads-tab {
        padding: 8px 12px;
        font-size: 14px;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }

    .document-card-header h3 {
        font-size: 16px;
    }

    .document-actions {
        flex-direction: column;
    }
}
