:root {
    --resource-container: 1280px;
    --resource-gutter: 48px;

    --resource-teal: #17637a;
    --resource-blue: #29a9d0;
    --resource-orange: #f2a33c;
    --resource-text: #3a4a52;
    --resource-muted: #5b6b73;
    --resource-light-blue: #e8f5fa;
    --resource-surface: #fff;
    --resource-background: #f5f8fa;

    @media (max-width: 700px) {
        --resource-gutter: 16px;
    }
}


/* --------------------------------------------------------------------------
   Karbon overrides
   -------------------------------------------------------------------------- */

body.resource-library-page {

    #clbr-site-header {
        background-color: var(--clbr-header-solid-bg-color) !important;
        .clbr-site-header__inner {
            @media (min-width: 1024px) {
                height: var(--clbr-header-sticky-height-desktop) !important;
            }
        }
    }
    

    #content {
        padding: 0;
    }
}


/* --------------------------------------------------------------------------
   Temporary Resource Library test page
   -------------------------------------------------------------------------- */

.resource-library {

    

    padding-block: 64px;
    background: var(--resource-background);

    .inner {
        width: min(
            var(--resource-container),
            calc(100% - (var(--resource-gutter) * 2))
        );
        margin-inline: auto;
    }

    .header {
        margin-bottom: 36px;
    }

    .eyebrow {
        display: block;
        margin-bottom: 12px;
        color: var(--resource-orange);
        font-family: Poppins, sans-serif;
        font-size: 12px;
        font-weight: 600;
        line-height: 1;
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }

    .title {
        margin: 0;
        color: var(--resource-teal);
        font-family: Poppins, sans-serif;
        font-size: 42px;
        font-weight: 700;
        line-height: 1.15;
        letter-spacing: -0.01em;
    }

    .count {
        margin: 12px 0 0;
        color: var(--resource-muted);
        font-family: Poppins, sans-serif;
        font-size: 14px;
        line-height: 1.5;
    }

    .grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .empty {
        padding: 28px;
        background: var(--resource-surface);
        border-radius: 14px;
        color: #8b9aa2;
        font-family: Poppins, sans-serif;
        font-size: 14px;
        text-align: center;
    }

    @media (max-width: 900px) {
        .grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (max-width: 600px) {
        padding-block: 40px;

        .header {
            margin-bottom: 28px;
        }

        .title {
            font-size: 34px;
        }

        .grid {
            grid-template-columns: 1fr;
            gap: 16px;
        }
    }
}


/* --------------------------------------------------------------------------
   Resource card
   -------------------------------------------------------------------------- */

.resource-card {
    overflow: hidden;
    height: 100%;
    background: var(--resource-surface);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(23, 99, 122, 0.1);

    .link {
        display: flex;
        flex-direction: column;
        height: 100%;
        color: inherit;
        text-decoration: none;

        &:hover {
            .action {
                color: var(--resource-teal);
            }
        }

        &:focus-visible {
            outline: 2px solid var(--resource-blue);
            outline-offset: 4px;
        }
    }

    .media {
        height: 130px;
        overflow: hidden;
        background: #d7e4ea;
    }

    .image {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .body {
        display: flex;
        flex: 1;
        flex-direction: column;
        gap: 9px;
        padding: 18px 22px 22px;
    }

    .badges {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .badge {
        display: inline-flex;
        align-items: center;
        width: fit-content;
        padding: 5px 11px;
        border-radius: 20px;
        font-family: Poppins, sans-serif;
        font-size: 10px;
        font-weight: 600;
        line-height: 1;
        letter-spacing: 0.1em;
        text-transform: uppercase;

        &.type {
            background: var(--resource-light-blue);
            color: var(--resource-teal);
        }

        &.physical {
            background: var(--resource-blue);
            color: #fff;
        }

        &.mental {
            background: var(--resource-teal);
            color: #fff;
        }
    }

    .title {
        margin: 0;
        color: var(--resource-teal);
        font-family: Poppins, sans-serif;
        font-size: 15.5px;
        font-weight: 600;
        line-height: 1.35;
    }

    .description {
        color: var(--resource-muted);
        font-family: Poppins, sans-serif;
        font-size: 13px;
        font-weight: 400;
        line-height: 1.55;
    }

    .action {
        margin-top: auto;
        color: var(--resource-blue);
        font-family: Poppins, sans-serif;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
    }

    @media (max-width: 600px) {
        .media {
            height: 150px;
        }

        .body {
            padding: 18px;
        }
    }
}


/* --------------------------------------------------------------------------
   Resource category card
   -------------------------------------------------------------------------- */

.resource-category-card {
    overflow: hidden;
    height: 100%;
    background: var(--resource-surface);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(23, 99, 122, 0.1);
    transition: box-shadow 200ms ease;

    &:hover {
        box-shadow: 0 8px 24px rgba(23, 99, 122, 0.18);
    }

    .link {
        display: flex;
        flex-direction: column;
        height: 100%;
        color: inherit;
        text-decoration: none;

        &:hover {
            .image {
                transform: scale(1.03);
            }

            .action {
                color: var(--resource-teal);
            }
        }

        &:focus-visible {
            outline: 2px solid var(--resource-blue);
            outline-offset: 4px;
        }
    }

    .media {
        height: 190px;
        overflow: hidden;
        background: #d7e4ea;
    }

    .image {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 200ms ease;
    }

    .body {
        display: flex;
        flex: 1;
        flex-direction: column;
        padding: 24px;
    }

    .title {
        margin: 0 0 10px;
        color: var(--resource-teal);
        font-family: Poppins, sans-serif;
        font-size: 21px;
        font-weight: 600;
        line-height: 1.3;
    }

    .description {
        margin-bottom: 20px;
        color: var(--resource-muted);
        font-family: Poppins, sans-serif;
        font-size: 14px;
        line-height: 1.6;

        p {
            margin: 0;
        }
    }

    .action {
        margin-top: auto;
        color: var(--resource-blue);
        font-family: Poppins, sans-serif;
        font-size: 14px;
        font-weight: 600;
        transition: color 200ms ease;
    }

    @media (max-width: 600px) {
        .media {
            height: 160px;
        }

        .body {
            padding: 20px;
        }

        .title {
            font-size: 19px;
        }

        .description {
            margin-bottom: 16px;
        }
    }
}


/* --------------------------------------------------------------------------
   Resource Library landing
   -------------------------------------------------------------------------- */

.resource-library-landing {
    .hero {
        @media (min-width: 1024px) {
            margin-top: var(--clbr-header-sticky-height-desktop);
        }
        position: relative;
        overflow: hidden;
        background: var(--resource-teal);

        .background {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0.28;
        }

        .inner {
            position: relative;
            z-index: 1;
            width: min(
                var(--resource-container),
                calc(100% - (var(--resource-gutter) * 2))
            );
            margin-inline: auto;
            padding-block: 88px 80px;
        }

        .eyebrow {
            display: block;
            margin-bottom: 18px;
            color: var(--resource-orange);
            font-family: Poppins, sans-serif;
            font-size: 12px;
            font-weight: 600;
            line-height: 1;
            letter-spacing: 0.14em;
            text-transform: uppercase;
        }

        .title {
            max-width: 800px;
            margin: 0 0 20px;
            color: #fff;
            font-family: Poppins, sans-serif;
            font-size: 46px;
            font-weight: 700;
            line-height: 1.15;
            letter-spacing: -0.01em;
        }

        .intro {
            max-width: 640px;
            margin: 0;
            color: rgba(255, 255, 255, 0.92);
            font-family: Poppins, sans-serif;
            font-size: 17px;
            font-weight: 400;
            line-height: 1.7;
            text-wrap: pretty;
        }

        @media (max-width: 700px) {
            .inner {
                padding-block: 56px 52px;
            }

            .title {
                font-size: 36px;
            }

            .intro {
                font-size: 16px;
            }
        }

        @media (max-width: 400px) {
            .inner {
                padding-block: 48px 44px;
            }

            .eyebrow {
                margin-bottom: 14px;
            }

            .title {
                margin-bottom: 16px;
                font-size: 32px;
            }
        }
    }
}


/* --------------------------------------------------------------------------
   Landing categories
   -------------------------------------------------------------------------- */

.resource-categories {
    padding-block: 72px;
    background: var(--resource-background);

    .inner {
        width: min(
            var(--resource-container),
            calc(100% - (var(--resource-gutter) * 2))
        );
        margin-inline: auto;
    }

    .header {
        margin-bottom: 32px;
        text-align: center;

        .title {
            margin: 0;
            color: var(--resource-teal);
            font-family: Poppins, sans-serif;
            font-size: 32px;
            font-weight: 700;
            line-height: 1.2;
        }
    }

    .grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    @media (max-width: 700px) {
        padding-block: 48px;

        .header {
            margin-bottom: 24px;

            .title {
                font-size: 28px;
            }
        }

        .grid {
            grid-template-columns: 1fr;
            gap: 18px;
        }
    }
}


/* --------------------------------------------------------------------------
   Resource Library footer
   -------------------------------------------------------------------------- */

.resource-footer {
    background: var(--resource-teal);

    .inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: min(
            var(--resource-container),
            calc(100% - (var(--resource-gutter) * 2))
        );
        margin-inline: auto;
        padding-block: 26px;
    }

    .copyright,
    .domain {
        color: rgba(255, 255, 255, 0.8);
        font-family: Poppins, sans-serif;
        font-size: 13px;
        font-weight: 400;
        line-height: 1;
    }

    .domain {
        text-decoration: none;

        &:hover {
            color: #fff;
        }

        &:focus-visible {
            outline: 2px solid #fff;
            outline-offset: 4px;
        }
    }

    @media (max-width: 600px) {
        .inner {
            flex-direction: column;
            gap: 12px;
            padding-block: 22px;
            text-align: center;
        }
    }
}