.recent-custom-models {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: flex-start;
    gap: 1.5rem;
}

.recent-custom-model-heading {
    font-weight: 700;
    font-size: 24px;
}

.recent-custom-models-section {
    width: 100%;
    min-height: 13.5rem;
    display: grid;
    align-items: center;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Carousel mode */
.recent-custom-models-section.carousel-mode {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.recent-custom-models-section.carousel-mode::-webkit-scrollbar {
    display: none;
}

.recent-custom-models-section.carousel-mode {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.recent-custom-models-section.carousel-mode::before,
.recent-custom-models-section.carousel-mode::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    pointer-events: none;
    z-index: 2;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    animation: scroll-carousel 30s linear infinite;
}

.carousel-track.paused {
    animation-play-state: paused;
}

@keyframes scroll-carousel {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.custom-model {
    width: 19rem;
    height: 13.5rem;
    background-image: linear-gradient(#FFFFFF24, #FFFFFF00);
    border: 0.67px solid rgba(255, 255, 255, 0.3);
    border-radius: 2rem;
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    flex-shrink: 0;
    overflow: hidden;
}

.Header {
    display: none !important;
}

.hidden-model {
    display: none !important;
}

.custom-model-and-name {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.recent-custom-models-image-wrapper {
    width: 120px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.5rem;
}

.recent-custom-models-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.model-text-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 0 0.5rem;
}

.model-name-and-username {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.model-name {
    width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    font-size: 16px;
    line-height: 27.54px;
    letter-spacing: 0px;
    text-align: center;
}

.instagram-username {
    width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    opacity: 0.7;
    text-align: center;
}

.video-wrapper {
    width: 50%;
    height: 133%;
    position: relative;
}

.iframe-container {
    width: 100%;
    height: 100%;
}

@media (max-width: 1080px) {
    .recent-custom-models-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    .recent-custom-models-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .recent-custom-models-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .recent-custom-models {
        gap: 1rem;
    }

    .model-name {
        font-size: 12px;
    }
}

/* Carousel adjustments for different screen sizes */
@media (max-width: 1080px) {

    .recent-custom-models-section.carousel-mode::before,
    .recent-custom-models-section.carousel-mode::after {
        width: 60px;
    }
}

@media (max-width: 768px) {

    .recent-custom-models-section.carousel-mode::before,
    .recent-custom-models-section.carousel-mode::after {
        width: 40px;
    }
}