/*
 * Homepage featured-tool shelf
 *
 * This region is intentionally a short discovery shelf rather than a second
 * copy of the complete catalogue. Four spotlight tools establish hierarchy;
 * the remaining entries stay compact and can be expanded without leaving the
 * page.
 */

.footer-nav .kiv-home-featured {
    margin: 2px 0 24px;
    padding: 20px 0 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.kiv-home-featured-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 13px;
    padding: 0 0 14px;
    border-bottom: 1px solid #dbe5df;
}

.kiv-home-featured-copy {
    min-width: 0;
}

.kiv-home-featured-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
    margin-bottom: 5px;
}

.kiv-home-featured .kiv-home-featured-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #177c50;
    font-size: 9px;
    font-weight: 760;
    letter-spacing: .11em;
    line-height: 1.2;
    text-transform: uppercase;
}

.kiv-home-featured .kiv-home-featured-eyebrow::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #42bc78;
    box-shadow: 0 0 0 3px rgba(66, 188, 120, .12);
    content: '';
}

.kiv-home-featured-count {
    display: inline-flex;
    align-items: center;
    min-height: 19px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #edf4f0;
    color: #61746a;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: .02em;
    line-height: 1;
    white-space: nowrap;
}

.kiv-home-featured h1,
.kiv-home-featured h2 {
    margin: 0;
    color: #293b36;
    font-size: 23px;
    font-weight: 720;
    letter-spacing: -.025em;
    line-height: 1.18;
}

.kiv-home-featured-description {
    max-width: 760px;
    margin: 5px 0 0;
    color: #6b7e76;
    font-size: 12px;
    line-height: 1.5;
}

.kiv-home-featured .kiv-home-featured-all {
    position: relative;
    flex: 0 0 auto;
    padding: 5px 0 4px;
    border: 0;
    border-bottom: 1px solid #9bcbb0;
    border-radius: 0;
    background: transparent;
    color: #197c50;
    font-size: 11px;
    font-weight: 680;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
}

.kiv-home-featured .kiv-home-featured-all:hover,
.kiv-home-featured .kiv-home-featured-all:focus {
    border-color: #238e5d;
    background: transparent;
    color: #0e6840;
    outline: 0;
    text-decoration: none;
}

.kiv-home-featured-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.kiv-home-featured-card {
    --kiv-feature-accent: #5baa7a;
    position: relative;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 9px;
    min-width: 0;
    min-height: 68px;
    padding: 9px 28px 9px 10px;
    overflow: hidden;
    border: 0;
    border-radius: 4px;
    background: #f5f8f6;
    box-shadow: inset 0 -1px 0 rgba(48, 93, 68, .09);
    transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.kiv-home-featured-card::after {
    position: absolute;
    right: 11px;
    top: 50%;
    bottom: auto;
    color: var(--kiv-feature-accent);
    content: '→';
    font-size: 14px;
    line-height: 1;
    transform: translateY(-50%);
    transition: transform .16s ease;
}

.kiv-home-featured-card:hover,
.kiv-home-featured-card:focus-within {
    border-color: transparent;
    background: #ffffff;
    box-shadow: inset 3px 0 var(--kiv-feature-accent), inset 0 -1px 0 rgba(48, 93, 68, .10), 0 8px 20px rgba(37, 70, 55, .07);
    transform: translateY(-1px);
}

.kiv-home-featured-card:hover::after,
.kiv-home-featured-card:focus-within::after {
    transform: translate(2px, -50%);
}

.kiv-home-featured-card .kiv-featured-tool-icon {
    display: inline-flex;
    grid-row: 1 / span 2;
    align-self: center;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 5px;
    background: #e7f2eb;
    color: var(--kiv-feature-accent);
}

.kiv-home-featured-card .kiv-featured-tool-icon svg {
    width: 15px;
    height: 15px;
}

.kiv-home-featured-tag {
    position: relative;
    z-index: 1;
}

.kiv-home-featured-tag,
.kiv-home-featured-link {
    grid-column: 2;
}

.kiv-home-featured-tag {
    align-self: end;
    margin: 0 0 2px;
    color: #75867f;
    font-size: 8px;
    font-weight: 730;
    letter-spacing: .07em;
    line-height: 1.2;
    text-transform: uppercase;
}

.kiv-home-featured-link {
    align-self: start;
    color: #30423c;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.32;
    text-decoration: none;
}

.kiv-home-featured-link::before {
    position: absolute;
    z-index: 2;
    inset: 0;
    content: '';
}

.kiv-home-featured-link:hover,
.kiv-home-featured-link:focus {
    color: #1a774e;
    outline: 0;
    text-decoration: none;
}

/* The first row is the editorial layer: four distinct but restrained tints
 * make the choices feel curated while retaining the KivTools green system. */
.kiv-home-featured-card.is-spotlight {
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 11px;
    min-height: 108px;
    padding: 15px 34px 14px 14px;
    background: #edf7f1;
}

.kiv-home-featured-card.is-spotlight .kiv-featured-tool-icon {
    align-self: start;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #deefe5;
}

.kiv-home-featured-card.is-spotlight .kiv-featured-tool-icon svg {
    width: 19px;
    height: 19px;
}

.kiv-home-featured-card.is-spotlight .kiv-home-featured-tag {
    align-self: end;
    color: var(--kiv-feature-accent);
    font-size: 8.5px;
}

.kiv-home-featured-card.is-spotlight .kiv-home-featured-link {
    align-self: start;
    color: #284039;
    font-size: 13.5px;
    font-weight: 690;
    line-height: 1.32;
}

.kiv-home-featured-card.is-spotlight:nth-child(2) {
    --kiv-feature-accent: #3d78a7;
    background: #eef5fa;
}

.kiv-home-featured-card.is-spotlight:nth-child(2) .kiv-featured-tool-icon {
    background: #e0edf7;
}

.kiv-home-featured-card.is-spotlight:nth-child(3) {
    --kiv-feature-accent: #715ca6;
    background: #f3f1f9;
}

.kiv-home-featured-card.is-spotlight:nth-child(3) .kiv-featured-tool-icon {
    background: #e9e5f4;
}

.kiv-home-featured-card.is-spotlight:nth-child(4) {
    --kiv-feature-accent: #a36c32;
    background: #faf3ea;
}

.kiv-home-featured-card.is-spotlight:nth-child(4) .kiv-featured-tool-icon {
    background: #f3e7d7;
}

.kiv-home-featured-more {
    display: flex;
    justify-content: center;
    margin-top: 13px;
    padding-top: 11px;
    border-top: 1px solid #e2e9e5;
}

.kiv-home-featured-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 12px;
    border: 0;
    border-radius: 4px;
    background: #edf5f0;
    color: #246b49;
    font-family: inherit;
    font-size: 11px;
    font-weight: 680;
    line-height: 1.2;
    transition: background-color .15s ease, color .15s ease;
}

.kiv-home-featured-toggle::after {
    content: '↓';
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

.kiv-home-featured-toggle[aria-expanded='true']::after {
    content: '↑';
}

.kiv-home-featured-toggle:hover,
.kiv-home-featured-toggle:focus {
    background: #e2f1e8;
    color: #145b39;
    outline: 0;
}

.kiv-home-featured-toggle:focus-visible,
.kiv-home-featured .kiv-home-featured-all:focus-visible,
.kiv-home-featured-link:focus-visible {
    outline: 2px solid #218454;
    outline-offset: 3px;
}

.kiv-home-featured-card[hidden] {
    display: none !important;
}

html.kiv-shell-dark .footer-nav .kiv-home-featured {
    border: 0;
    background: transparent;
    box-shadow: none;
}

html.kiv-shell-dark .kiv-home-featured-head,
html.kiv-shell-dark .kiv-home-featured-more {
    border-color: #384c45;
}

html.kiv-shell-dark .kiv-home-featured h1,
html.kiv-shell-dark .kiv-home-featured h2 {
    color: #edf5f2;
}

html.kiv-shell-dark .kiv-home-featured-description {
    color: #aebdb7;
}

html.kiv-shell-dark .kiv-home-featured-count {
    background: #2b3c36;
    color: #b5c4be;
}

html.kiv-shell-dark .kiv-home-featured .kiv-home-featured-all {
    border-color: #4f8064;
    background: transparent;
    color: #a8dfbb;
}

html.kiv-shell-dark .kiv-home-featured-card,
html.kiv-shell-dark .kiv-home-featured-card.is-spotlight,
html.kiv-shell-dark .kiv-home-featured-card.is-spotlight:nth-child(2),
html.kiv-shell-dark .kiv-home-featured-card.is-spotlight:nth-child(3),
html.kiv-shell-dark .kiv-home-featured-card.is-spotlight:nth-child(4) {
    background: #263730;
    box-shadow: inset 0 -1px 0 rgba(161, 196, 178, .09);
}

html.kiv-shell-dark .kiv-home-featured-card:hover,
html.kiv-shell-dark .kiv-home-featured-card:focus-within {
    background: #2a4036;
    box-shadow: inset 3px 0 var(--kiv-feature-accent), inset 0 -1px 0 rgba(161, 196, 178, .11), 0 9px 20px rgba(0, 0, 0, .15);
}

html.kiv-shell-dark .kiv-home-featured-card .kiv-featured-tool-icon,
html.kiv-shell-dark .kiv-home-featured-card.is-spotlight .kiv-featured-tool-icon {
    background: #314a3e !important;
    color: #8cd4a7 !important;
}

html.kiv-shell-dark .kiv-home-featured-tag,
html.kiv-shell-dark .kiv-home-featured-card.is-spotlight .kiv-home-featured-tag {
    color: #9fb0aa;
}

html.kiv-shell-dark .kiv-home-featured-link,
html.kiv-shell-dark .kiv-home-featured-card.is-spotlight .kiv-home-featured-link {
    color: #e2ece8;
}

html.kiv-shell-dark .kiv-home-featured-toggle {
    background: #2c4137;
    color: #b4e2c4;
}

html.kiv-shell-dark .kiv-home-featured-toggle:hover,
html.kiv-shell-dark .kiv-home-featured-toggle:focus {
    background: #345043;
    color: #d0f0db;
}

@media (max-width: 991px) {
    .kiv-home-featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .footer-nav .kiv-home-featured {
        margin-bottom: 19px;
        padding: 16px 0 2px;
        border-left: 0;
    }

    .kiv-home-featured-head {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 10px;
        padding-bottom: 12px;
    }

    .kiv-home-featured h1,
    .kiv-home-featured h2 {
        font-size: 19px;
    }

    .kiv-home-featured-description {
        font-size: 11.5px;
    }

    .kiv-home-featured .kiv-home-featured-all {
        margin: 1px 0 0;
        font-size: 11px;
    }

    .kiv-home-featured-card.is-spotlight {
        min-height: 94px;
    }
}

@media (max-width: 560px) {
    .kiv-home-featured-head {
        display: block;
    }

    .kiv-home-featured .kiv-home-featured-all {
        display: inline-block;
        margin-top: 9px;
    }

    .kiv-home-featured-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .kiv-home-featured-card {
        min-height: 66px;
    }

    .kiv-home-featured-card.is-spotlight {
        min-height: 88px;
        padding-top: 13px;
        padding-bottom: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kiv-home-featured-card,
    .kiv-home-featured-card::after,
    .kiv-home-featured-toggle {
        transition: none;
    }

    .kiv-home-featured-card:hover,
    .kiv-home-featured-card:focus-within {
        transform: none;
    }
}
