/* ============================================================
   ROOT VARIABLES
   ============================================================ */
:root {
    --bs-primary: #193A18;
    --bs-dark: #137D0F;
    --bs-light: #F5F9F0;
    --bs-body: #2C3E2C;
    --bs-secondary: #77797D;
    --bs-accent: #CEC66D;
    --bs-gray: #4B3402;
}

/* ============================================================
   BASE STYLES
   ============================================================ */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--bs-body);
    background: var(--bs-light);
    overflow-x: hidden;
    margin: 0;
}

.main-content01 {
    max-width: 95%;
    margin: 0 auto;
    padding: 2rem 2.5rem 3rem;
}

/* ============================================================
   HERO & BREADCRUMB
   ============================================================ */
.content-hero01 {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 20px 50px rgba(25, 58, 24, 0.15);
}

.content-hero01 .bg-img01 {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?w=1200');
    background-size: cover;
    background-position: top center;
    transform: scale(1.02);
    transition: transform 1.2s ease;
    z-index: 1;
}

.content-hero01:hover .bg-img01 {
    transform: scale(1.08);
}

.content-hero01::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(25, 58, 24, 0.85);
    z-index: 2;
}

.content-hero01 .hero-inner01 {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #fff;
    padding: 2rem;
}

.content-hero01 h1 {
    font-size: 2.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.breadcrumb-custom01 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.breadcrumb-custom01 .home-link01 {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-custom01 .home-link01:hover {
    color: var(--bs-accent);
}

.breadcrumb-custom01 .separator01 {
    color: #fff;
    opacity: 0.8;
    margin: 0 0.2rem;
}

.breadcrumb-custom01 .current-page01 {
    color: #45c467;
    font-weight: 600;
}

/* ============================================================
   DOCUMENTS UI & SEARCH
   ============================================================ */
.doc-search-wrapper01 {
    position: relative;
    margin-bottom: 1.5rem;
}

.doc-search-wrapper01 i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary);
    font-size: 1.1rem;
}

.doc-search01 {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 3rem;
    border-radius: 50px;
    border: 1px solid rgba(25, 58, 24, 0.15);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.doc-search01:focus {
    border-color: var(--bs-dark);
    box-shadow: 0 0 0 3px rgba(19, 125, 15, 0.1);
}

/* ============================================================
   FILTER BUTTONS
   ============================================================ */
.doc-filters01 {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.doc-filter-btn01 {
    background: transparent;
    border: 1px solid rgba(25, 58, 24, 0.15);
    color: var(--bs-body);
    padding: 0.4rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.doc-filter-btn01:hover {
    background: rgba(25, 58, 24, 0.05);
}

.doc-filter-btn01.active {
    background: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}

/* ============================================================
   DATA TABLE
   ============================================================ */

/* ============================================================
   DATA TABLE
   ============================================================ */

.doc-table-container01 {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(25, 58, 24, 0.05);
    border: 1px solid rgba(25, 58, 24, 0.08);

    width: 100%;
    max-width: 100%;

    /* Keep the table inside its container; scroll on narrow screens */
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

/* ============================================================
   TABLE STRUCTURE
   ============================================================ */

.doc-table01 {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    table-layout: fixed;
}

/* ============================================================
   TABLE COLUMN WIDTHS
   Total: 100%
   ============================================================ */

.doc-table01 th:nth-child(1),
.doc-table01 td:nth-child(1) {
    width: 8%;
}

.doc-table01 th:nth-child(2),
.doc-table01 td:nth-child(2) {
    width: 45%;
}

.doc-table01 th:nth-child(3),
.doc-table01 td:nth-child(3) {
    width: 15%;
}

.doc-table01 th:nth-child(4),
.doc-table01 td:nth-child(4) {
    width: 15%;
}

.doc-table01 th:nth-child(5),
.doc-table01 td:nth-child(5) {
    width: 17%;
}

.doc-table01 th:nth-child(2),
.doc-table01 td:nth-child(2),
.doc-table01 td:nth-child(2) *,
.doc-table01 td.doc-desc01,
.doc-table01 td.doc-desc01 * {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    min-width: 0;
    max-width: 100%;
}



/* ============================================================
   TABLE HEADINGS
   ============================================================ */

.doc-table01 th {
    background: #f8faf7;
    color: var(--bs-primary);
    font-weight: 700;
    text-align: left;
    padding: 1rem 0.85rem;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--bs-accent);

    white-space: normal;
    overflow-wrap: break-word;
    vertical-align: middle;
    box-sizing: border-box;
}

.doc-table01 th i {
    font-size: 0.8rem;
    margin-left: 0.3rem;
    opacity: 0.5;
    cursor: pointer;
}

/* ============================================================
   TABLE CELLS
   ============================================================ */

.doc-table01 td {
    padding: 1rem 0.85rem;
    border-bottom: 1px solid rgba(25, 58, 24, 0.06);
    vertical-align: middle;
    font-size: 0.9rem;
    box-sizing: border-box;

    /* Wrap long words, descriptions and filenames */
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.doc-table01 tbody tr:last-child td {
    border-bottom: none;
}

.doc-table01 tbody tr:hover {
    background: var(--bs-light);
}

/* ============================================================
   TABLE CONTENT
   ============================================================ */

.doc-year01 {
    display: inline-block;
    font-weight: 700;
    color: var(--bs-primary);
}

.doc-desc01 {
    color: var(--bs-body);
    font-weight: 500;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Apply this class to the filename element if filenames are displayed */
.doc-file-name01,
.doc-table01 td .file-name01,
.doc-table01 td .filename01 {
    display: block;
    max-width: 100%;
    min-width: 0;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
}

/* Also wrap filename links, but leave View/Download buttons unchanged */
.doc-table01 td a:not(.doc-action-btn01) {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.doc-date01 {
    color: var(--bs-secondary);
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ============================================================
   FILE ACTION BUTTONS
   ============================================================ */

.doc-actions01 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    max-width: 100%;
    min-width: 0;
}

.doc-action-btn01 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    max-width: 100%;
    white-space: nowrap;
    box-sizing: border-box;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

/* ============================================================
   ACTION BUTTON COLOURS
   ============================================================ */

.doc-action-btn01.view01 {
    color: var(--bs-accent);
}

.doc-action-btn01.view01:hover {
    color: var(--bs-gray);
}

.doc-action-btn01.download01 {
    color: var(--bs-primary);
}

.doc-action-btn01.download01:hover {
    color: var(--bs-dark);
}

/* ============================================================
   TABLE RESPONSIVENESS
   ============================================================ */

@media screen and (max-width: 991.98px) {
    .doc-table-container01 {
        overflow-x: auto;
    }

    .doc-table01 {
        min-width: 850px;
    }

    .doc-table01 th,
    .doc-table01 td {
        padding: 0.85rem 0.7rem;
        font-size: 0.85rem;
    }

    .doc-actions01 {
        flex-direction: column;
        align-items: flex-start;
    }

    .doc-action-btn01 {
        font-size: 0.8rem;
        padding: 6px 9px;
    }
}

/* ============================================================
   END DATA TABLE
   ============================================================ */


/* ============================================================
   PAGINATION FOOTER
   ============================================================ */
.doc-footer01 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #f8faf7;
    border-top: 1px solid rgba(25, 58, 24, 0.06);
    flex-wrap: wrap;
    gap: 1rem;
}

.doc-showing01 {
    color: var(--bs-secondary);
    font-size: 0.9rem;
}

.doc-pagination01 {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.page-btn01 {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    border: 1px solid rgba(25, 58, 24, 0.15);
    border-radius: 6px;
    background: #fff;
    color: var(--bs-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.page-btn01:hover {
    background: var(--bs-light);
    border-color: var(--bs-dark);
}

.page-btn01.active {
    background: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}

.page-btn01.nav-arrow01 {
    color: var(--bs-secondary);
}



/* ============================================================
   SORTABLE HEADER STYLES
   ============================================================ */
.doc-table01 th.sortable-header01 {
    position: relative;
    padding-right: 2rem;
}

.doc-table01 th.sortable-header01:hover {
    background: #eef3ef;
}

.doc-table01 th.no-sort01 {
    cursor: default;
}

.sort-arrows01 {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    flex-direction: column;
    line-height: 0.6;
    gap: 1px;
}

.sort-arrow-up01,
.sort-arrow-down01 {
    font-size: 0.75rem;
    color: #c2c9c5;
    transition: color 0.15s ease;
}

.sort-arrow-up01.active-sort01,
.sort-arrow-down01.active-sort01 {
    color: var(--bs-dark, #137D0F);
}

.doc-table01 th.sortable-header01:hover .sort-arrow-up01:not(.active-sort01),
.doc-table01 th.sortable-header01:hover .sort-arrow-down01:not(.active-sort01) {
    color: #9aa39e;
}




/*
 * Two-column layout: sidebar + content.
 * Only kicks in when the view renders .doc-sidebar01.
 * When there is no sidebar (e.g. Vacancies), .doc-content01
 * simply spans the full width — visual output is unchanged.
 */
.doc-layout01 {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    width: 100%;
}

/* When there is NO sidebar in the DOM (e.g. Vacancies), use one full-width column */
.doc-layout01:not(:has(.doc-sidebar01)) {
    grid-template-columns: 1fr;
}

/* Fallback for older browsers without :has() support */
@supports not selector(:has(*)) {
    .doc-layout01 {
        display: block;
    }
}


.doc-content01 {
    min-width: 0; /* prevents overflow of table inside grid */
}

/* On narrow screens, stack sidebar above content */
@media (max-width: 900px) {
    .doc-layout01 {
        grid-template-columns: 1fr;
    }
}

/* ---------- Sidebar ---------- */

.doc-sidebar01 {
    width: 260px;
      box-sizing: border-box;
    flex-shrink: 0;
    padding: 0;
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    z-index: 1;
    background: transparent;
    border: none;
    border-radius: 0;
}

.doc-sidebar01::-webkit-scrollbar { width: 4px; }
.doc-sidebar01::-webkit-scrollbar-thumb {
    background: rgba(25,58,24,0.15);
    border-radius: 4px;
}

.doc-sidebar-title01 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: var(--bs-dark, #1e293b);
    padding-left: 0.25rem;
}

.doc-sidebar-list01 {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.doc-sidebar-item01 {
    margin: 0;
}

.doc-sidebar-item01 a {
    display: flex;
    align-items: center;
    justify-content: left;
    padding: 0.85rem 1.2rem;
    border-radius: 8px;
    background: var(--bs-muted);
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: none;
    cursor: pointer;
    text-align: left;
}

.doc-sidebar-item01 a:hover {
    background: var(--bs-primary);
    color: var(--bs-accent);
    transform: translateX(4px);
    box-shadow: 0 6px 18px rgba(25,58,24,0.25);
}

.doc-sidebar-item01.is-active a {
    background: var(--bs-dark);
    color: #fff;
    /* box-shadow: 0 6px 20px rgba(19,125,15,0.4); */
    transform: translateX(4px);
}


/* =========================================
   DOCUMENTS TABLE - COLUMN DISTRIBUTION
========================================= */

.doc-table-container06 {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.doc-table06 {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

/* DESCRIPTION - 60% */
.doc-table06 th:nth-child(1),
.doc-table06 td:nth-child(1) {
    width: 60%;
}

/* TYPE - 20% */
.doc-table06 th:nth-child(2),
.doc-table06 td:nth-child(2) {
    width: 20%;
}

/* FILE - 20% */
.doc-table06 th:nth-child(3),
.doc-table06 td:nth-child(3) {
    width: 20%;
}

/* =========================================
   DESCRIPTION TEXT WRAPPING
========================================= */

.doc-table06 td.doc-desc06 {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    min-width: 0;
    max-width: 60%;
    line-height: 1.6;
}

.doc-table06 td.doc-desc06 * {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    max-width: 100%;
}

/* =========================================
   TYPE TEXT WRAPPING
========================================= */

.doc-table06 td.doc-type06 {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    min-width: 0;
}

/* =========================================
   FILE ACTION BUTTONS
========================================= */

.doc-table06 td:nth-child(3) {
    overflow-wrap: anywhere;
    min-width: 0;
}

.doc-actions06 {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    max-width: 100%;
}

.doc-action-btn06 {
    white-space: nowrap;
    max-width: 100%;
}

/* =========================================
   RESPONSIVE TABLE
========================================= */

@media (max-width: 768px) {
    .doc-table-container06 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .doc-table06 {
        min-width: 650px;
    }
}


/* =====================================
   CATEGORY DOCUMENT SORT ARROWS
===================================== */

.sort-arrows-category06 {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 8px;
    gap: 3px;
    line-height: 1;
}

.sort-arrows-category06 i {
    display: block;
    font-size: 11px;
    line-height: 1;
}