@-webkit-keyframes hero-bg-scrolling {
    0% {
        background-position: 0px 196px; // The height of the hero image
    }
    100% {
        background-position: 0px 175px;
    }
}

@keyframes hero-bg-scrolling {
    0% {
        background-position: 0px 196px; // The height of the hero image
    }
    100% {
        background-position: 0px 175px;
    }
}

.hero {
    height: 250px;
    width: 100%;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-top-left-radius: var(--overlay-corner-radius);
    mask: linear-gradient(0deg, transparent, rgb(255, 255, 255, 1) 65%);
    mask-composite: intersect;
    -webkit-mask: linear-gradient(0deg, transparent, rgb(255, 255, 255, 1) 65%);
    -webkit-mask-composite: intersect;

    &::before {
        content: '';
        position: fixed;
        width: 2000%;
        height: 2000%;
        top: -1000%;
        left: -1000%;
        z-index: -1;
        background: var(--hero-background-image) repeat 0 0;
        background-color: var(--hero-background-color);
        // 3D translation
        transform: rotateX(15deg) rotateZ(-15deg) skewX(15deg);
        transform-style: preserve-3d;
        // Animation
        -webkit-animation: hero-bg-scrolling 1s;
        animation: hero-bg-scrolling 1s;
        -webkit-animation-timing-function: cubic-bezier(.7,1,.8,1);
        animation-timing-function: cubic-bezier(.7,1,.8,1);
        -webkit-animation-fill-mode: forwards;
        animation-fill-mode: forwards;
    }

    &-title {
        display: flex;
        font-weight: 900 !important;
    }
}

.tool-group-parallax {
    height: 100vh;
    overflow-x: hidden;
    perspective: 1px;
}

.tool-group-grid-view {
    padding: var(--tool-page-padding);
    transform: translateZ(0);

    .tool-group-grid-view-item {
        height: 134px;
        max-height: 134px;
        padding: 16px;
        display: grid;
        grid-template-columns: min-content 1fr min-content;
        grid-template-rows: min-content 1fr;
        gap: 0px 0px;
        grid-template-areas:
            "icon title buttons"
            "icon description description";

        .icon {
            grid-area: icon;
            display: grid;
            height: 100px;
            width: 100px;
            padding: 12px;
            background-color: var(--card-background-color);
            border-radius: var(--control-corner-radius);
        }

        .title {
            grid-area: title;
            margin-left: 16px;
            max-height: 75px;
            word-wrap: break-word;
            text-overflow: ellipsis;
            color: var(--text-fill-color-primary);
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        .description {
            grid-area: description;
            margin-left: 16px;
            margin-top: 2px;
            margin-right: 8px;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 5;
            -webkit-box-orient: vertical;
        }

        .buttons {
            grid-area: buttons;
            margin-left: 16px;
            top: 0px;

            .button {
                height: 24px;
                min-block-size: 24px;
                width: 24px;
                padding: 0px;
            }

            .fonticon {
                text-align: center;
                font-size: 16px;
                width: 21px;
            }
        }
    }
}

// Compact mode
div[data-compactmode] {
    .hero {
        height: 200px;
    }

    .tool-group-grid-view {
        padding: 8px 16px;
    }
}

// Use less animations
div[data-uselessanimations] {
    .hero {
        &::before {
            animation: none;
            -webkit-animation: none;
        }
    }
}