.tp-pattern-series-card__thumb {
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.tp-pattern-series-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition:
            transform .6s ease,
            filter .4s ease;
}

/*
 * Overlay cez celý obrázok.
 */
.tp-pattern-series-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;

    pointer-events: none;
    transition: background .35s ease;
}

/*
 * Názov radu vpravo hore.
 */
.tp-pattern-series-card__title {
    position: absolute;
    top: 20px;
    right: 20px;
    margin: 0;
    color: var(--tp-theme-color);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
    text-align: right;
    transition:
            transform .35s ease,
            opacity .35s ease;
}

/*
 * CTA presne v strede.
 * Pred hoverom je skryté.
 */
.tp-pattern-series-card__action {
    position: absolute;
    top: 50%;
    left: 50%;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 14px 22px;

    color: #fff;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 999px;

    opacity: 0;
    visibility: hidden;

    transform: translate(-50%, -40%);

    transition:
            opacity .3s ease,
            visibility .3s ease,
            transform .3s ease,
            background .3s ease;
}

.tp-pattern-series-card__action svg {
    flex: 0 0 auto;
}

/*
 * Hover.
 */
.tp-pattern-series-card__link:hover
.tp-pattern-series-card__image {
    transform: scale(1.045);
}

.tp-pattern-series-card__link:hover
.tp-pattern-series-card__overlay {
    background: rgba(0, 0, 0, .05);
}

.tp-pattern-series-card__link:hover
.tp-pattern-series-card__action {
    opacity: 1;
    visibility: visible;

    transform: translate(-50%, -50%);
}

.tp-pattern-series-card__link:hover
.tp-pattern-series-card__title {
    transform: translateY(-3px);
}

/*
 * Klávesnicový focus.
 */
.tp-pattern-series-card__link:focus-visible
.tp-pattern-series-card__action {
    opacity: 1;
    visibility: visible;

    transform: translate(-50%, -50%);
}

/*
 * Mobil: hover neexistuje, preto CTA zobrazíme stále.
 */
@media (max-width: 767px) {
    .tp-project-gallery-area .tp-about-content,
    .tp-project-gallery-area .tp-about-deg {
        width: 100%;
        margin-right: auto;
        margin-left: auto;
        text-align: center;
    }

    .tp-project-gallery-area .js-pattern-series-swiper {
        margin-right: 0;
        margin-left: 0;
    }

    .tp-pattern-series-card {
        width: 100%;
        margin-right: auto;
        margin-left: auto;
    }

    .tp-pattern-series-card__title {
        top: 20px;
        right: 20px;

        font-size: 24px;
    }

    .tp-pattern-series-card__action {
        opacity: 1;
        visibility: visible;

        padding: 12px 18px;

        transform: translate(-50%, -50%);
    }

    .tp-pattern-series-card__image {
        filter: brightness(.8);
    }
}

@media (max-width: 575px) {
    .tp-pattern-series-card__title {
        top: 14px;
        right: 14px;
        left: 14px;
        font-size: 20px;
    }

    .tp-pattern-series-card__action {
        width: max-content;
        max-width: calc(100% - 28px);
        padding: 10px 15px;
        font-size: 14px;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
    }
}
