.ats-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ats-gallery__row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/**
 * Card
 */
.ats-card {
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.ats-card__static-wrapper,
a.ats-card__link-wrapper {
    display: block;
    position:relative;
    height: 100%;
    width: 100%;
    text-decoration: none;
}

a.ats-card__link-wrapper,
a.ats-card__link-wrapper:hover,
a.ats-card__link-wrapper:focus,
a.ats-card__link-wrapper:active,
a.ats-card__link-wrapper:visited {
    color: var(--pure-white);
}

.ats-card__media {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.cards--short-mobile .ats-card__media {
    height: 228px;
}

.ats-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.ats-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    transition: opacity 0.5s ease;
    z-index: 1;
}

.ats-card__focus {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 3;
    transition: opacity 0.4s ease;
}

.ats-card__focus::before {
    content: '';
    width: 160px;
    height: 160px;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    backdrop-filter: blur(1px);
}

.ats-card__focus-arrow {
    position: absolute;
    font-size: 36px;
    color: #000;
}



.ats-card--highlight .ats-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.60);

    z-index: 1;

    -webkit-mask-image: radial-gradient(
            circle 48px at center,
            transparent 48px,
            black 50px
    );

    mask-image: radial-gradient(
            circle 120px at center,
            transparent 60px,
            black 64px
    );
}

.ats-card__arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 4;
    transition:
            transform 0.5s ease,
            opacity 0.3s ease;
}

/* Badge */

.ats-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    color: var(--pure-white);
    font-size: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(6px);
    z-index: 4;
}

/* Content */
.ats-card__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    z-index: 5;
    background: linear-gradient(
            to top,
            rgba(0,0,0,0.85),
            rgba(0,0,0,0)
    );
}

.ats-card__title {
    display: block;
    padding-bottom: 10px;
    margin: 0 0 10px;
    color: var(--pure-white);
    font-family: "Ivy Presto Text", Helvetica, Arial, serif;
    font-size: 22px;
    font-weight: 300;
    border-bottom: 1px solid var(--pure-white);
}

.ats-card__subtitle {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--pure-white);
    font-size: 16px;
    line-height: 1.3;
}

.ats-card__meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.ats-card__item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ats-card__label {
    font-size: 14px;
    font-weight: 700;
    text-transform: lowercase;
}

.ats-card__value {
    font-size: 18px;
    font-weight: 300;
}


/**
  * ATS Card Highlight
  */
.ats-card--highlight  .ats-card__circle {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 96px;
    height: 96px;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* стрелка */
.ats-card__circle-arrow::before {
    content: '↗';
    font-size: 48px;
    line-height: 1;
    color: #fff;
}

.ats-card__caption {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translateX(-50%);
    margin-top: calc(48px + 10px + 10px);
    z-index: 2;

    font-size: 18px;
    font-weight: 400;
    color: #fff;
    text-align: center;
    white-space: nowrap;
}


/*------------------*/

/**
** Cards - masters
*/
.ats-card--master {
    display: flex;
    flex-direction:column;
    background: transparent;
}

.ats-card--master a.ats-card__link-wrapper,
.ats-card--master .ats-card__content,
.ats-card--master .ats-card__badge {
    position: static;
}

.ats-card--master .ats-card__media {
    height: 462px;
    border-radius: 20px;
}

.ats-card--master .ats-card__badge {
    position: absolute;
    top: auto;
    left: 20px;
    bottom: 20px;
    font-size: 14px;
}

.ats-card--master .ats-card__content {
    position: static;
    background: transparent;
}

.ats-card--master .ats-card__title {
    color: var(--dark);
    line-height: 1.25;
    padding-bottom: 0;
}

.ats-card--master .ats-card__subtitle {
    color: var(--dark);
}

/**
 ** Cards - custom--highlight
*/
.ats-card--highlight {

}


/** =====================
  *        DESKTOP
  * =====================
 */
@media (min-width: 1025px) {
    .ats-gallery__row {
        flex-direction: row;
    }

    .ats-card {
        flex-basis: 0;
        border-radius: 10px;
    }

    .ats-card__badge {
        font-size: 18px;
    }

    .ats-card__media,
    .cards--short-mobile .ats-card__media {
        height: 397px;
    }

    .cards--tall-desktop .ats-gallery__row--top .ats-card__media {
        height: 432px;
    }

    .ats-card__title {
        font-size: 30px;
    }

    .ats-card__subtitle {
        font-size: 18px;
    }

    /**
     ** Cards - masters
     */
    .ats-card--master {
        flex-basis: auto;
    }

    .ats-card--master .ats-card__media {
        height: 556px;
    }




    /**
     ** Grid
     */

    /* Default - 6 cards*/

    .ats-gallery .ats-gallery__row--single {
        display: grid;
        gap: 40px;
    }

    .ats-gallery--count-2 .ats-gallery__row--single {
        grid-template-columns: repeat(2, 1fr);
    }
    .ats-gallery--count-3 .ats-gallery__row--single {
        grid-template-columns: repeat(3, 1fr);
    }
    .ats-gallery--count-4 .ats-gallery__row--single {
        grid-template-columns: repeat(4, 1fr);
    }

    .ats-gallery--count-5 .ats-gallery__row--single {
        grid-template-columns: repeat(5, 1fr);
    }

    .ats-gallery--count-6 .ats-gallery__row--single {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Standard - 2 cards */
    .ats-gallery--standard.ats-gallery--count-2 .ats-gallery__row--single .ats-card {
        flex-grow: 1;
    }

    /* Standard - 3 cards */
    .ats-gallery--standard.ats-gallery--count-3 .ats-gallery__row--top .ats-card:first-child {
        flex-grow: 955;
    }

    .ats-gallery--standard.ats-gallery--count-3 .ats-gallery__row--top .ats-card:nth-child(2) {
        flex-grow: 427;
    }

    .ats-gallery--standard.ats-gallery--count-3 .ats-gallery__row--bottom .ats-card {
        flex-grow: 1;
    }

    /* Standard - 4 cards */
    .ats-gallery--standard.ats-gallery--count-4 .ats-gallery__row--top .ats-card:first-child {
        flex-grow: 955;
    }

    .ats-gallery--standard.ats-gallery--count-4 .ats-gallery__row--top .ats-card:nth-child(2) {
        flex-grow: 427;
    }

    .ats-gallery--standard.ats-gallery--count-4 .ats-gallery__row--bottom .ats-card:first-child {
        flex-grow: 715;
    }

    .ats-gallery--standard.ats-gallery--count-4 .ats-gallery__row--bottom .ats-card:nth-child(2) {
        flex-grow: 667;
    }

    /* Standard - 5 cards */
    .ats-gallery--standard.ats-gallery--count-5 .ats-gallery__row--top .ats-card:first-child {
        flex-grow: 955;
    }

    .ats-gallery--standard.ats-gallery--count-5 .ats-gallery__row--top .ats-card:nth-child(2) {
        flex-grow: 427;
    }

    .ats-gallery--standard.ats-gallery--count-5 .ats-gallery__row--bottom .ats-card:first-child {
        flex-grow: 337;
    }

    .ats-gallery--standard.ats-gallery--count-5 .ats-gallery__row--bottom .ats-card:nth-child(2) {
        flex-grow: 518;
    }

    .ats-gallery--standard.ats-gallery--count-5 .ats-gallery__row--bottom .ats-card:nth-child(3) {
        flex-grow: 517;
    }

    /* Standard - 6 cards */
    .ats-gallery--standard.ats-gallery--count-6 .ats-gallery__row--top .ats-card:first-child {
        flex-grow: 366;
    }

    .ats-gallery--standard.ats-gallery--count-6 .ats-gallery__row--top .ats-card:nth-child(2) {
        flex-grow: 640;
    }

    .ats-gallery--standard.ats-gallery--count-6 .ats-gallery__row--top .ats-card:nth-child(3) {
        flex-grow: 366;
    }

    .ats-gallery--standard.ats-gallery--count-6 .ats-gallery__row--bottom .ats-card:first-child {
        flex-grow: 457;
    }

    .ats-gallery--standard.ats-gallery--count-6 .ats-gallery__row--bottom .ats-card:nth-child(2) {
        flex-grow: 457;
    }

    .ats-gallery--standard.ats-gallery--count-6 .ats-gallery__row--bottom .ats-card:nth-child(3) {
        flex-grow: 457;
    }


}