/*
 * EIT.KG
 * Интерактивность страницы цифрового продукта.
 *
 * Содержит:
 *
 * 1. резервный native sticky;
 * 2. подготовку колонки для управляемого sticky;
 * 3. hover основных возможностей;
 * 4. hover аудиторий;
 * 5. hover технологического контура.
 */


/* =========================================================
   1. Рабочая область боковой карточки
   ========================================================= */

.product-detail-content,
.product-detail-content > .container-xl,
.product-detail-content > .container-xl > .row,
.product-detail-sidebar-column {
    overflow: visible !important;
}

.product-detail-content
> .container-xl
> .row {
    align-items: stretch !important;
}

.product-detail-sidebar-column {
    position: relative;

    align-self: stretch !important;

    min-width: 0;
}


/* =========================================================
   2. Sticky-оболочка
   ========================================================= */

/*
 * Native sticky остаётся резервным вариантом,
 * когда JavaScript отключён.
 *
 * После запуска JavaScript он устанавливает
 * inline position: relative и перемещает карточку
 * через translate3d.
 */
.product-detail-sidebar-wrap {
    position: sticky;
    top: 96px;
    z-index: 5;

    align-self: flex-start;

    width: 100%;
    height: fit-content;

    backface-visibility: hidden;
    transform: translateZ(0);
}

.product-detail-sidebar-wrap
.product-detail-sidebar {
    position: static;
    top: auto;

    width: 100%;
}


/* =========================================================
   3. Основные возможности продукта
   ========================================================= */

.product-feature-card {
    transition:
        background-color var(--eit-transition),
        border-color var(--eit-transition),
        box-shadow var(--eit-transition),
        transform var(--eit-transition);
}

.product-feature-card:hover {
    background:
        rgba(0, 184, 176, 0.045);

    border-color:
        rgba(0, 184, 176, 0.22);

    box-shadow:
        0 15px 32px rgba(7, 69, 83, 0.08);

    transform: translateY(-4px);
}

.product-feature-card > span {
    transition:
        color var(--eit-transition),
        background-color var(--eit-transition),
        box-shadow var(--eit-transition);
}

.product-feature-card:hover > span {
    color: #ffffff;

    background: var(--eit-gradient-brand);

    box-shadow:
        0 8px 18px rgba(0, 184, 176, 0.2);
}


/* =========================================================
   4. Аудитории продукта
   ========================================================= */

.product-audience-list span {
    transition:
        color var(--eit-transition),
        background-color var(--eit-transition),
        border-color var(--eit-transition),
        box-shadow var(--eit-transition),
        transform var(--eit-transition);
}

.product-audience-list span:hover {
    color: var(--eit-teal-700);

    background:
        rgba(0, 184, 176, 0.065);

    border-color:
        rgba(0, 184, 176, 0.22);

    box-shadow:
        0 10px 24px rgba(7, 69, 83, 0.07);

    transform: translateY(-3px);
}


/* =========================================================
   5. Технологический контур
   ========================================================= */

.product-technology-list span {
    position: relative;
    isolation: isolate;

    overflow: hidden;

    cursor: default;

    transition:
        color var(--eit-transition),
        background-color var(--eit-transition),
        border-color var(--eit-transition),
        box-shadow var(--eit-transition),
        transform var(--eit-transition);
}

.product-technology-list span::before {
    content: "";

    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;

    width: 0;
    height: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle,
            rgba(0, 216, 199, 0.18),
            transparent 70%
        );

    border-radius: 50%;

    opacity: 0;

    transform:
        translate(-50%, -50%);

    transition:
        width 0.35s ease,
        height 0.35s ease,
        opacity 0.35s ease;
}

.product-technology-list span:hover {
    color: var(--eit-teal-700);

    background:
        rgba(0, 216, 199, 0.1);

    border-color:
        rgba(0, 184, 176, 0.32);

    box-shadow:
        0 12px 28px rgba(7, 69, 83, 0.1);

    transform: translateY(-4px);
}

.product-technology-list span:hover::before {
    width: 180px;
    height: 180px;

    opacity: 1;
}


/* =========================================================
   6. Планшеты и телефоны
   ========================================================= */

@media (max-width: 1199.98px) {
    .product-detail-sidebar-column {
        align-self: auto !important;

        min-height: 0 !important;
    }

    .product-detail-sidebar-wrap {
        position: static;
        top: auto;

        width: 100%;

        transform: none !important;
    }
}


/* =========================================================
   7. Сенсорные устройства
   ========================================================= */

@media (hover: none) {
    .product-feature-card:hover,
    .product-audience-list span:hover,
    .product-technology-list span:hover {
        transform: none;
    }
}


/* =========================================================
   8. Ограничение движения
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .product-feature-card,
    .product-feature-card > span,
    .product-audience-list span,
    .product-technology-list span,
    .product-technology-list span::before {
        transition: none;
    }

    .product-feature-card:hover,
    .product-audience-list span:hover,
    .product-technology-list span:hover {
        transform: none;
    }
}


/* =========================================================
   9. Браузеры без native sticky
   ========================================================= */

@supports not (position: sticky) {
    .product-detail-sidebar-wrap {
        position: relative;
        top: auto;
    }
}