/* تنسيقات صفحة المكتبة الرقمية */

/* Hero Section */
.documents-hero {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.95), rgba(var(--secondary-rgb), 0.95)), url('../images/documents-bg.jpg');
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    margin-top: -2rem;
}

.documents-hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, var(--light), transparent);
}

.documents-hero .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

.documents-hero .breadcrumb-item a:hover {
    color: var(--light) !important;
}

.documents-hero h1 {
    color: var(--dark) !important;
    text-shadow: none;
}

.documents-hero p {
    color: var(--dark) !important;
    text-shadow: none;
}

/* Document Cards */
.document-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: var(--light);
}

.document-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.1);
}

.document-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 2.5rem 2rem;
    text-align: center;
    border: none;
    position: relative;
    overflow: hidden;
}

.document-card .card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.05)
    );
    transform: rotate(45deg);
    pointer-events: none;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% {
        transform: rotate(45deg) translateX(-100%);
    }
    100% {
        transform: rotate(45deg) translateX(100%);
    }
}

.document-icon {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.document-card:hover .document-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.document-icon i {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.document-card .card-body {
    padding: 2rem;
    text-align: center;
    background: var(--light);
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.document-card .card-body > div {
    width: 100%;
}

.document-title {
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

.document-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.document-card:hover .document-title::after {
    width: 100px;
}

.document-description {
    color: var(--secondary-text);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1rem;
}

.download-btn {
    border-radius: 50px;
    padding: 1rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: 100%;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.25);
    background: transparent;
    color: var(--primary-color);
}

.download-btn i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.download-btn:hover i {
    transform: translateY(-2px) rotate(-10deg);
}

/* Animation Classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fade-up.show {
    opacity: 1;
    transform: translateY(0);
}

/* Stats Counter */
.document-stats {
    margin-top: 10px;
    color: #666;
    font-size: 0.9rem;
}

.document-stats i {
    color: var(--primary-color);
    margin-left: 5px;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .documents-hero {
        margin-top: -1rem;
        background-attachment: scroll;
    }
    
    .document-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 767.98px) {
    .document-title {
        font-size: 1.3rem;
    }
    
    .document-description {
        font-size: 0.95rem;
    }
    
    .download-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .documents-hero {
        background: none !important;
        color: #000 !important;
    }
    
    .document-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .download-btn {
        display: none;
    }
}
