/* ============================================
   DOCUMENTS.CSS - REDESIGNED
   With Parallax Hero, Dark Cards, Smooth Animations
   ============================================
   ЗАБЕЛЕЖКА: Modal стиловете са премахнати.
   Използва се общия FilePreview.css за модала.
   ============================================ */

:root {
    --docs-dark: #141d2a;
    --docs-dark-card: #141d2a;
    --docs-primary: #8186d5;
    --docs-accent: #F5875D;
    --docs-gradient-start: #6366f1;
    --docs-gradient-end: #8b5cf6;
    --docs-text: #ffffff;
    --docs-text-muted: rgba(255, 255, 255, 0.7);
    --docs-border: rgba(129, 134, 213, 0.25);
    --docs-page-bg: #f8f9fc;
    --docs-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

/* ============================================
   PARALLAX HERO SECTION
   ============================================ */
.parallax-section-documents {
    position: relative;
    height: 55vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    color: white;
    margin-top: 0;
}

.parallax-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(20, 29, 42, 0.8) 0%, rgba(20, 29, 42, 0.7) 100%);
}

.parallax-section-documents .container {
    z-index: 2;
}

.parallax-section-documents h1 {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.parallax-section-documents .lead {
    color: rgba(255, 255, 255, 0.85);
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Stats */
.hero-stats-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 14px;
    background: rgba(20, 29, 42, 0.4);
    border: 1px solid rgba(129, 134, 213, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    min-width: 110px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-badge:hover {
    background: rgba(129, 134, 213, 0.2);
    border-color: rgba(129, 134, 213, 0.8);
    transform: translateY(-3px);
}

.stat-badge .stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--docs-primary);
    line-height: 1;
}

.stat-badge .stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ============================================
   PAGE LAYOUT
   ============================================ */
.documents-page {
    background: var(--docs-page-bg);
    padding-bottom: 20px;
}

/* ============================================
   SECTIONS - Dark Cards
   ============================================ */
.documents-section {
    background: var(--docs-dark-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--docs-shadow);
    margin-bottom: 24px;
    border: 1px solid rgba(129, 134, 213, 0.15);
}

.documents-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--docs-gradient-start), var(--docs-gradient-end));
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.section-icon i {
    color: white;
    font-size: 1.15rem;
}

.section-info {
    flex: 1;
}

.section-info h3 {
    margin: 0;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--docs-text);
}

.section-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--docs-text-muted);
}

.documents-section-count {
    background: linear-gradient(135deg, var(--docs-gradient-start), var(--docs-gradient-end));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.documents-section-body {
    padding: 26px;
}

/* ============================================
   FILES GRID - Smaller Icons, More Text Visible
   ============================================ */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
}

.file-item {
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    /* SMOOTH ANIMATION - cubic-bezier for natural feel */
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

/* NATURAL HOVER - translateY instead of scale */
.file-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.2);
}

.document-item {
    background: rgba(129, 134, 213, 0.1);
    border: 1px solid rgba(129, 134, 213, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    text-align: center;
    height: 100%;
    border-radius: 14px;
    transition: all 0.3s ease;
}

/* SMALLER ICON - 1.5rem instead of 2rem */
.document-item .file-icon {
    font-size: 1.5rem;
    color: var(--docs-accent);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

/* MORE TEXT VISIBLE - 3 lines instead of 2 */
.document-item .file-name {
    color: var(--docs-text-muted);
    font-size: 0.72rem;
    word-break: break-word;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.document-item:hover {
    background: rgba(129, 134, 213, 0.15);
    border-color: rgba(129, 134, 213, 0.35);
}

.document-item:hover .file-icon {
    color: var(--docs-primary);
    transform: scale(1.1);
}

.document-item:hover .file-name {
    color: var(--docs-text);
}

/* Image tiles */
.file-item.image-item {
    border: 2px solid transparent;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.file-item.image-item:hover {
    border-color: var(--docs-primary);
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.2);
}

.file-item.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.file-item.image-item:hover img {
    transform: scale(1.05);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.no-files-message {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--docs-text-muted);
    padding: 50px;
}

.no-files-message i {
    font-size: 2.5rem;
    color: var(--docs-primary);
    opacity: 0.5;
}

/* ============================================
   HELP SECTION
   ============================================ */
.documents-help {
    background: var(--docs-page-bg);
    padding: 0 0 4rem;
}

.help-card {
    background: var(--docs-dark);
    border-radius: 20px;
    padding: 2rem 2.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--docs-shadow);
    border: 1px solid rgba(129, 134, 213, 0.15);
}

.help-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
            radial-gradient(circle at 100% 50%, rgba(129, 134, 213, 0.12), transparent 50%),
            radial-gradient(circle at 0% 50%, rgba(99, 102, 241, 0.08), transparent 40%);
    pointer-events: none;
}

.help-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--docs-gradient-start), var(--docs-gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.help-icon i {
    color: white;
    font-size: 1.3rem;
}

.help-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.help-content h4 {
    color: var(--docs-text);
    font-weight: 700;
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}

.help-content p {
    color: var(--docs-text-muted);
    margin: 0;
    font-size: 0.92rem;
}

.help-actions {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .parallax-section-documents {
        height: 50vh;
        min-height: 350px;
        background-attachment: scroll;
    }

    .hero-stats-row {
        gap: 0.75rem;
    }

    .stat-badge {
        padding: 0.6rem 1.25rem;
        min-width: 95px;
    }

    .help-card {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem;
    }

    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .parallax-section-documents {
        height: 45vh;
        min-height: 320px;
    }

    .parallax-section-documents h1 {
        font-size: 2rem;
    }

    .documents-page {
        padding-bottom: 16px;
    }

    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 12px;
    }

    .documents-section {
        border-radius: 16px;
        margin-bottom: 20px;
    }

    .documents-section-header {
        padding: 18px 20px;
    }

    .section-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .section-info h3 {
        font-size: 1.05rem;
    }

    .section-info p {
        display: none;
    }

    .documents-section-body {
        padding: 18px 20px;
    }

    .document-item {
        padding: 12px 8px;
    }

    .document-item .file-icon {
        font-size: 1.35rem;
        margin-bottom: 8px;
    }

    .document-item .file-name {
        font-size: 0.68rem;
    }

    /* Reduced lift on mobile */
    .file-item:hover {
        transform: translateY(-4px);
    }

    .help-card {
        border-radius: 16px;
    }

    .stat-badge {
        padding: 0.5rem 1rem;
        min-width: 85px;
    }

    .stat-badge .stat-number {
        font-size: 1.4rem;
    }

    .stat-badge .stat-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 576px) {
    .parallax-section-documents {
        height: 40vh;
        min-height: 280px;
    }

    .parallax-section-documents h1 {
        font-size: 1.75rem;
    }

    .parallax-section-documents .lead {
        font-size: 0.95rem;
    }

    .hero-stats-row {
        gap: 0.5rem;
    }

    .stat-badge {
        flex: 1;
        min-width: 0;
        padding: 0.5rem 0.75rem;
    }

    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 10px;
    }

    .document-item {
        padding: 10px 6px;
        border-radius: 12px;
    }

    .document-item .file-icon {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }

    .document-item .file-name {
        font-size: 0.62rem;
        -webkit-line-clamp: 2;
    }
}

/* ============================================
   ACCENT BUTTON
   ============================================ */
.btn-accent {
    background: linear-gradient(135deg, var(--docs-gradient-start), var(--docs-gradient-end));
    border: none;
    color: white;
    border-radius: 10px;
    padding: 10px 22px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    color: white;
}