/* =========================================================
   НАСТРОЙКИ
   ========================================================= */

:root {
    /* Карточки */
    --card-light-bg: #FFFAF4;
    --card-text-color: #171927;
    --card-text-hover: #FFFAF4;

    --card-gradient-height: 32%;
    --card-gradient-blur: 1px;

    /* Кнопка "Открыть" */
    --open-width: 104px;
    --open-height: 39px;
    --open-text-size: 12px;
    --open-text-weight: 500;
    --open-arrow-size: 18px;
    --open-gap: 10px;
    --open-bg: rgba(5, 5, 17, 0.50);
    --open-blur: 8px;
    --open-color: #FFFFFF;
    --open-font: var(--t-text-font, 'SuisseIntl', Arial, sans-serif);
}


/* =========================================================
   КАРТОЧКИ .cards
   ========================================================= */

.cards,
.example-cards {
    position: relative;
}

.cards .card-usluga {
    overflow: hidden;
}

.cards .card-usluga > .tn-atom {
    position: relative;
    overflow: hidden;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    isolation: isolate;
}

.bottom_border_link a.tn-atom {
    border-bottom: solid 1px;
}

/* Нижний градиент */

.cards .card-usluga > .tn-atom::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: var(--card-gradient-height);

    background: linear-gradient(
        to bottom,
        rgba(5, 5, 17, 0) 0%,
        rgba(5, 5, 17, 0.1) 30%,
        rgba(5, 5, 17, 0.5) 58%,
        rgba(5, 5, 17, 0.6) 80%,
        rgba(5, 5, 17, 0.7) 100%
    );

    backdrop-filter: blur(var(--card-gradient-blur));
    -webkit-backdrop-filter: blur(var(--card-gradient-blur));

    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.05) 18%,
        rgba(0, 0, 0, 0.18) 36%,
        rgba(0, 0, 0, 0.45) 58%,
        rgba(0, 0, 0, 0.78) 78%,
        rgba(0, 0, 0, 1) 100%
    );

    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.05) 18%,
        rgba(0, 0, 0, 0.18) 36%,
        rgba(0, 0, 0, 0.45) 58%,
        rgba(0, 0, 0, 0.78) 78%,
        rgba(0, 0, 0, 1) 100%
    );

    pointer-events: none;
    z-index: 2;

    opacity: 0;
    transition: opacity .3s ease;
}


/* Светлая подложка */

.cards .card-usluga > .tn-atom::after {
    content: "";
    position: absolute;
    inset: 0;

    background: var(--card-light-bg);

    pointer-events: none;
    z-index: 3;

    opacity: 1;
    transition: opacity .3s ease;
}


/* Текст */

.cards .card-title,
.cards .card-info {
    position: relative;
    z-index: 5 !important;
}

.cards .card-title .tn-atom,
.cards .card-info .tn-atom {
    color: var(--card-text-color) !important;
    transition: color .3s ease;
}

/* Плавная смена цвета и тени */
.uc-hovercards .cards .card-titles .tn-atom,
.uc-hovercards .cards .card-numb .tn-atom,
.uc-hovercards .cards .card-inform .tn-atom {
    transition:
        color 0.3s ease,
        text-shadow 0.3s ease;
}


/* На устройствах с мышкой */
@media (hover: hover) {

    .uc-hovercards .cards:hover .card-titles .tn-atom,
    .uc-hovercards .cards:hover .card-numb .tn-atom,
    .uc-hovercards .cards:hover .card-inform .tn-atom {
        color: #fff !important;

        /* Тень для читаемости */
        text-shadow:
            0 1px 2px rgba(0, 0, 0, 0.35),
            0 0 8px rgba(0, 0, 0, 0.18) !important;
    }
}


/* На телефонах — белый текст сразу */
@media (hover: none), (pointer: coarse) {

    .uc-hovercards .cards .card-titles .tn-atom,
    .uc-hovercards .cards .card-numb .tn-atom,
    .uc-hovercards .cards .card-inform .tn-atom {
        color: #fff !important;

        text-shadow:
            0 1px 2px rgba(0, 0, 0, 0.35),
            0 0 8px rgba(0, 0, 0, 0.18) !important;
    }
}


/* Desktop */

@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {

    .cards,
    .cards *,
    .example-cards,
    .example-cards * {
        cursor: none !important;
    }

    .cards:hover .card-usluga > .tn-atom::after {
        opacity: 0;
    }

    .cards:hover .card-usluga > .tn-atom::before {
        opacity: 1;
    }

    .cards:hover .card-title .tn-atom,
    .cards:hover .card-info .tn-atom {
        color: var(--card-text-hover) !important;
    }
}


/* Mobile / Tablet */

@media (max-width: 1024px), (hover: none), (pointer: coarse) {

    .cards .card-usluga > .tn-atom::after {
        opacity: 0;
    }

    .cards .card-usluga > .tn-atom::before {
        opacity: 1;
        height: 34%;

        backdrop-filter: blur(1px);
        -webkit-backdrop-filter: blur(1px);

        background: linear-gradient(
            to bottom,
            rgba(5, 5, 17, 0) 0%,
            rgba(5, 5, 17, 0.1) 30%,
            rgba(5, 5, 17, 0.5) 58%,
            rgba(5, 5, 17, 0.6) 80%,
            rgba(5, 5, 17, 0.7) 100%
        );
    }

    .cards .card-title .tn-atom,
    .cards .card-info .tn-atom {
        color: var(--card-text-hover) !important;
    }
}


/* =========================================================
   КНОПКА-КУРСОР "ОТКРЫТЬ"
   ========================================================= */

.card-open-cursor {
    position: fixed;
    left: 0;
    top: 0;

    width: var(--open-width);
    height: var(--open-height);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--open-gap);

    background: var(--open-bg);

    backdrop-filter: blur(var(--open-blur));
    -webkit-backdrop-filter: blur(var(--open-blur));

    color: var(--open-color);

    font-family: var(--open-font) !important;
    font-size: var(--open-text-size);
    font-weight: var(--open-text-weight);
    line-height: 1;

    pointer-events: none;
    z-index: 999999;

    opacity: 0;
    visibility: hidden;

    transform: translate(-50%, -50%) scale(.92);

    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s cubic-bezier(.22, .8, .3, 1);

    will-change: transform, left, top;
}

.card-open-cursor.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.card-open-cursor.is-visible.is-clicked {
    transform: translate(-50%, -50%) scale(.88);
}

.card-open-cursor__text {
    font-family: var(--open-font) !important;
    font-size: var(--open-text-size);
    font-weight: var(--open-text-weight);
    line-height: 1;
}

.card-open-cursor__arrow {
    width: var(--open-arrow-size);
    height: var(--open-arrow-size);

    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    transition: transform .18s cubic-bezier(.22, .8, .3, 1);
}

.card-open-cursor__arrow svg {
    display: block;
    width: 100%;
    height: 100%;
}

.card-open-cursor.is-clicked .card-open-cursor__arrow {
    transform: translate(-2px, -2px);
}

@media (max-width: 1024px), (hover: none), (pointer: coarse) {
    .card-open-cursor {
        display: none !important;
    }
}


/* =========================================================
   ГАЛЕРЕЯ
   ========================================================= */

.example-gallery {
    --gallery-indicator-height: 2px;
    --gallery-indicator-gap: 10px;

    --gallery-indicator-left: 10px;
    --gallery-indicator-right: 10px;
    --gallery-indicator-bottom: 10px;

    --gallery-indicator-active: #FFFFFF;
    --gallery-indicator-inactive: rgba(255, 255, 255, 0.35);
}

.example-gallery .t-slds__main {
    position: relative !important;
    overflow: hidden !important;
}

.example-gallery .t-slds__items-wrapper,
.example-gallery .t-slds__item {
    transition: none !important;
}


/* Плавная смена фото */

.example-gallery__fade-layer {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    opacity: 0;

    pointer-events: none;
    z-index: 5;

    will-change: opacity;
}


/* Индикаторы */

.example-gallery .t-slds__bullet_wrapper {
    position: absolute !important;

    display: flex !important;
    align-items: center !important;

    gap: var(--gallery-indicator-gap) !important;

    width: auto !important;

    left: var(--gallery-indicator-left) !important;
    right: var(--gallery-indicator-right) !important;
    bottom: var(--gallery-indicator-bottom) !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;

    pointer-events: none !important;
    z-index: 20 !important;
}

.example-gallery .t-slds__bullet {
    flex: 1 1 0 !important;

    width: auto !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    pointer-events: none !important;
}

.example-gallery .t-slds__bullet_body {
    display: block !important;

    width: 100% !important;
    height: var(--gallery-indicator-height) !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: var(--gallery-indicator-inactive) !important;
    background-image: none !important;

    opacity: 1 !important;

    transition: background-color .18s ease !important;
}

.example-gallery
.t-slds__bullet_active
.t-slds__bullet_body {
    background: var(--gallery-indicator-active) !important;
    background-image: none !important;
}


/* Стрелки Tilda */

.example-gallery .t-slds__arrow_container,
.example-gallery .t-slds__arrow_wrapper,
.example-gallery .t-slds__arrow,
.example-gallery .t-slds__arrow_body {
    pointer-events: none !important;
}

.example-gallery .t-slds__arrow {
    opacity: 0 !important;
}


/* Mobile Gallery */

@media screen and (max-width: 640px) {
    .example-gallery {
        --gallery-indicator-gap: 5px;

        --gallery-indicator-left: 10px;
        --gallery-indicator-right: 10px;
        --gallery-indicator-bottom: 8px;

        --gallery-indicator-height: 2px;
    }
}