/* ==========================================================================
   DPO Filters — Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Filter Form
   -------------------------------------------------------------------------- */

.dpo-filter-form {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 2.5rem;

    @media screen and (max-width: 768px) {
        flex-direction: column;
    }
}

.dpo-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;

    @media screen and (max-width: 768px) {
        justify-content: space-between;
    }
}

.dpo-filter-group label {
    display: block;
    width: 100%;
}


.dpo-filter-form select {
    min-width: 250px;
    margin-right: 40px;
    font-family: "Inter", sans-serif;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

/* CPT Tabs */
.dpo-filter-cpt {
    /* display: flex; */
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .dpo-filter-cpt {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .dpo-filter-cpt::-webkit-scrollbar {
        display: none;
    }

    .dpo-cpt-tab {
        scroll-snap-align: start;
        flex-shrink: 0;
    }
}

.dpo-cpt-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 8px 16px;
    border-radius: 8px;
    background: #F5F5F5;
    color: #504F4F;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.dpo-cpt-tab.is-active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* Search */
.dpo-filter-search {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.dpo-filter-search input[type="search"] {
    width: 100%;
    padding: 8px 36px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.dpo-filter-search input[type="search"]:focus {
    border-color: #999;
}

.dpo-filter-search svg {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.filter-reset {
    align-self: flex-start;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: transparent;
    font-size: 0.9rem;
    cursor: pointer;
    color: #666;
    transition: border-color 0.2s, color 0.2s;
}

.filter-reset:hover {
    border-color: #999;
    color: #333;
}

/* --------------------------------------------------------------------------
   Explore Listing
   -------------------------------------------------------------------------- */

.dpo-explore-listing,
.dpo-latest-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin-block-start: 0!important;
}

.dpo-explore-item {
    padding: 1rem 2rem!important;
    border-left: 1px solid #e0e0e0;
    margin-block-start: 24px!important;

    @media (max-width: 1024px) {
        padding: 2rem 0!important;
        border-left: none!important;
        margin-block-start: 0!important;
    }
}

.dpo-explore-item:first-child,
.dpo-explore-item:nth-child(3n+1) {
    border-left: none;
    padding-left: 0!important;
}

@media (max-width: 1024px) {
    .dpo-explore-listing,
    .dpo-latest-posts {
        grid-template-columns: repeat(2, 1fr);
    }

    .dpo-explore-item:nth-child(3n+1) {
        border-left: 1px solid #e0e0e0;
    }

    .dpo-explore-item:nth-child(2n+1) {
        border-left: none;
    }
}

@media (max-width: 640px) {
    .dpo-explore-listing,
    .dpo-latest-posts {
        grid-template-columns: 1fr;
    }

    .dpo-explore-item {
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .dpo-explore-item:first-child {
        border-top: none;
    }
}

/* --------------------------------------------------------------------------
   Explore Item
   -------------------------------------------------------------------------- */

.dpo-explore-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.dpo-explore-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dpo-explore-type {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 4px 12px 2px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1;
}

.dpo-cpt--national-dev .dpo-explore-type {
    background: #BFF8F7;
    color: #075859;
}

.dpo-cpt--national-dev .dpo-explore-type::before {
    content: url('icons/icon-national-dev.svg');
}

.dpo-cpt--legal-case .dpo-explore-type {
    background: #FFD8DA;
    color: #8C171E;
}

    
.dpo-cpt--legal-case .dpo-explore-type::before {
    content: url('icons/icon-legal-case.svg');
}

.dpo-cpt--plat-work-directive .dpo-explore-type {
    background: #CDEBFF;
    color: #1E4C6C;
}

.dpo-cpt--plat-work-directive .dpo-explore-type::before {
    content: url('icons/icon-plat-work-directive.svg');
}

.dpo-explore-country {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #555;
    white-space: nowrap;
}

.dpo-explore-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #9D1E25;
    line-height: 28px;
    margin: 15px 0;
}

.dpo-explore-date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.785rem;
    margin-top: 0.25rem;
}

.dpo-explore-excerpt {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
}

.dpo-explore-excerpt p {
    margin: 0;
}

.dpo-explore-empty {
    color: #666;
    font-style: italic;
}

.dpo-load-more-wrap {
    text-align: center;
}

.dpo-load-more {
    display: inline-block;
    font-size: 1.5rem;
    padding: 10px 20px;
    background-color: #9D1E25;
    color: white;
    border: none;
    cursor: pointer;    
}

.dpo-explore-count {
    color: #303439;
    font-size: 0.875rem;
    margin-top: 0;
}

.dpo-active-tag {
    display: inline-block;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 22px;
    border: 1px solid #CBCBCB;
    background-color: white;
    color: #303439;
}

.dpo-active-tag__remove {
    color: #303439;
    text-decoration: none;
}