/* ── Search bar (lives in sidebar) ─────────────── */
.resource-search-wrapper {
    width: 100%;
    position: relative;
}

.resource-search-wrapper::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238D9396' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath stroke-linecap='round' d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

#resource-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px 10px 36px;
    font-family: Jost;
    font-size: 15px;
    font-weight: 400;
    color: #242424;
    background: #f7f7f7;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

#resource-search-input::placeholder {
    color: #8D9396;
}

#resource-search-input:focus {
    border-color: #87d2d2;
    background: #fff;
}

/* ── Search highlight ───────────────────────────── */
mark.search-highlight {
    background: rgba(135, 210, 210, 0.25);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

/* ────────────────────────────────────────────────── */
/* Everything below is unchanged from the original   */
/* ────────────────────────────────────────────────── */

.product-category-dropdown summary {
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 0px;
    list-style: none;
    position: relative;
    padding-left: 20px;
}

summary.product-filter-name {
    padding: 0;
    background: transparent;
    color: #242424;
    border-radius: unset;
    text-transform: capitalize;
    font-size: 18px;
    line-height: 25.2px;
    font-family: 'Jost';
    font-weight: 400;
    letter-spacing: 0;
    margin-right: 1.25rem;
    cursor: pointer;
    display: inline-block;
}

details.product-category-dropdown.e-con-inner {
    flex-direction: column;
}

.product-category-dropdown-filter {
    background-color: #fff;
    padding: 20px 0;
}

.resource-category-filter-wrapper {
    background-color: #f7f7f7;
    padding-bottom: 80px;
}

/* checkboxes */
.custom-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 30px;
    font-size: 16px;
    cursor: pointer;
    color: #8D9396;
    text-align: center;
    font-family: Jost;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    padding-top: 5px;
}

.custom-checkbox input {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    height: 0;
    width: 0;
}

.custom-checkbox .checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1px solid #8D9396;
    border-radius: 0;
    transition: all 0.2s ease;
}

.custom-checkbox input:checked+.checkmark {
    border-color: rgba(135, 210, 210, 1);
    background-image: url('../images/on.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
}

.product-category-dropdown summary::-webkit-details-marker {
    display: none;
}

.product-category-dropdown summary::after {
    content: " ";
    position: absolute;
    margin-left: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
    background-image: url('/wp-content/uploads/2025/05/collapse-arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

.product-category-dropdown[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.product-category-checkboxes {
    margin-top: 20px;
    width: 20%;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid transparent;
    padding: 10px;
    border-radius: 0;
    position: fixed;
    background: #fff;
    z-index: 4;
}

.resource-description {
    font-family: Jost;
    font-size: 22px;
    font-weight: 400;
    line-height: 30.8px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    color: #19181899;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Sidebar + list layout ──────────────────────── */
.resource-category-filter-wrapper .e-con-inner {
    display: flex;
    flex-direction: row;
    gap: 80px;
    align-items: flex-start;
}

.resource-category-type-filter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding: 40px 32px;
    border: none;
    border-right: 1px solid rgba(0,0,0,0.08);
    background: #fff;
    height: fit-content;
    margin-top: 100px;
    width: 22%;
    position: sticky;
    top: 0;
    align-self: flex-start;
}

.resource-list-wrapper {
    width: 80%;
}

/* ── Filter labels ──────────────────────────────── */
.resource-category-filter-list,
.resource-type-filter-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 20px;
}

.resource-category-filter-list label,
.resource-type-filter-list label {
    border-bottom: 1px solid rgba(135, 203, 203, 0.25);
    padding-bottom: 14px;
    padding-top: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resource-category-filter-list label:first-child,
.resource-type-filter-list label:first-child {
    padding-top: 0;
}

.resource-category-filter-list label:last-child,
.resource-type-filter-list label:last-child {
    border-bottom: none;
}

input.resource-category-checkbox,
input.resource-type-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.resource-category-filter hr,
.resource-type-filter hr {
    height: 1px;
    width: 37px;
    position: relative;
    top: 10px;
    background: rgba(36, 36, 36, 1);
    margin-bottom: 20px;
}

.resource-category-filter-list label span,
.resource-type-filter label span {
    color: #333;
    text-decoration: none;
    font-size: 17px !important;
    line-height: 1.5;
    font-weight: 400;
    font-family: Jost;
    padding: 0;
    background: none;
    border: none;
    letter-spacing: 0;
    text-transform: capitalize;
    transition: color 0.2s ease;
}

.resource-category-filter-list label:hover span,
.resource-type-filter-list label:hover span {
    color: #87d2d2;
}

input.resource-category-checkbox:checked + span,
input.resource-type-checkbox:checked + span {
    color: #87d2d2;
    font-weight: 500;
}

/* ── Filter headings ────────────────────────────── */
.resource-category-filter strong,
.resource-type-filter strong {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    font-family: Jost;
    color: #111;
    cursor: pointer;
    margin-bottom: 4px;
    letter-spacing: 0;
    text-transform: none;
}

/* ── Resource grid ──────────────────────────────── */
#selected-resources-list {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    position: relative;
    margin-top: 50px;
    margin-left: -40px;
}

#selected-resources-list li:nth-child(3n+1),
#selected-resources-list li:nth-child(3n+2) {
    border-right: 1px solid rgba(0,0,0,0.07);
}

#selected-resources-list li {
    list-style: none;
    padding: 48px 60px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    transition: background 0.25s ease;
}

#selected-resources-list li:hover {
    background: rgba(135, 210, 210, 0.04);
}

/* ── Resource card ──────────────────────────────── */
.resource-list-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 20px;
}

.resource-title-desc-container strong {
    font-weight: 400;
    display: block;
}

/* ── Resource title links ───────────────────────── */
.resource-title {
    font-family: Jost;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.45;
    color: #111;
    display: inline;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    letter-spacing: 0;
}

.resource-title:hover {
    color: #87d2d2;
    border-bottom-color: #87d2d2;
}

/* ── Category tags ──────────────────────────────── */
.resource-categories {
    font-family: Jost;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: rgba(25, 24, 24, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.25rem;
    margin-top: 0.75rem;
}

.resource-categories p {
    margin: 0;
}

/* ── Download button ────────────────────────────── */
.resource-download-button.palmer-button a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: Jost;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: none;
    color: #111;
    text-decoration: none;
    padding-bottom: 3px;
    border-bottom: 1px solid #111;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.resource-download-button.palmer-button a:hover {
    color: #87d2d2;
    border-bottom-color: #87d2d2;
}

/* ── Summary / results count ────────────────────── */
#resource-summary {
    margin-top: 32px;
    color: rgba(0,0,0,0.45);
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
    font-family: Jost;
    letter-spacing: 0;
}

/* ── Pagination ─────────────────────────────────── */
#pagination-controls {
    margin-top: 40px;
    padding-top: 60px;
    border-top: 1px solid rgba(0,0,0,0.07);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

#pagination-controls button {
    padding: 10px 20px !important;
    background: transparent;
    color: #111;
    border: 1px solid rgba(0,0,0,0.2);
    font-size: 15px;
    font-family: Jost;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

#pagination-controls button:hover:not(.active) {
    border-color: #87d2d2;
    color: #87d2d2;
}

#pagination-controls button.active {
    background: #87d2d2;
    border-color: #87d2d2;
    color: #fff;
}

.page-numbers.dots {
    color: rgba(0,0,0,0.35);
    font-size: 15px;
    padding: 0 4px;
}

/* ── Category-specific overrides ────────────────── */
.resource-filter-container.category-87 .child-categories,
.resource-filter-container.category-88 .child-categories,
.resource-filter-container.category-89 .product-list {
    margin-left: 0 !important;
}

.resource-filter-container.category-87 .parent-category label:has(.parent-checkbox),
.resource-filter-container.category-88 .parent-category label:has(.parent-checkbox),
.resource-filter-container.category-89 .parent-category label:has(.parent-checkbox) {
    display: none;
}

details.product-category-dropdown {
    height: 50px;
}

.resource-category-filter-list.hidden,
.resource-type-filter-list.hidden {
    display: none;
}

.toggle-icon {
    display: none;
}

/* ── Mobile ─────────────────────────────────────── */
@media (max-width: 769px) {
    .product-category-checkboxes {
        width: 70%;
    }

    #selected-resources-list {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-top: 95px;
        margin-left: 0;
    }

    #selected-resources-list li {
        padding: 36px 0;
        border-right: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .resource-category-filter-wrapper .e-con-inner {
        flex-direction: column;
        gap: 0;
    }

    .resource-category-filter strong,
    .resource-type-filter strong {
        font-size: 16px;
        margin-bottom: 10px;
    }

     .resource-category-type-filter-wrapper {
        gap: 0;
        padding: 0;
        margin-top: 0;
        position: static;
        height: auto;
        z-index: 1;
        border-right: none;
        border: none;
        border-bottom: 1px solid rgba(0,0,0,0.08);
        box-shadow: none;
        width: 100%;
        background: #fff;
    }

    .resource-category-filter,
    .resource-type-filter {
        border-top: 1px solid rgba(0,0,0,0.08);
        padding: 16px 0;
    }

    .resource-category-filter-list label,
    .resource-type-filter-list label {
        padding-left: 8px;
    }
        
    .resource-category-filter-list label span,
    .resource-type-filter label span {
        font-size: 15px !important;
    }

    .resource-list-wrapper {
        width: 100%;
    }

    .toggle-icon {
        display: block;
    }

    .resource-category-filter strong,
    .resource-type-filter strong {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #resource-summary {
        margin-top: 75px;
    }

    .resource-category-filter-list label,
    .resource-type-filter-list label {
        padding-bottom: 10px;
        padding-top: 10px;
    }

    .resource-category-filter-list,
    .resource-type-filter-list {
        padding-top: 0;
    }
}

/* ── Tablet ─────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1300px) {
    .toggle-icon {
        display: block;
    }

    .resource-category-type-filter-wrapper {
        width: 30%;
        position: relative;
        top: auto;
    }

    .product-category-checkboxes {
        width: 35%;
    }

    .resource-category-filter-wrapper .e-con-inner {
        gap: 50px;
    }

    #selected-resources-list {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-left: 0;
        margin-top: 0;
    }

    #selected-resources-list li {
        border-right: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 36px;
        padding-bottom: 36px;
    }

    .resource-category-filter strong,
    .resource-type-filter strong {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}