.htts-gallery {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-bottom: 0;
}

.htts-gallery::before {
    position: absolute;
    inset: auto 0 0;
    z-index: 0;
    height: clamp(70px, 5vw, 96px);
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 100% 100%;
    content: "";
    pointer-events: none;
}

.htts-gallery__inner {
    position: relative;
    z-index: 2;
    width: min(var(--htts-container-width), calc(100% - 32px));
    margin: 0 auto;
}

.htts-gallery h2 {
    margin: 0 0 22px;
    font-family: SVN-GilroyBold, Arial, sans-serif;
    font-size: clamp(24px, 2vw, 31px);
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    color: #24395f;
}

.htts-gallery__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.htts-gallery__item {
    margin: 0;
    text-align: center;
}

.htts-gallery__item img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(36, 57, 95, 0.12);
}

.htts-gallery__item figcaption {
    margin-top: 6px;
    font-family: SVN-GilroyBold, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.25;
    color: #24395f;
}

.htts-gallery__ending {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    height: clamp(138px, 13vw, 210px);
    overflow: hidden;
    pointer-events: none;
}

.htts-gallery__ending p {
    position: absolute;
    left: clamp(520px, 38vw, 750px);
    bottom: clamp(30px, 8vw, 32px);
    z-index: 3;
    margin: 0;
    font-family: "UVN Ben Xuan", Georgia, serif;
    font-size: clamp(23px, 4.65vw, 40px);
    font-weight: 400;
    line-height: 1.12;
    text-align: left;
    color: #ed1c69;
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9);
}

.htts-gallery__road,
.htts-gallery__bus,
.htts-gallery__grass {
    position: absolute;
    display: block;
    height: auto;
    user-select: none;
}

.htts-gallery__road {
    left: clamp(-36px, -1.8vw, -12px);
    bottom: clamp(-206px, -10.6vw, -146px);
    z-index: 1;
    width: min(47vw, 760px);
    object-fit: contain;
}

.htts-gallery__bus {
    right: clamp(390px, 15vw, 520px);
    bottom: 0;
    z-index: 2;
    width: min(20vw, 310px);
    object-fit: contain;
}

.htts-gallery__grass {
    right: -50px;
    bottom: clamp(-235px, -6.8vw, -164px);
    z-index: 1;
    width: min(36vw, 585px);
    object-fit: contain;
}

@media (max-width: 991px) {
    .htts-gallery__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .htts-gallery__ending p {
        left: 42vw;
        bottom: 52px;
        font-size: clamp(22px, 3.4vw, 32px);
    }

    .htts-gallery__road {
        width: 58vw;
    }

    .htts-gallery__bus {
        right: 22vw;
        bottom: 0;
        width: 30vw;
    }

    .htts-gallery__grass {
        width: 45vw;
    }
}

@media (max-width: 575px) {
    .htts-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .htts-gallery__ending {
        height: 136px;
    }

    .htts-gallery__ending p {
        left: 24px;
        bottom: 65px;
        max-width: 180px;
        font-size: 19px;
    }

    .htts-gallery__road {
        left: -110px;
        bottom: -88px;
        width: 78vw;
    }

    .htts-gallery__bus {
        right: -8px;
        bottom: 0;
        width: 42vw;
    }

    .htts-gallery__grass {
        right: -46px;
        bottom: -76px;
        width: 62vw;
    }
}
