.doc-section { padding: 80px 0; }

.doc-list {
    max-width: 1000px;
    margin: 40px auto 0;
}

/* ---------- heading row (desktop) ---------- */
.doc-head {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    background: #16332d;
    color: #fff;
    border-radius: 10px 10px 0 0;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.doc-head-sl      { width: 70px; flex-shrink: 0; }
.doc-head-name    { flex: 1; }
.doc-head-actions { text-align: right; }

/* ---------- rows ---------- */
.doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 24px;
    background: #fff;
    border-bottom: 1px solid #eee;
    transition: background .25s ease;
}
.doc-row:last-child {
    border-bottom: 0;
    border-radius: 0 0 10px 10px;
}
.doc-row:hover { background: #fafafa; }

.doc-list {
    box-shadow: 0 10px 40px rgba(0, 0, 0, .08);
    border-radius: 10px;
}

/* LEFT side */
.doc-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.doc-sl {
    width: 70px;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 18px;
    color: #16332d;
}
.doc-icon {
    font-size: 26px;
    color: #df5c19;
    margin-right: 14px;
    flex-shrink: 0;
}
.doc-name {
    margin: 0;
    font-size: 19px;
    line-height: 1.3;
    word-break: break-word;
}

/* RIGHT side */
.doc-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.doc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    /* border: 2px solid var(--theme-color, #c8102e); */
    border: 2px solid #f0793c;
    border-radius: 6px;
    background: var(--theme-color, #c8102e);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: all .3s ease;
}
.doc-btn:hover { opacity: .88; color: #fff; text-decoration: none; }

.doc-btn-preview  { background: var(--theme-color, #f0793c); }
/* .doc-btn-outline  { background: transparent; color: var(--theme-color, #c8102e); } */
.doc-btn-outline {
    background: #f8f9fa;
    color: #b64c16;
}
.doc-btn-outline:hover { background: var(--theme-color, #c8102e); color: #fff; opacity: 1; }
.doc-btn-download {
    background: #16332d;
    border-color: #16332d;
}
/* .doc-btn-download { background: #222; border-color: #222; } */

/* ---------- preview modal ---------- */
.doc-modal {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, .78);
    padding: 20px;
    align-items: center;
    justify-content: center;
}
.doc-modal.show { display: flex; }

.doc-modal-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1000px;
    height: 100%;
    max-height: 92vh;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}
.doc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #eee;
}
.doc-modal-head h4 { margin: 0; font-size: 18px; }
.doc-modal-actions { display: flex; align-items: center; gap: 10px; }
.doc-modal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #eee;
    color: #222;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.doc-modal-close:hover { background: var(--theme-color, #c8102e); color: #fff; }
.doc-modal iframe {
    flex: 1;
    width: 100%;
    border: 0;
    background: #f3f3f3;
}

/* ---------- tablet ---------- */
@media (max-width: 991px) {
    .doc-btn span { font-size: 13px; }
    .doc-btn { padding: 9px 12px; }
}

/* ---------- mobile ---------- */
@media (max-width: 767px) {
    .doc-section { padding: 50px 0; }
    .doc-list { margin-top: 25px; }

    .doc-head { display: none; }

    .doc-row {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px;
    }
    .doc-row:first-of-type { border-radius: 10px 10px 0 0; }

    .doc-sl {
        width: 34px;
        height: 34px;
        line-height: 34px;
        margin-right: 12px;
        border-radius: 50%;
        /* background: var(--theme-color, #c8102e); */
        background: #16332d;
        color: #fff;
        font-size: 15px;
        text-align: center;
    }
    .doc-icon { font-size: 22px; margin-right: 10px; }
    .doc-name { font-size: 17px; }

    /* Preview + Open in new tab side by side, Download full width */
    .doc-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }
    .doc-btn { padding: 11px 8px; font-size: 13px; }
    .doc-btn-download { grid-column: 1 / -1; }

    /* modal on phones (only reached if a tablet passes the inline check) */
    .doc-modal { padding: 0; }
    .doc-modal-box { max-height: 100%; border-radius: 0; }
    .doc-modal-head { flex-wrap: wrap; }
    .doc-modal-actions .doc-btn span { display: none; }
}

@media (max-width: 380px) {
    .doc-actions { grid-template-columns: 1fr; }
}