/*
|--------------------------------------------------------------------------
| ToolVerse - Helpful Content
|--------------------------------------------------------------------------
| Scope:
| - ONLY .tv-helpful-content
| - No CSS leakage to other sections/pages
| - Responsive desktop/tablet/mobile
| - Lightweight effects only
|--------------------------------------------------------------------------
*/


/* ==========================================================================
   SECTION
   ========================================================================== */

.tv-helpful-content {
    position: relative;

    width: 100%;

    padding: 84px 0;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8faff 100%
        );
}


/* ==========================================================================
   BACKGROUND DECORATION
   ========================================================================== */

.tv-helpful-content::before {
    content: "";

    position: absolute;

    top: -190px;
    right: -180px;

    width: 460px;
    height: 460px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(99, 91, 255, 0.055) 0%,
            rgba(99, 91, 255, 0.018) 48%,
            transparent 72%
        );

    pointer-events: none;
}


/* ==========================================================================
   HEADER
   ========================================================================== */

.tv-helpful-content__head {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 36px;

    margin-bottom: 34px;
}

.tv-helpful-content__heading {
    width: 100%;
    max-width: 720px;
}


/* ==========================================================================
   EYEBROW
   ========================================================================== */

.tv-helpful-content__eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 30px;

    padding: 0 11px;

    border:
        1px solid
        rgba(99, 91, 255, 0.13);

    border-radius: 999px;

    background:
        var(--tv-color-primary-soft);

    color:
        var(--tv-color-primary-dark);

    font-size: 10px;
    font-weight: 750;

    line-height: 1;

    letter-spacing: 0.2px;
}


/* ==========================================================================
   TITLE
   ========================================================================== */

.tv-helpful-content__title {
    max-width: 690px;

    margin: 14px 0 0;

    color:
        var(--tv-color-heading);

    font-size:
        clamp(
            30px,
            3.3vw,
            43px
        );

    font-weight: 820;

    line-height: 1.12;

    letter-spacing: -1.5px;
}


/* ==========================================================================
   DESCRIPTION
   ========================================================================== */

.tv-helpful-content__description {
    max-width: 650px;

    margin: 14px 0 0;

    color:
        var(--tv-color-muted);

    font-size: 14px;
    font-weight: 400;

    line-height: 1.75;
}


/* ==========================================================================
   GRID
   ========================================================================== */

.tv-helpful-content__grid {
    position: relative;
    z-index: 2;

    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 16px;
}


/* ==========================================================================
   CARD
   ========================================================================== */

.tv-helpful-content__card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 310px;

    padding: 23px;

    overflow: hidden;

    border:
        1px solid
        rgba(222, 227, 235, 0.96);

    border-radius: 20px;

    background: #ffffff;

    box-shadow:
        0 6px 20px
        rgba(16, 24, 40, 0.04);

    transition:
        transform 200ms ease,
        border-color 200ms ease,
        box-shadow 200ms ease;
}


/* ==========================================================================
   CARD DECORATION
   ========================================================================== */

.tv-helpful-content__card::before {
    content: "";

    position: absolute;

    top: -100px;
    right: -90px;

    width: 210px;
    height: 210px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(99, 91, 255, 0.075),
            transparent 70%
        );

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 200ms ease;
}

.tv-helpful-content__card::after {
    content: "";

    position: absolute;

    top: 0;
    left: 22px;
    right: 22px;

    height: 2px;

    border-radius:
        0
        0
        999px
        999px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(99, 91, 255, 0.62),
            transparent
        );

    opacity: 0;

    transform: scaleX(0.45);

    transition:
        opacity 200ms ease,
        transform 200ms ease;
}


/* ==========================================================================
   CARD HOVER
   ========================================================================== */

.tv-helpful-content__card:hover {
    border-color:
        rgba(99, 91, 255, 0.20);

    transform:
        translateY(-4px);

    box-shadow:
        0 16px 34px
        rgba(16, 24, 40, 0.075);
}

.tv-helpful-content__card:hover::before {
    opacity: 1;
}

.tv-helpful-content__card:hover::after {
    opacity: 1;

    transform: scaleX(1);
}


/* ==========================================================================
   ICON
   ========================================================================== */

.tv-helpful-content__icon {
    position: relative;
    z-index: 2;

    display: grid;
    place-items: center;

    width: 47px;
    height: 47px;

    flex: 0 0 47px;

    border-radius: 14px;

    background:
        var(--tv-color-primary-soft);

    color:
        var(--tv-color-primary-dark);

    transition:
        transform 180ms ease;
}

.tv-helpful-content__icon svg {
    display: block;

    width: 22px;
    height: 22px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.75;

    stroke-linecap: round;
    stroke-linejoin: round;
}

.tv-helpful-content__card:hover
.tv-helpful-content__icon {
    transform: translateY(-2px);
}


/* ==========================================================================
   CATEGORY
   ========================================================================== */

.tv-helpful-content__category {
    position: relative;
    z-index: 2;

    display: inline-flex;
    align-items: center;

    width: fit-content;

    min-height: 24px;

    margin-top: 20px;

    padding: 0 9px;

    border:
        1px solid
        var(--tv-color-border);

    border-radius: 999px;

    background:
        #fafbfc;

    color:
        #778294;

    font-size: 8px;
    font-weight: 760;

    line-height: 1;

    letter-spacing: 0.35px;

    text-transform: uppercase;
}


/* ==========================================================================
   CARD TITLE
   ========================================================================== */

.tv-helpful-content__card h3 {
    position: relative;
    z-index: 2;

    margin: 13px 0 0;

    color:
        var(--tv-color-heading);

    font-size: 17px;
    font-weight: 780;

    line-height: 1.38;

    letter-spacing: -0.35px;

    transition:
        color 180ms ease;
}

.tv-helpful-content__card:hover h3 {
    color:
        var(--tv-color-primary-dark);
}


/* ==========================================================================
   CARD TEXT
   ========================================================================== */

.tv-helpful-content__card p {
    position: relative;
    z-index: 2;

    margin: 9px 0 0;

    color:
        var(--tv-color-muted);

    font-size: 11px;
    font-weight: 400;

    line-height: 1.7;
}


/* ==========================================================================
   CARD LINK
   ========================================================================== */

.tv-helpful-content__link {
    position: relative;
    z-index: 2;

    display: inline-flex;
    align-items: center;

    width: fit-content;

    gap: 7px;

    margin-top: auto;

    padding-top: 22px;

    color:
        var(--tv-color-primary);

    font-size: 10px;
    font-weight: 750;

    line-height: 1;

    transition:
        color 180ms ease;
}

.tv-helpful-content__link > span {
    display: inline-block;

    font-size: 14px;

    line-height: 1;

    transition:
        transform 180ms ease;
}

.tv-helpful-content__link:hover {
    color:
        var(--tv-color-primary-dark);
}

.tv-helpful-content__link:hover > span {
    transform:
        translateX(3px);
}


/* ==========================================================================
   BOTTOM INFORMATION
   ========================================================================== */

.tv-helpful-content__bottom {
    position: relative;
    z-index: 2;

    margin-top: 20px;

    padding:
        19px
        21px;

    border:
        1px solid
        rgba(99, 91, 255, 0.10);

    border-radius: 17px;

    background:
        linear-gradient(
            135deg,
            rgba(248, 247, 255, 0.92),
            rgba(255, 255, 255, 0.96)
        );
}

.tv-helpful-content__bottom-copy {
    max-width: 820px;
}


/* ==========================================================================
   BOTTOM TITLE
   ========================================================================== */

.tv-helpful-content__bottom-copy strong {
    display: block;

    color:
        var(--tv-color-heading);

    font-size: 12px;
    font-weight: 780;

    line-height: 1.45;
}


/* ==========================================================================
   BOTTOM DESCRIPTION
   ========================================================================== */

.tv-helpful-content__bottom-copy p {
    margin:
        5px
        0
        0;

    color:
        var(--tv-color-muted);

    font-size: 10px;
    font-weight: 400;

    line-height: 1.65;
}


/* ==========================================================================
   KEYBOARD ACCESSIBILITY
   ========================================================================== */

.tv-helpful-content__link:focus-visible {
    outline:
        3px solid
        rgba(99, 91, 255, 0.20);

    outline-offset: 4px;

    border-radius: 4px;
}


/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1024px) {

    .tv-helpful-content {
        padding:
            70px
            0;
    }

    .tv-helpful-content__grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .tv-helpful-content__card {
        min-height: 285px;
    }

    .tv-helpful-content__card:last-child {
        grid-column:
            1
            / -1;

        min-height: 250px;
    }
}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 640px) {

    .tv-helpful-content {
        padding:
            52px
            0
            58px;
    }

    .tv-helpful-content__head {
        margin-bottom: 25px;
    }

    .tv-helpful-content__eyebrow {
        min-height: 28px;

        font-size: 9px;
    }

    .tv-helpful-content__title {
        margin-top: 12px;

        font-size:
            clamp(
                25px,
                7.5vw,
                32px
            );

        letter-spacing: -1px;
    }

    .tv-helpful-content__description {
        margin-top: 10px;

        font-size: 12px;

        line-height: 1.65;
    }

    .tv-helpful-content__grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .tv-helpful-content__card,
    .tv-helpful-content__card:last-child {
        grid-column: auto;

        min-height: 250px;

        padding: 18px;

        border-radius: 17px;
    }

    .tv-helpful-content__icon {
        width: 43px;
        height: 43px;

        flex-basis: 43px;

        border-radius: 13px;
    }

    .tv-helpful-content__icon svg {
        width: 20px;
        height: 20px;
    }

    .tv-helpful-content__category {
        margin-top: 17px;
    }

    .tv-helpful-content__card h3 {
        margin-top: 11px;

        font-size: 15px;
    }

    .tv-helpful-content__card p {
        margin-top: 7px;

        font-size: 10px;
    }

    .tv-helpful-content__link {
        padding-top: 18px;
    }

    .tv-helpful-content__bottom {
        margin-top: 16px;

        padding:
            16px
            17px;

        border-radius: 15px;
    }
}


/* ==========================================================================
   SMALL MOBILE
   ========================================================================== */

@media (max-width: 400px) {

    .tv-helpful-content {
        padding:
            46px
            0
            52px;
    }

    .tv-helpful-content__title {
        font-size: 25px;
    }

    .tv-helpful-content__card,
    .tv-helpful-content__card:last-child {
        min-height: 240px;

        padding: 16px;
    }

    .tv-helpful-content__bottom {
        padding: 15px;
    }
}


/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .tv-helpful-content__card,
    .tv-helpful-content__card::before,
    .tv-helpful-content__card::after,
    .tv-helpful-content__icon,
    .tv-helpful-content__card h3,
    .tv-helpful-content__link,
    .tv-helpful-content__link > span {
        transition: none;
    }

    .tv-helpful-content__card:hover,
    .tv-helpful-content__card:hover
    .tv-helpful-content__icon,
    .tv-helpful-content__link:hover > span {
        transform: none;
    }
}