/*
 * Основной фоновый концепт главного экрана и служебный режим сравнения.
 * Панель сравнения включается только при параметре ?hero=original|gasholder|installation.
 */

.hero-concept-toolbar {
    position: absolute;
    z-index: 6;
    top: 18px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 32px);
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(7, 17, 31, 0.86);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    transform: translateX(-50%);
}

.hero-concept-toolbar__label {
    padding: 0 10px;
    color: rgba(219, 234, 254, 0.74);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hero-concept-toolbar button {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #dbeafe;
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition:
        color 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease;
}

.hero-concept-toolbar button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.hero-concept-toolbar button:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.8);
    outline-offset: 2px;
}

.hero-concept-toolbar button[aria-pressed="true"] {
    color: #ffffff;
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.92), rgba(245, 158, 11, 0.78));
}

body.hero-concept-preview .hero-inner {
    padding-top: 108px;
}

body.hero-concept-active .hero {
    min-height: clamp(700px, calc(100svh - 74px), 900px);
    isolation: isolate;
    background-color: transparent;
}

body.hero-concept-active .hero::before,
body.hero-concept-active .hero::after {
    content: "";
    position: absolute;
    inset: 0 0 -1px;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 76%,
        rgba(0, 0, 0, 0.88) 83%,
        rgba(0, 0, 0, 0.48) 92%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 76%,
        rgba(0, 0, 0, 0.88) 83%,
        rgba(0, 0, 0, 0.48) 92%,
        transparent 100%
    );
}

body.hero-concept-active .hero::before {
    z-index: 0;
    background-color: #07111f;
    background-image: var(--hero-concept-image);
    background-repeat: no-repeat;
    background-position: var(--hero-concept-position, center center);
    background-size: cover;
}

body.hero-concept-active .hero::after {
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(3, 10, 22, 0.98) 0%, rgba(3, 10, 22, 0.9) 34%, rgba(3, 10, 22, 0.48) 56%, rgba(3, 10, 22, 0.08) 100%),
        linear-gradient(180deg, rgba(7, 17, 31, 0.18) 0%, transparent 56%, rgba(7, 17, 31, 0.42) 100%);
}

body.hero-concept--gasholder {
    --hero-concept-image: url("/assets/images/hero-concepts/home-gasholder-1672.webp");
    --hero-concept-position: center center;
}

body.hero-concept--installation {
    --hero-concept-image: url("/assets/images/hero-concepts/home-installation-1672.webp");
    --hero-concept-position: center center;
}

body.hero-concept-active .hero-inner {
    z-index: 2;
    grid-template-columns: minmax(0, 720px);
    justify-content: start;
    align-items: center;
}

body.hero-concept-active .hero-copy {
    position: relative;
    max-width: 720px;
    text-shadow: 0 3px 28px rgba(0, 0, 0, 0.58);
}

body.hero-concept-active .hero-badge {
    color: #eff6ff;
    border-color: rgba(191, 219, 254, 0.26);
    background: rgba(30, 64, 175, 0.34);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
}

body.hero-concept-active .hero p {
    color: rgba(226, 232, 240, 0.94);
}

body.hero-concept-active .hero-offer-panel {
    display: none;
}

@media (max-width: 1180px) {
    body.hero-concept-active .hero-inner {
        grid-template-columns: minmax(0, 680px);
    }
}

@media (max-width: 760px) {
    .hero-concept-toolbar {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
        overflow-x: auto;
        justify-content: flex-start;
        transform: none;
        scrollbar-width: none;
    }

    .hero-concept-toolbar::-webkit-scrollbar {
        display: none;
    }

    .hero-concept-toolbar__label {
        display: none;
    }

    .hero-concept-toolbar button {
        flex: 1 0 auto;
    }

    body.hero-concept-preview .hero-inner {
        padding-top: 92px;
    }

    body.hero-concept-active .hero {
        min-height: max(940px, calc(100svh - 68px));
    }

    body.hero-concept-active .hero::before {
        background-size: auto 62%;
        background-position: var(--hero-concept-mobile-position, 70% 100%);
    }

    body.hero-concept-active .hero::after {
        background:
            linear-gradient(180deg, rgba(3, 10, 22, 0.98) 0%, rgba(3, 10, 22, 0.94) 54%, rgba(3, 10, 22, 0.58) 72%, rgba(3, 10, 22, 0.16) 100%),
            linear-gradient(90deg, rgba(3, 10, 22, 0.7), rgba(3, 10, 22, 0.12));
    }

    body.hero-concept--gasholder {
        --hero-concept-image: url("/assets/images/hero-concepts/home-gasholder-960.webp");
        --hero-concept-mobile-position: 72% 100%;
    }

    body.hero-concept--installation {
        --hero-concept-image: url("/assets/images/hero-concepts/home-installation-960.webp");
        --hero-concept-mobile-position: 72% 100%;
    }

    body.hero-concept-active .hero-inner {
        display: block;
    }

    body.hero-concept-active .hero-copy {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-concept-toolbar button {
        transition: none;
    }
}
