/* ===== Official documents page (/documents) ===== */
.docs-section {
    padding: 80px 0 90px;
    background: linear-gradient(180deg, #fbf8f5 0%, #f5efe9 100%);
}

/* ── Intro strip ── */
.docs-intro {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 26px;
    margin-bottom: 36px;
    background: var(--bg-card, #fff);
    border: 1px solid rgba(93, 72, 58, 0.12);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(71, 4, 25, 0.06);
}

.docs-intro__icon {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: #fff;
    font-size: 22px;
}

.docs-intro h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 4px;
}

.docs-intro p {
    margin: 0;
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.7;
}

.docs-intro__count {
    margin-inline-start: auto;
    flex-shrink: 0;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(119, 0, 27, 0.08);
    border: 1px solid rgba(119, 0, 27, 0.15);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 14px;
}

/* ── Cards ── */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.doc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--bg-card, #fff);
    border: 1px solid rgba(93, 72, 58, 0.12);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(71, 4, 25, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.doc-card::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-light), var(--therd-color-light));
}

.doc-card:hover {
    transform: translateY(-4px);
    border-color: rgba(119, 0, 27, 0.25);
    box-shadow: 0 18px 40px rgba(71, 4, 25, 0.12);
}

.doc-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.doc-card__icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(119, 0, 27, 0.08);
    color: var(--primary-color);
    font-size: 22px;
}

.doc-card__type {
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(93, 72, 58, 0.08);
    color: var(--therd-color);
    font-size: 12px;
    font-weight: 700;
}

.doc-card__title {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.5;
    margin: 0 0 8px;
}

.doc-card__desc {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
    margin: 0 0 14px;
}

.doc-card__meta {
    display: grid;
    gap: 8px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(93, 72, 58, 0.05);
}

.doc-card__meta div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.doc-card__meta dt {
    color: var(--text-light);
    font-weight: 500;
}

.doc-card__meta dd {
    margin: 0;
    color: var(--text-color);
    font-weight: 700;
    text-align: end;
}

.doc-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px dashed rgba(93, 72, 58, 0.2);
}

.doc-card__file {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.doc-card__file i { color: var(--primary-color); font-size: 16px; }

.doc-card__actions {
    display: flex;
    gap: 8px;
}

.doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.doc-btn--ghost {
    color: var(--primary-color);
    border: 1px solid rgba(119, 0, 27, 0.25);
    background: transparent;
}

.doc-btn--ghost:hover { background: rgba(119, 0, 27, 0.06); color: var(--primary-color); }

.doc-btn--solid {
    color: #fff;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    box-shadow: 0 6px 16px rgba(119, 0, 27, 0.2);
}

.doc-btn--solid:hover { background: var(--primary-dark); color: #fff; }

/* ── Empty state and help ── */
.docs-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.docs-empty i {
    font-size: 48px;
    color: var(--therd-color-light);
    margin-bottom: 14px;
}

.docs-help {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 44px;
    text-align: center;
}

.docs-help p {
    margin: 0;
    color: var(--text-light);
    font-size: 16px;
}

.docs-help p i { color: var(--primary-color); margin-inline-end: 4px; }

/* ── Dark mode ── */
[data-theme="dark"] .docs-section { background: transparent; }

[data-theme="dark"] .docs-intro,
[data-theme="dark"] .doc-card { border-color: var(--border-color); }

[data-theme="dark"] .doc-card__icon { background: rgba(255, 255, 255, 0.08); color: var(--therd-color-light); }
[data-theme="dark"] .doc-card__type { background: rgba(255, 255, 255, 0.08); color: var(--text-light); }
[data-theme="dark"] .doc-card__meta { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .doc-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
[data-theme="dark"] .docs-intro__count { color: #fff; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.15); }

/* ── Phones ── */
@media (max-width: 600px) {
    .docs-section { padding: 50px 0 60px; }

    .docs-intro {
        flex-wrap: wrap;
        padding: 18px;
    }

    .docs-intro__count { margin-inline-start: 0; }

    .docs-grid { grid-template-columns: 1fr; gap: 18px; }

    .doc-card { padding: 20px; }

    .doc-card__actions { width: 100%; }
    .doc-card__actions .doc-btn { flex: 1; justify-content: center; }
}
