/* =========================================================
   Homepage topic selector
   ========================================================= */

.homepage-topics {
    padding: 80px 24px;
    background-color: #f5fbfa;
}

.homepage-topics__container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.homepage-topics__header {
    max-width: 720px;
    /* margin: 0 auto 44px; */
    /* text-align: center; */
}

.homepage-topics__eyebrow {
    margin: 0 0 10px;
    color: #007a74;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.homepage-topics__title {
    margin: 0;
    color: #344055;
    font-family: "Poppins", sans-serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
    text-align: left;
}

.homepage-topics__introduction {
    margin: 18px 0 0;
    color: #5c6679;
    font-size: 1.0625rem;
    line-height: 1.7;
}

.homepage-topics__breathing {
    margin-top: 80px;
}
/* Topic grid */

.homepage-topics__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    /* gap: 22px; */
    row-gap: 2px;
    column-gap: 16px;
    background-color: var(--tb-dark);
}

/* Individual topic card */

.homepage-topic-card {
    min-width: 0;
    background-color: #304631;
    border: 1px solid rgba(52, 64, 85, 0.12);
    /* border-radius: 16px; */
    box-shadow: 0 10px 26px rgba(52, 64, 85, 0.08);
    overflow: hidden;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.homepage-topic-card:hover {
    border-color: rgba(0, 122, 116, 0.35);
    box-shadow: 0 16px 34px rgba(52, 64, 85, 0.13);
    transform: translateY(-5px);
}

.homepage-topic-card__link {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 150px;
    padding: 24px;
    color: inherit;
    text-decoration: none;
}

.homepage-topic-card__link:focus-visible {
    outline: 3px solid #00ccff;
    outline-offset: -4px;
}

/* Icon holder */

.homepage-topic-card__icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: #007a74;
    background-color: rgba(67, 179, 174, 0.16);
    border-radius: 14px;
}

/*
 * Temporary visual symbol.
 * We will replace this with the proper topic icons next.
 */
.homepage-topic-card__icon::before {
    content: "#";
    font-family: "Poppins", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Card text */

.homepage-topic-card__content {
    display: block;
    min-width: 0;
}

.homepage-topic-card__title {
    display: block;
    /* color: #344055; */
    color: white;
    font-family: "Poppins", sans-serif;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.35;
}

/* .homepage-topic-card__description {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    color: #687386;
    font-size: 0.9375rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
} */
.homepage-topic-card__description {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    color: #687386;
    font-size: 0.9375rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
}
/* Direction arrow */

.homepage-topic-card__arrow {
    color: #007a74;
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 180ms ease;
}

.homepage-topic-card:hover .homepage-topic-card__arrow {
    transform: translateX(5px);
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 900px) {
    .homepage-topics {
        padding-block: 64px;
    }

    .homepage-topics__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 600px) {
    .homepage-topics {
        padding: 52px 18px;
    }

    .homepage-topics__header {
        margin-bottom: 32px;
        text-align: left;
    }

    .homepage-topics__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .homepage-topic-card__link {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        min-height: 128px;
        padding: 20px;
    }

    .homepage-topic-card__icon {
        width: 48px;
        height: 48px;
    }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
    .homepage-topic-card,
    .homepage-topic-card__arrow {
        transition: none;
    }
}