/* PDF Showcase - Frontend Styles */

:root {
    --pdf-primary-color: #0073aa;
    --pdf-secondary-color: #005177;
    --pdf-gradient-start: #667eea;
    --pdf-gradient-end: #764ba2;
    --pdf-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --pdf-shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.2);
    --pdf-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Grid Container */
.pdf-showcase-grid {
    display: grid;
    gap: 30px;
    padding: 0;
}

/* Category Grouping */
.pdf-category-title {
    font-size: 24px;
    font-weight: 800;
    color: #011d49;
    margin: 60px 0 30px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
    display: block;
    width: 100%;
    clear: both;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.pdf-category-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 4px;
    background: #0f5026;
    border-radius: 2px;
}

.pdf-showcase-columns-1 {
    grid-template-columns: 1fr;
}

.pdf-showcase-columns-2 {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.pdf-showcase-columns-3 {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.pdf-showcase-columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Base Card Styles */
.pdf-showcase-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--pdf-shadow);
    transition: var(--pdf-transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pdf-showcase-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--pdf-shadow-hover);
}

/* Thumbnail Styles */
.pdf-card-thumbnail {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pdf-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--pdf-transition);
}

.pdf-showcase-card:hover .pdf-card-thumbnail img {
    transform: scale(1.1);
}

.pdf-card-no-thumbnail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--pdf-transition);
}

.pdf-showcase-card:hover .pdf-card-overlay {
    opacity: 1;
}

.pdf-card-no-thumbnail .pdf-card-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

.pdf-icon {
    font-size: 64px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-file-icon-img {
    width: 80px;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
    transition: var(--pdf-transition);
}

.pdf-showcase-card:hover .pdf-file-icon-img {
    transform: scale(1.1) rotate(-2deg);
}

/* Card Content */
.pdf-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pdf-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 115, 170, 0.1);
    color: var(--pdf-primary-color);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.8px;
    width: fit-content;
    align-self: flex-start;
}

.pdf-card-title {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.pdf-card-excerpt {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    flex: 1;
}

/* Card Actions */
.pdf-card-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.pdf-card-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--pdf-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pdf-card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    text-decoration: none;
}

.pdf-card-button:active {
    transform: translateY(0);
}

.pdf-btn-icon {
    font-size: 16px;
}

/* Modern Card Style */
.pdf-showcase-card-modern {
    border: 1px solid #e5e5e5;
}

.pdf-showcase-card-modern .pdf-card-thumbnail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Classic Card Style */
.pdf-showcase-card-classic {
    border: 2px solid #ddd;
    border-radius: 8px;
}

.pdf-showcase-card-classic .pdf-card-thumbnail {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    border-radius: 0;
}

.pdf-showcase-card-classic:hover {
    border-color: #0073aa;
}

/* Minimal Card Style */
.pdf-showcase-card-minimal {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.pdf-showcase-card-minimal .pdf-card-thumbnail {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
}

.pdf-showcase-card-minimal:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Gradient Card Style */
.pdf-showcase-card-gradient {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: none;
}

.pdf-showcase-card-gradient .pdf-card-thumbnail {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.pdf-showcase-card-gradient .pdf-card-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 16px 16px;
}

/* Navy Forest (Premium) Style */
.pdf-showcase-card-navy_forest {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(1, 29, 73, 0.12);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.pdf-showcase-card-navy_forest .pdf-card-thumbnail {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: inset 0 0 60px rgba(1, 29, 73, 0.05);
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid #f1f5f9;
}

.pdf-showcase-card-navy_forest .pdf-card-thumbnail::after {
    display: none;
}

.pdf-showcase-card-navy_forest .pdf-card-overlay {
    background: rgba(255, 255, 255, 0.2);
}

.pdf-showcase-card-navy_forest .pdf-card-title {
    color: #011d49;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.pdf-showcase-card-navy_forest .pdf-card-excerpt {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 24px;
}

.pdf-showcase-card-navy_forest .pdf-card-content {
    background: #ffffff;
    padding: 30px 24px 24px;
    border-radius: 0 0 20px 20px;
    border-top: none;
}

.pdf-showcase-card-navy_forest .pdf-card-category {
    background: #011d49;
    color: #ffffff;
    border-radius: 6px;
    font-size: 10px;
    padding: 4px 10px;
}

.pdf-showcase-card-navy_forest .pdf-card-button {
    border-radius: 12px;
    padding: 14px 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.pdf-showcase-card-navy_forest .pdf-download-btn {
    background: #011d49 !important;
    box-shadow: 0 8px 20px rgba(1, 29, 73, 0.2);
}

.pdf-showcase-card-navy_forest .pdf-preview-btn {
    background: #0f5026 !important;
    box-shadow: 0 8px 20px rgba(15, 80, 38, 0.2);
}

.pdf-showcase-card-navy_forest:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 80px rgba(1, 29, 73, 0.22);
    border-color: #011d49;
}

.pdf-showcase-card-navy_forest:hover .pdf-file-icon-img {
    transform: scale(1.1) rotate(0deg);
}

/* PDF Preview Modal */
.pdf-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.pdf-preview-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-preview-content {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.pdf-preview-header {
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.pdf-preview-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1a1a1a;
}

.pdf-preview-close {
    background: #ff4444;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    transition: var(--pdf-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-preview-close:hover {
    background: #cc0000;
    transform: rotate(90deg);
}

.pdf-preview-iframe {
    flex: 1;
    border: none;
    border-radius: 0 0 12px 12px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .pdf-showcase-grid {
        gap: 20px;
    }

    .pdf-showcase-columns-2,
    .pdf-showcase-columns-3,
    .pdf-showcase-columns-4 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .pdf-card-actions {
        flex-direction: column;
    }

    .pdf-card-button {
        width: 100%;
    }

    .pdf-preview-content {
        width: 95%;
        height: 85vh;
    }
}

@media (max-width: 480px) {
    .pdf-showcase-grid {
        padding: 0 15px;
        gap: 15px;
    }

    .pdf-card-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .pdf-card-thumbnail {
        height: 140px;
    }

    .pdf-card-content {
        padding: 15px !important;
    }

    .pdf-card-button {
        padding: 10px 15px;
        font-size: 14px;
    }

    .pdf-preview-btn {
        display: none !important;
    }

    .pdf-icon {
        font-size: 32px;
    }
}

/* Loading State */
.pdf-showcase-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.pdf-showcase-loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--pdf-primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.pdf-card-button:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

.pdf-preview-close:focus {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .pdf-showcase-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .pdf-card-button {
        display: none;
    }
}