.ejms-wrapper {
    width: 100%;
}
.ejms-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 24px;
}

.ejms-grid .swiper-wrapper {
    display: contents;
}

.ejms-item {
    background: #F3F2EE;
    border-radius: 0;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    grid-column: span 2;
    background-repeat: no-repeat;
    background-position: right 20px top 20px;
}
.ejms-item .ejms-item__title{
font-size: var(--font-down-2);
text-transform: uppercase;
max-width: 90%;
}
.ejms-item .ejms-item__content{
font-size: var(--font-root);
max-width: 90%;
}
.ejms-item--exquisite-day{
background-image: url("../img/sunny.svg");
}
.ejms-item--optimal-timing{
background-image: url("../img/calendar_today.svg");
}
.ejms-item--outstanding-space{
background-image: url("../img/star.svg");
}
.ejms-item--emblematic-object{
background-image: url("../img/visibility.svg");
}
.ejms-item--best-enjoyed-with{
background-image: url("../img/add_diamond.svg");
}
.ejms-item.swiper-slide {
    width: auto;
    height: auto;
}

.ejms-grid .ejms-item:last-child:nth-child(3n + 1) {
    grid-column: span 6;
}

.ejms-grid .ejms-item:nth-last-child(2):nth-child(3n + 1) {
    grid-column: span 3;
}

.ejms-grid .ejms-item:last-child:nth-child(3n + 2) {
    grid-column: span 3;
}

.ejms-item__title {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.25rem);
    letter-spacing: 0.02em;
    text-transform: capitalize;
}

.ejms-item__content p {
    margin: 0;
}

.ejms-item__content p + p {
    margin-top: 0.75em;
}

@media (max-width: 1024px) {
    .ejms-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ejms-item {
        grid-column: span 2;
    }

    .ejms-grid .ejms-item:last-child:nth-child(3n + 1),
    .ejms-grid .ejms-item:last-child:nth-child(3n + 2),
    .ejms-grid .ejms-item:nth-last-child(2):nth-child(3n + 1) {
        grid-column: span 2;
    }

    .ejms-grid .ejms-item:last-child:nth-child(2n + 1) {
        grid-column: span 4;
    }
}

@media (max-width: 767px) {
    .ejms-grid {
        display: block;
    }

    .ejms-grid .swiper-wrapper {
        display: block;
    }

    .ejms-grid .swiper-slide {
        width: 100%;
    }

    .ejms-grid:not(.ejms-grid--swiper) .swiper-slide + .swiper-slide {
        margin-top: 16px;
    }

    .ejms-grid--swiper {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .ejms-grid--swiper .swiper-wrapper {
        display: flex;
        gap: 0;
        padding-right: var(--ejms-mobile-peek, 10%);
    }

    .ejms-grid--swiper .swiper-slide {
        width: calc(100% - var(--ejms-mobile-peek, 10%));
    }

    .ejms-grid--swiper .ejms-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #FFFFFF;
        color: #000;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 5;
    }
    .ejms-grid--swiper .ejms-nav::before {
        content: '';
        display: block;
        width: 10px;
        height: 10px;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
        transform: rotate(45deg);
    }

    .ejms-grid--swiper .ejms-nav--prev {
        left: 0;
    }

    .ejms-grid--swiper .ejms-nav--prev::before {
        transform: rotate(-135deg);
    }

    .ejms-grid--swiper .ejms-nav--next {
        right: 0;
    }

    .ejms-grid--swiper:hover .ejms-nav,
    .ejms-grid--swiper .ejms-nav:focus {
        opacity: 1;
        pointer-events: auto;
    }
    .ejms-grid--swiper:hover .ejms-nav.swiper-button-disabled{
opacity: 0.5;
}
}
