/* 1. ASTRA THEME HEADER FIX */
body:not(.home) .ast-above-header,
body:not(.home) .ast-below-header {
    display: none;
}

/* 2. MOBILE-SAFE CONTAINER: CENTER THE FOLDER ROWS */
.dlp-folders,
.dlp-folders .dlp-folder {
    list-style: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: block !important;
    text-align: center !important; 
    width: 100% !important;
}

.dlp-folders .dlp-folder {
    margin-bottom: 25px !important;
}

/* 3. ALIGN THE FOLDER LABEL TO THE LEFT EDGE OF THE CENTERED SEARCH BOX */
.dlp-folders .dlp-folder-label {
    display: flex !important;               /* Forces block-level centering capabilities */
    align-items: center !important;
    justify-content: flex-start !important; /* Snaps icon and text to the left */
    text-align: left !important;             
    width: 350px !important;                 /* MATCHES SEARCH BOX WIDTH */
    max-width: 100% !important;              
    margin: 0 auto 15px auto !important;     /* Centers the boundary box on the page */
    font-size: var(--wp--preset--font-size--medium) !important; 
    position: relative !important;
    color: #0274be !important;               /* Astra theme's standard link blue */
    cursor: pointer;
}

/* Folder Title Hover Effect */
.dlp-folders .dlp-folder-label:hover {
    color: #015a96 !important; 
    text-decoration: underline;
}

/* 4. STRIP ABSOLUTE POSITIONING TO SNAP THE ICON TO THE TEXT */
.dlp-folders .dlp-folder .dlp-icon,
.dlp-folders .dlp-folder .dlp-icon.folder,
.dlp-folders .dlp-folder .dlp-icon.folder_open,
.dlp-folders .dlp-folder .dlp-icon img,
.dlp-folders .dlp-folder .dlp-icon svg,
.dlp-folders .dlp-folder-label::before {
    position: static !important; 
    float: none !important;      
    left: auto !important;       
    top: auto !important;
    margin-right: 12px !important; 
    margin-left: 0 !important;
    vertical-align: middle !important;
}

/* 5. FORCE EXPANDED TABLES TO BE FULL-WIDTH & NEATLY LEFT-ALIGNED */
.dlp-folders .dlp-folder-content {
    text-align: left !important;   
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.dlp-folders .dlp-folder-content .dataTables_wrapper,
.dlp-folders .dlp-folder-content .posts-data-table {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;
}

.dlp-folders .posts-data-table th, 
.dlp-folders .posts-data-table td {
    text-align: left !important;
}

/* 6. CENTER AND RESIZE THE SEARCH BOX OVER CATEGORIES */
.custom-doc-search {
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 30px !important; 
}

.custom-doc-search form,
.custom-doc-search .search-form {
    float: none !important;
    display: inline-block !important;
}

.custom-doc-search input[type="search"],
.custom-doc-search input[type="text"],
.custom-doc-search .search-field {
    float: none !important;
    display: inline-block !important;
    border: 1px solid #000000 !important;
    width: 350px !important;                 /* MATCHES FOLDER LABEL WIDTH */
    max-width: 100% !important;
    padding: 10px 15px !important;
}