.confits-hero-v4 {
    position: relative;
    width: var(--chv4-desktop-width, 100%);
    height: var(--chv4-desktop-height, 650px);
    overflow: hidden;
    background: #111;
    isolation: isolate;
}

.confits-hero-v4--full {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.confits-hero-v4--contained {
    width: min(100%, var(--wp--style--global--content-size, 1200px));
    margin-inline: auto;
}

.confits-hero-v4--custom {
    width: var(--chv4-custom-width, 100%);
    max-width: var(--chv4-custom-max-width, 1440px);
    margin-inline: auto;
}

.confits-hero-v4__viewport,
.confits-hero-v4__slide {
    position: absolute;
    inset: 0;
}

.confits-hero-v4__slide {
    opacity: 0;
    visibility: hidden;
    background-image: var(--chv4-bg-desktop);
    background-position: var(--chv4-bg-x-desktop, 50%) var(--chv4-bg-y-desktop, 50%);
    background-size: cover;
    background-repeat: no-repeat;
    transition:
        opacity var(--chv4-transition, 800ms) ease,
        visibility var(--chv4-transition, 800ms) ease;
}

.confits-hero-v4__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.confits-hero-v4--fade .confits-hero-v4__slide.was-active {
    opacity: 0;
}

.confits-hero-v4__overlay {
    position: absolute;
    inset: 0;
    background: rgb(var(--chv4-overlay, 0, 0, 0) / var(--chv4-overlay-opacity, 0.22));
    pointer-events: none;
    z-index: 1;
}

.confits-hero-v4__layer {
    position: absolute;
    left: var(--chv4-x-desktop);
    top: var(--chv4-y-desktop);
    width: var(--chv4-w-desktop);
    min-height: var(--chv4-h-desktop);
    transform: translate(-50%, -50%);
    z-index: var(--chv4-z, 20);
    opacity: 0;
    animation-duration: var(--chv4-duration, 700ms);
    animation-delay: var(--chv4-delay, 0ms);
    animation-fill-mode: both;
    animation-timing-function: ease;
}

.confits-hero-v4__slide.is-active .confits-hero-v4__layer {
    animation-name: chv4-fade;
}

.confits-hero-v4__slide.is-active .confits-hero-v4__layer[data-animation="fade-up"] {
    animation-name: chv4-fade-up;
}

.confits-hero-v4__slide.is-active .confits-hero-v4__layer[data-animation="fade-down"] {
    animation-name: chv4-fade-down;
}

.confits-hero-v4__slide.is-active .confits-hero-v4__layer[data-animation="fade-left"] {
    animation-name: chv4-fade-left;
}

.confits-hero-v4__slide.is-active .confits-hero-v4__layer[data-animation="fade-right"] {
    animation-name: chv4-fade-right;
}

.confits-hero-v4__slide.is-active .confits-hero-v4__layer[data-animation="zoom"] {
    animation-name: chv4-zoom;
}

.confits-hero-v4__layer--text {
    color: var(--chv4-color, #fff);
    font-family: var(--chv4-font-family, system-ui, sans-serif);
    font-size: var(--chv4-font-size-desktop, 72px);
    font-weight: var(--chv4-font-weight, 700);
    line-height: var(--chv4-line-height, 1.05);
    letter-spacing: var(--chv4-letter-spacing, 0);
    text-align: center;
    white-space: pre-line;
    text-wrap: balance;
    text-shadow: 0 3px 18px rgb(0 0 0 / 0.32);
}

.confits-hero-v4__layer--logo img {
    display: block;
    width: 100%;
    height: auto;
}

.confits-hero-v4-admin-notice {
    width: min(100% - 32px, 960px);
    margin: 24px auto;
    padding: 14px 16px;
    border-left: 4px solid #d63638;
    background: #fff5f5;
    color: #3c1f1f;
    font-size: 16px;
}

@keyframes chv4-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes chv4-fade-up {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 28px)); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes chv4-fade-down {
    from { opacity: 0; transform: translate(-50%, calc(-50% - 28px)); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes chv4-fade-left {
    from { opacity: 0; transform: translate(calc(-50% + 28px), -50%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes chv4-fade-right {
    from { opacity: 0; transform: translate(calc(-50% - 28px), -50%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes chv4-zoom {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.88); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 1024px) {
    .confits-hero-v4 {
        width: var(--chv4-tablet-width, 100%);
        height: var(--chv4-tablet-height, 520px);
    }

    .confits-hero-v4--full {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }

    .confits-hero-v4__slide {
        background-image: var(--chv4-bg-tablet);
        background-position: var(--chv4-bg-x-tablet, 50%) var(--chv4-bg-y-tablet, 50%);
    }

    .confits-hero-v4__layer {
        left: var(--chv4-x-tablet);
        top: var(--chv4-y-tablet);
        width: var(--chv4-w-tablet);
        min-height: var(--chv4-h-tablet);
    }

    .confits-hero-v4__layer--text {
        font-size: var(--chv4-font-size-tablet, 52px);
    }
}

@media (max-width: 767px) {
    .confits-hero-v4 {
        width: var(--chv4-mobile-width, 100%);
        height: var(--chv4-mobile-height, 420px);
    }

    .confits-hero-v4--full {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }

    .confits-hero-v4__slide {
        background-image: var(--chv4-bg-mobile);
        background-position: var(--chv4-bg-x-mobile, 50%) var(--chv4-bg-y-mobile, 50%);
    }

    .confits-hero-v4__layer {
        left: var(--chv4-x-mobile);
        top: var(--chv4-y-mobile);
        width: var(--chv4-w-mobile);
        min-height: var(--chv4-h-mobile);
    }

    .confits-hero-v4__layer--text {
        font-size: var(--chv4-font-size-mobile, 36px);
    }
}
