/*
 * Higold Video Category Section
 * Version 1.2.0
 * All selectors are scoped with the hgvd- prefix.
 */

.hgvd-category-hero,
.hgvd-category-hero *,
.hgvd-category-hero *::before,
.hgvd-category-hero *::after {
    box-sizing: border-box;
}

.hgvd-category-hero {
    --hgvd-blue: #2b4f84;
    --hgvd-panel: rgba(20, 23, 25, 0.34);
    --hgvd-line: rgba(255, 255, 255, 0.28);
    --hgvd-text: #ffffff;
    --hgvd-speed: 700ms;
    --hgvd-ease: cubic-bezier(0.22, 1, 0.36, 1);

    position: relative;
    display: block;
    width: 100%;
    max-width: none;
    height: var(--hgvd-custom-height, clamp(610px, 79vh, 860px));
    min-height: 610px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    background: #111;
    color: var(--hgvd-text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.2;
    user-select: none;
    -webkit-user-select: none;
}

.hgvd-category-hero button,
.hgvd-category-hero a {
    font: inherit;
    text-decoration: none;
}

.hgvd-category-hero button {
    margin: 0 !important;
    appearance: none;
    -webkit-appearance: none;
}

.hgvd-slides,
.hgvd-slide {
    position: absolute;
    inset: 0;
}

.hgvd-slide {
    z-index: 1;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.035);
    background-color: #171717;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    transition:
        opacity var(--hgvd-speed) ease,
        transform 1300ms var(--hgvd-ease),
        visibility var(--hgvd-speed);
    will-change: opacity, transform;
}

.hgvd-slide.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hgvd-flash {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background: #fff;
    opacity: 0;
}

.hgvd-category-hero.is-changing .hgvd-flash {
    animation: hgvdFlash 700ms ease both;
}

@keyframes hgvdFlash {
    0% { opacity: 0; }
    34% { opacity: 0.88; }
    100% { opacity: 0; }
}

.hgvd-shade {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.12), transparent 48%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.18), transparent 48%);
}

/* Four categories fill one equal row on desktop. */
.hgvd-dock-wrap {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    height: 85px;
    transition: transform 0.48s var(--hgvd-ease);
}

.hgvd-category-hero.is-collapsed .hgvd-dock-wrap {
    transform: translateY(calc(100% - 64px));
}

.hgvd-dock {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: visible;
    background: var(--hgvd-panel);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.hgvd-rail-window,
.hgvd-rail {
    width: 100%;
    height: 100%;
}

.hgvd-rail-window {
    overflow: hidden;
}

.hgvd-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
}

.hgvd-category-hero button.hgvd-category {
    position: relative;
    display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    width: 100% !important;
    min-width: 0;
    min-height: 0 !important;
    padding: 0px 13px !important;
    border: 0 !important;
    border-right: 1px solid var(--hgvd-line) !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #fff !important;
    text-align: left !important;
    text-decoration: none !important;
    text-transform: none !important;
    cursor: pointer;
    overflow: hidden;
    transition: background-color 0.28s ease, color 0.22s ease !important;
}

.hgvd-category-hero button.hgvd-category:last-child {
    border-right: 0 !important;
}

/* Hover is visual only. The image changes only on click. */
.hgvd-category-hero button.hgvd-category:hover,
.hgvd-category-hero button.hgvd-category:focus-visible {
    background: rgba(43, 79, 132, 0.38) !important;
    color: #fff !important;
}

.hgvd-category-hero button.hgvd-category.is-active,
.hgvd-category-hero button.hgvd-category.is-active:hover,
.hgvd-category-hero button.hgvd-category.is-active:focus-visible {
    background: var(--hgvd-blue) !important;
    color: #fff !important;
}

.hgvd-category-hero .hgvd-icon {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    color: #fff !important;
    opacity: 0.96;
    transition: transform 0.3s var(--hgvd-ease), opacity 0.2s ease;
}

.hgvd-category-hero button.hgvd-category:hover .hgvd-icon,
.hgvd-category-hero button.hgvd-category.is-active .hgvd-icon {
    transform: translateY(-1px);
}

.hgvd-category-hero .hgvd-icon svg {
    display: block;
    width: 62px;
    height: 62px;
    overflow: visible;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hgvd-category-hero .hgvd-icon svg * {
    fill: none !important;
    stroke: currentColor !important;
}

.hgvd-category-hero .hgvd-label {
    display: block;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: clamp(14px, 1.05vw, 19px) !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 1.28 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    text-shadow: none !important;
    text-transform: uppercase !important;
    white-space: normal;
}

.hgvd-collapse {
    position: absolute;
    top: -64px;
    right: 0;
    z-index: 30;
    display: grid !important;
    width: 64px !important;
    height: 64px !important;
    place-items: center;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: rgba(43, 79, 132, 0.78) !important;
    color: #fff !important;
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.hgvd-collapse svg {
    display: block;
    width: 34px;
    height: 34px;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.65;
    transition: transform 0.42s var(--hgvd-ease);
}

.hgvd-category-hero.is-collapsed .hgvd-collapse svg {
    transform: rotate(180deg);
}

@media (max-width: 1050px) {
    .hgvd-category-hero {
        height: var(--hgvd-custom-height, clamp(560px, 74vh, 760px));
        min-height: 560px;
    }

    .hgvd-dock-wrap {
        height: 220px;
    }

    .hgvd-category-hero.is-collapsed .hgvd-dock-wrap {
        transform: translateY(calc(100% - 54px));
    }

    .hgvd-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }

    .hgvd-category-hero button.hgvd-category {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 13px;
        padding: 18px 24px !important;
        border-right: 1px solid var(--hgvd-line) !important;
        border-bottom: 1px solid var(--hgvd-line) !important;
    }

    .hgvd-category-hero button.hgvd-category:nth-child(2n) {
        border-right: 0 !important;
    }

    .hgvd-category-hero button.hgvd-category:nth-child(n + 3) {
        border-bottom: 0 !important;
    }

    .hgvd-category-hero .hgvd-icon {
        width: 56px;
        height: 56px;
    }

    .hgvd-category-hero .hgvd-icon svg {
        width: 52px;
        height: 52px;
    }

    .hgvd-category-hero .hgvd-label {
        font-size: 16px !important;
    }

    .hgvd-collapse {
        top: -54px;
        width: 54px !important;
        height: 54px !important;
    }
}

@media (max-width: 680px) {
    .hgvd-category-hero {
        height: var(--hgvd-mobile-custom-height, 640px);
        min-height: var(--hgvd-mobile-custom-height, 640px);
    }

    .hgvd-slide {
        background-position: 62% center;
    }

    .hgvd-dock-wrap {
        height: 236px;
    }

    .hgvd-category-hero button.hgvd-category {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 10px;
        padding: 14px 12px !important;
    }

    .hgvd-category-hero .hgvd-icon {
        width: 46px;
        height: 46px;
    }

    .hgvd-category-hero .hgvd-icon svg {
        width: 43px;
        height: 43px;
    }

    .hgvd-category-hero .hgvd-label {
        font-size: 12px !important;
        line-height: 1.25 !important;
    }

    .hgvd-collapse {
        top: -48px;
        width: 48px !important;
        height: 48px !important;
    }

    .hgvd-category-hero.is-collapsed .hgvd-dock-wrap {
        transform: translateY(calc(100% - 48px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .hgvd-category-hero *,
    .hgvd-category-hero *::before,
    .hgvd-category-hero *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
