/* =========================================================
   PGB Editorial Rotating Hero v1.3.1
   Editorial captions + responsive images + accessible controls
   + image-first mobile + smart autoplay + reduced motion
========================================================= */

.pgb-editorial-hero-v4 {
    --pgb-hero-height: 78vh;
    --pgb-mobile-image-height: 48vh;
    --pgb-slide-interval: 5600ms;
    --pgb-progress-duration: 5600ms;
    --pgb-panel-bg: #1b120e;
    --pgb-page-bg: #1b120e;
    --pgb-kicker: #b98245;
    --pgb-title: #ffffff;
    --pgb-description: #d8cec5;
    --pgb-frame: #ffffff;
    --pgb-primary-bg: #ffffff;
    --pgb-primary-text: #1b120e;
    --pgb-primary-border: #ffffff;
    --pgb-secondary-bg-rgb: 255,255,255;
    --pgb-secondary-text: #ffffff;
    --pgb-secondary-border: #ffffff;
    --pgb-counter-bg-rgb: 27,18,14;
    --pgb-counter-text: #ffffff;
    --pgb-counter-border: #ffffff;
    --pgb-overlay-rgb: 27,18,14;
    --pgb-overlay-opacity: .14;
    --pgb-accent: #b98245;
    --pgb-parallax-x: 0px;
    --pgb-parallax-y: 0px;

    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: var(--pgb-hero-height);
    display: grid;
    grid-template-columns: minmax(360px, 42%) minmax(0, 58%);
    background: var(--pgb-page-bg);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.pgb-editorial-hero-v4::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 22%, rgba(255,255,255,.045), transparent 28%),
        linear-gradient(135deg, rgba(255,255,255,.035), transparent 38%);
    opacity: .65;
}

.pgb-editorial-hero-v4.has-noise::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    opacity: .055;
    mix-blend-mode: soft-light;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.9) 0 1px, transparent 1px),
        radial-gradient(circle at 70% 60%, rgba(255,255,255,.7) 0 1px, transparent 1px);
    background-size: 19px 19px, 29px 29px;
}

.pgb-eh-v4__panel {
    position: relative;
    z-index: 6;
    min-height: var(--pgb-hero-height);
    padding: clamp(58px, 6vw, 98px) clamp(34px, 5.6vw, 98px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--pgb-panel-bg);
    color: var(--pgb-title);
}

.pgb-eh-v4__panel::before {
    content: "";
    position: absolute;
    inset: 14px;
    z-index: 5;
    pointer-events: none;
    border: 1px solid color-mix(in srgb, var(--pgb-frame) 72%, transparent);
    box-sizing: border-box;
}

.pgb-eh-v4__panel::after {
    content: "";
    position: absolute;
    right: -1px;
    top: 12%;
    bottom: 12%;
    width: 1px;
    z-index: 7;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--pgb-accent) 38%, transparent), transparent);
    opacity: .42;
}

.pgb-eh-v4__content {
    position: relative;
    z-index: 8;
    max-width: 680px;
}

.pgb-eh-v4__kicker,
.pgb-eh-v4__panel h1,
.pgb-eh-v4__panel p,
.pgb-eh-v4__actions {
    position: relative;
    z-index: 8;
    animation: pgbHeroContentIn .88s cubic-bezier(.16,1,.3,1) both;
}

.pgb-eh-v4__kicker {
    margin-bottom: 20px;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--pgb-kicker);
    animation-delay: .08s;
}

.pgb-eh-v4__panel h1 {
    margin: 0 0 24px;
    font-size: clamp(42px, 5.05vw, 80px);
    line-height: .94;
    letter-spacing: -.058em;
    font-weight: 880;
    color: var(--pgb-title);
    text-wrap: balance;
    animation-delay: .18s;
}

.pgb-eh-v4__panel p {
    max-width: 540px;
    margin: 0 0 36px;
    font-size: clamp(15px, 1.04vw, 17px);
    line-height: 1.72;
    font-weight: 400;
    color: var(--pgb-description);
    animation-delay: .28s;
}

.pgb-eh-v4__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    animation-delay: .38s;
}

.pgb-eh-v4__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 26px 0 28px;
    border-radius: 999px;
    text-decoration: none !important;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .115em;
    text-transform: uppercase;
    overflow: hidden;
    transform: translateZ(0);
    transition:
        transform .28s cubic-bezier(.16,1,.3,1),
        opacity .28s ease,
        background-color .28s ease,
        color .28s ease,
        border-color .28s ease;
}

.pgb-eh-v4__btn span,
.pgb-eh-v4__btn i {
    position: relative;
    z-index: 2;
}

.pgb-eh-v4__btn i {
    width: 18px;
    height: 1px;
    display: inline-block;
    background: currentColor;
    opacity: .82;
    transition: transform .32s cubic-bezier(.16,1,.3,1), width .32s cubic-bezier(.16,1,.3,1);
}

.pgb-eh-v4__btn i::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
}

.pgb-eh-v4__btn::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.28), transparent);
    transform: translateX(-130%);
    transition: transform .72s cubic-bezier(.16,1,.3,1);
}

.pgb-eh-v4__btn:hover {
    transform: translateY(-2px);
}

.pgb-eh-v4__btn:hover i {
    width: 24px;
    transform: translateX(2px);
}

.pgb-eh-v4__btn:hover::after {
    transform: translateX(130%);
}

.pgb-eh-v4__btn:focus-visible,
.pgb-eh-v4__control:focus-visible,
.pgb-eh-v4__caption-link:focus-visible {
    outline: 2px solid var(--pgb-accent);
    outline-offset: 4px;
}

.pgb-eh-v4__btn--primary {
    background: var(--pgb-primary-bg);
    color: var(--pgb-primary-text) !important;
    border: 1px solid var(--pgb-primary-border);
    box-shadow: 0 16px 38px rgba(0,0,0,.16);
}

.pgb-eh-v4__btn--secondary {
    background: rgba(var(--pgb-secondary-bg-rgb), .08);
    color: var(--pgb-secondary-text) !important;
    border: 1px solid color-mix(in srgb, var(--pgb-secondary-border) 30%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.pgb-eh-v4__btn--secondary:hover {
    background: rgba(var(--pgb-secondary-bg-rgb), .13);
    border-color: color-mix(in srgb, var(--pgb-secondary-border) 48%, transparent);
}

.pgb-eh-v4__visual {
    position: relative;
    z-index: 3;
    min-height: var(--pgb-hero-height);
    overflow: hidden;
    background: var(--pgb-page-bg);
    touch-action: pan-y;
}

.pgb-eh-v4__slides {
    position: absolute;
    inset: 0;
}

.pgb-eh-v4__slide {
    --pgb-slide-x: 50%;
    --pgb-slide-y: 50%;
    --pgb-slide-mobile-x: 50%;
    --pgb-slide-mobile-y: 50%;

    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(7%) scale(1.075);
    clip-path: inset(0 0 0 100%);
    filter: saturate(.92) contrast(.98);
    transition:
        clip-path 1.18s cubic-bezier(.16,1,.3,1),
        opacity .82s ease,
        transform 1.42s cubic-bezier(.16,1,.3,1),
        filter .82s ease;
    pointer-events: none;
}

.pgb-eh-v4__slide.is-active,
.pgb-eh-v4__slide.is-leaving {
    will-change: clip-path, opacity, transform;
}

/* Keep every image layer locked to the full visual stage.
   The extra specificity and !important declarations protect the hero
   against global theme rules such as img { height:auto; max-width:100%; }. */
.pgb-eh-v4__visual,
.pgb-eh-v4__slides,
.pgb-eh-v4__slide {
    height: 100%;
}

.pgb-editorial-hero-v4 .pgb-eh-v4__picture,
.pgb-editorial-hero-v4 .pgb-eh-v4__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.pgb-editorial-hero-v4 .pgb-eh-v4__picture {
    max-width: none !important;
}

.pgb-editorial-hero-v4 .pgb-eh-v4__image {
    min-height: 100%;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: var(--pgb-slide-x) var(--pgb-slide-y) !important;
    user-select: none;
    -webkit-user-drag: none;
}

.pgb-editorial-hero-v4.has-parallax .pgb-eh-v4__slide.is-active {
    transform: translate3d(var(--pgb-parallax-x), var(--pgb-parallax-y), 0) scale(1.025);
}

.pgb-eh-v4__slide.is-active {
    opacity: 1;
    transform: translateX(0) scale(1.015);
    clip-path: inset(0 0 0 0);
    filter: saturate(1) contrast(1);
    z-index: 2;
    pointer-events: auto;
}

.pgb-eh-v4__slide.is-leaving {
    opacity: 1;
    transform: translateX(-4%) scale(1.035);
    clip-path: inset(0 100% 0 0);
    z-index: 1;
}

.pgb-eh-v4__caption {
    position: absolute;
    left: clamp(28px, 4vw, 64px);
    bottom: clamp(30px, 4.4vw, 70px);
    z-index: 9;
    max-width: min(520px, 66%);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .52s ease .34s, transform .68s cubic-bezier(.16,1,.3,1) .28s;
}

.pgb-eh-v4__slide.is-active .pgb-eh-v4__caption {
    opacity: 1;
    transform: translateY(0);
}

.pgb-eh-v4__caption-link,
.pgb-eh-v4__caption-link:hover {
    color: inherit;
    text-decoration: none;
}

.pgb-eh-v4__caption-label {
    display: block;
    margin-bottom: 9px;
    color: rgba(255,255,255,.72);
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-shadow: 0 2px 18px rgba(0,0,0,.28);
}

.pgb-eh-v4__caption-title {
    display: block;
    color: #fff;
    font-size: clamp(20px, 2.15vw, 34px);
    line-height: 1.03;
    font-weight: 520;
    letter-spacing: -.045em;
    text-wrap: balance;
    text-shadow: 0 3px 24px rgba(0,0,0,.34);
}

.pgb-eh-v4__visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(var(--pgb-overlay-rgb), calc(var(--pgb-overlay-opacity) + .06)), rgba(var(--pgb-overlay-rgb), 0) 28%),
        linear-gradient(0deg, rgba(var(--pgb-overlay-rgb), calc(var(--pgb-overlay-opacity) + .06)), rgba(var(--pgb-overlay-rgb), 0) 58%);
}

.pgb-eh-v4__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(255,255,255,.035), transparent 34%),
        radial-gradient(circle at 82% 18%, rgba(255,255,255,.08), transparent 22%);
    mix-blend-mode: soft-light;
    opacity: .55;
}

.pgb-eh-v4__controls {
    position: absolute;
    right: 44px;
    bottom: 34px;
    z-index: 12;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    color: color-mix(in srgb, var(--pgb-counter-text) 84%, transparent);
    background: rgba(var(--pgb-counter-bg-rgb), .46);
    border: 1px solid color-mix(in srgb, var(--pgb-counter-border) 18%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 999px;
    padding: 5px 7px;
}

.pgb-eh-v4__current,
.pgb-eh-v4__total {
    min-width: 20px;
    text-align: center;
    font-size: 10px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: .12em;
}

.pgb-eh-v4__line {
    position: relative;
    width: 52px;
    height: 1px;
    margin: 0 3px;
    background: color-mix(in srgb, var(--pgb-counter-text) 28%, transparent);
    overflow: hidden;
}

.pgb-eh-v4__line b {
    position: absolute;
    inset: 0 auto 0 0;
    width: 100%;
    background: var(--pgb-accent);
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0;
}

.pgb-editorial-hero-v4.has-progress .pgb-eh-v4__line b.is-running {
    opacity: 1;
    animation: pgbHeroProgress var(--pgb-progress-duration) linear forwards;
}

.pgb-eh-v4__control {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background-color .22s ease, color .22s ease, transform .22s ease, opacity .22s ease;
}

.pgb-eh-v4__control:hover {
    background: rgba(255,255,255,.1);
    color: var(--pgb-counter-text);
}

.pgb-eh-v4__control:active {
    transform: scale(.94);
}

.pgb-eh-v4__control svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pgb-eh-v4__toggle .pgb-icon-play {
    display: none;
    fill: currentColor;
    stroke: none;
}

.pgb-eh-v4__toggle[aria-pressed="true"] .pgb-icon-pause {
    display: none;
}

.pgb-eh-v4__toggle[aria-pressed="true"] .pgb-icon-play {
    display: block;
}

.pgb-editorial-hero-v4.is-single-slide .pgb-eh-v4__controls {
    display: none;
}

.pgb-editorial-hero-v4.has-reduced-motion .pgb-eh-v4__toggle {
    opacity: .48;
    cursor: default;
}

.elementor-widget-shortcode .pgb-editorial-hero-v4,
.elementor-shortcode .pgb-editorial-hero-v4 {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

@keyframes pgbHeroContentIn {
    from {
        opacity: 0;
        transform: translateY(18px);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes pgbHeroProgress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (max-width: 1024px) {
    .pgb-editorial-hero-v4 {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .pgb-eh-v4__visual {
        min-height: var(--pgb-mobile-image-height);
        order: 1;
    }

    .pgb-eh-v4__panel {
        min-height: auto;
        padding: 52px 32px 62px;
        order: 2;
    }

    .pgb-eh-v4__panel::before {
        inset: 12px;
    }

    .pgb-eh-v4__panel::after {
        display: none;
    }

    .pgb-editorial-hero-v4 .pgb-eh-v4__image {
        object-position: var(--pgb-slide-mobile-x) var(--pgb-slide-mobile-y) !important;
    }

    .pgb-eh-v4__controls {
        right: 28px;
        bottom: 26px;
    }

    .pgb-eh-v4__caption {
        left: 30px;
        bottom: 82px;
        max-width: min(520px, 72%);
    }
}

@media (max-width: 767px) {
    .pgb-eh-v4__panel {
        padding: 46px 26px 52px;
    }

    .pgb-eh-v4__panel::before {
        inset: 8px;
        border-color: color-mix(in srgb, var(--pgb-frame) 58%, transparent);
    }

    .pgb-eh-v4__kicker {
        font-size: 10px;
        margin-bottom: 16px;
        letter-spacing: .2em;
    }

    .pgb-eh-v4__panel h1 {
        font-size: clamp(38px, 12vw, 46px);
        line-height: .96;
        letter-spacing: -.048em;
        margin-bottom: 20px;
    }

    .pgb-eh-v4__panel p {
        font-size: 15px;
        line-height: 1.66;
        margin-bottom: 30px;
    }

    .pgb-eh-v4__actions,
    .pgb-eh-v4__btn {
        width: 100%;
    }

    .pgb-eh-v4__btn {
        min-height: 50px;
    }

    .pgb-eh-v4__slide {
        transform: scale(1.035);
        clip-path: none;
        filter: none;
        transition: opacity .62s ease, transform 1s cubic-bezier(.16,1,.3,1);
    }

    .pgb-eh-v4__slide.is-active {
        transform: scale(1);
        clip-path: none;
    }

    .pgb-eh-v4__slide.is-leaving {
        opacity: 0;
        transform: scale(1.02);
        clip-path: none;
    }

    .pgb-eh-v4__caption {
        left: 22px;
        bottom: 76px;
        max-width: calc(100% - 44px);
    }

    .pgb-eh-v4__caption-label {
        font-size: 9px;
    }

    .pgb-eh-v4__caption-title {
        font-size: clamp(19px, 6.2vw, 28px);
        max-width: 85%;
    }

    .pgb-eh-v4__controls {
        right: 16px;
        bottom: 18px;
        gap: 5px;
    }

    .pgb-eh-v4__line {
        width: 42px;
    }
}

@media (max-width: 420px) {
    .pgb-eh-v4__panel {
        padding-left: 22px;
        padding-right: 22px;
    }

    .pgb-eh-v4__caption {
        left: 18px;
        max-width: calc(100% - 36px);
    }

    .pgb-eh-v4__controls {
        right: 12px;
    }

    .pgb-eh-v4__prev,
    .pgb-eh-v4__next {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pgb-eh-v4__slide,
    .pgb-eh-v4__caption,
    .pgb-eh-v4__btn,
    .pgb-eh-v4__btn i,
    .pgb-eh-v4__kicker,
    .pgb-eh-v4__panel h1,
    .pgb-eh-v4__panel p,
    .pgb-eh-v4__actions,
    .pgb-eh-v4__line b {
        transition: none !important;
        animation: none !important;
        filter: none !important;
    }

    .pgb-eh-v4__slide {
        clip-path: none !important;
        transform: none !important;
    }

    .pgb-eh-v4__slide.is-active {
        opacity: 1;
    }

    .pgb-eh-v4__slide:not(.is-active) {
        opacity: 0;
    }
}
