/* public/css/documents.css */
.page-documents { background: #fff; }

.documents-page {
    max-width: var(--container-lg);
    margin: 0 auto;
    padding: 1rem 2rem 4rem;
}

.documents-back {
    padding: 1rem 0;
    font-size: 0.85rem;
    color: #666;
}

.documents-back a { color: inherit; text-decoration: underline; }
.documents-back a:hover { text-decoration: none; color: #000; }

.documents-header {
    margin: 1rem 0 3rem;
    text-align: center;
}

.documents-heading {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
}

.documents-intro {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #222;
}

.documents-intro p { margin: 0 0 1em; }
.documents-intro p:last-child { margin-bottom: 0; }

.documents-empty {
    padding: 4rem 1rem;
    text-align: center;
    color: #999;
}

/* ─── List ─────────────────────────────────────────────────────────── */

.documents-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #f0f0f0;
}

.document-item {
    border-bottom: 1px solid #f0f0f0;
}

.document-link {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem 1rem;
    color: #000;
    text-decoration: none;
    transition: background 0.15s;
}

.document-link:hover {
    background: #fafafa;
}

/* ─── Icon ─────────────────────────────────────────────────────────── */

.document-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #666;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.document-link:hover .document-icon {
    background: #000;
    color: #fff;
}

/* Kind-specific accent colors — show on hover via the icon background */
.document-item-pdf     .document-link:hover .document-icon { background: #d40000; }
.document-item-doc     .document-link:hover .document-icon { background: #2b579a; }
.document-item-sheet   .document-link:hover .document-icon { background: #217346; }
.document-item-slides  .document-link:hover .document-icon { background: #d24726; }
.document-item-archive .document-link:hover .document-icon { background: #7b6c3b; }
.document-item-image   .document-link:hover .document-icon { background: #555; }
.document-item-audio   .document-link:hover .document-icon { background: #6a1b9a; }
.document-item-video   .document-link:hover .document-icon { background: #1565c0; }

/* ─── Body ─────────────────────────────────────────────────────────── */

.document-body {
    min-width: 0;
}

.document-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.25rem;
    overflow-wrap: anywhere;
}

.document-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.document-ext { font-weight: 700; }
.document-sep { opacity: 0.5; }

/* ─── Download chevron ─────────────────────────────────────────────── */

.document-download {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    transition: color 0.15s, transform 0.15s;
    flex-shrink: 0;
}

.document-link:hover .document-download {
    color: #000;
    transform: translateY(2px);
}

/* ─── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .documents-page { padding: 0.5rem 1rem 3rem; }
    .documents-heading { font-size: 1.75rem; }

    .document-link {
        grid-template-columns: 44px 1fr auto;
        gap: 1rem;
        padding: 1rem 0.5rem;
    }

    .document-icon {
        width: 44px;
        height: 44px;
    }

    .document-icon svg {
        width: 26px;
        height: 26px;
    }

    .document-title {
        font-size: 0.95rem;
    }
}