/* USVI Hero Framework v1.7.0
 * The original theme owns the visual geometry. Core adds only framework,
 * state, accessibility, and context behavior.
 */

.usvi-hero {
    position: relative;
}

.usvi-hero.banner-sec {
    height: var(--usvi-hero-height, 966px);
}

.usvi-hero .usvi-hero-inner,
.usvi-hero .usvi-hero-main-slider,
.usvi-hero .bnnr-main-itm,
.usvi-hero .bnnr-main-innr {
    width: 100%;
    height: 100%;
}

.usvi-hero .usvi-hero-bg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.usvi-hero .usvi-hero-overlay {
    pointer-events: none;
}

/* Match the server-rendered first frame to Swiper's initial active state.
 * The theme animates inactive slide content 20px to the right; without this
 * rule the first slide visibly shifts when Swiper adds its active class. */
.usvi-hero.is-slider-hero .usvi-hero-main-slider:not(.swiper-initialized) .bnnr-main-itm:first-child .left-banner-part {
    -webkit-transform: translateX(0);
        -ms-transform: translateX(0);
            transform: translateX(0);
}

.usvi-hero .usvi-hero-breadcrumbs {
    position: relative;
    z-index: 4;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 600;
}

.usvi-hero .usvi-hero-breadcrumbs a {
    color: #fff;
    text-decoration: none;
}

.usvi-hero .usvi-hero-breadcrumbs a:hover,
.usvi-hero .usvi-hero-breadcrumbs a:focus-visible {
    text-decoration: underline;
}

.usvi-hero .usvi-hero-breadcrumbs span {
    display: inline-block;
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.68);
}

.usvi-hero .usvi-hero-breadcrumbs strong {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
}

.usvi-hero .usvi-hero-cta-wrap {
    margin-top: 28px;
}

.usvi-hero .usvi-hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.usvi-hero-align-center .usvi-hero-content {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.usvi-hero-align-right .usvi-hero-content {
    margin-left: auto;
    text-align: right;
}

.usvi-hero-align-center .banner-row {
    justify-content: center;
}

.usvi-hero-align-right .banner-row {
    justify-content: flex-end;
}

.usvi-hero .banner-slider-card {
    display: flex;
    color: inherit;
    text-decoration: none;
}

/* The original rail reserves its active slot for the main image and exposes
 * exactly the following two preview cards. PHP provides the same initial
 * classes; JS maintains them through initialization, loop fixes, and moves. */
.usvi-hero[data-usvi-hero-engine="original"] .banner-slider .each-banner-item {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: none !important;
}

.usvi-hero[data-usvi-hero-engine="original"] .banner-slider:not(.swiper-initialized) .each-banner-item {
    width: 33.333333%;
    flex: 0 0 33.333333%;
}

.usvi-hero[data-usvi-hero-engine="original"] .banner-slider .each-banner-item.is-usvi-preview-visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* The original negative margin expects a full carousel track. Keep short,
 * non-looping ACF preview sets inside the visible card container. */
.usvi-hero.has-few-preview-slides .banner-slider,
.usvi-hero.has-few-preview-slides .usvi-hero-preview-slider {
    margin-right: 0 !important;
}

.usvi-hero .usvi-hero-prev,
.usvi-hero .usvi-hero-next {
    padding: 0;
    cursor: pointer;
}

/* Keep the sole forward control centered on the left edge of the first
 * preview card without changing the card rail itself. */
.usvi-hero .banner-slider-arrow-wrp {
    top: calc(50% - 38.5px);
    right: auto;
    bottom: auto;
    left: calc(41.6667% + 10px);
    z-index: 4;
    transform: translate(-50%, -50%);
}

.usvi-hero .banner-slider-arrow-wrp > .slider-arrow {
    margin: 0;
}

.usvi-hero.is-static-hero .banner-slider-outer,
.usvi-hero.is-static-hero .banner-slider-arrow-wrp {
    display: none !important;
}

.usvi-hero.is-static-hero .usvi-hero-main-slider .swiper-wrapper {
    transform: none !important;
}

.usvi-hero.is-static-hero .usvi-hero-main-slider .swiper-slide:not(:first-child) {
    display: none !important;
}

.usvi-hero-island-st-thomas .usvi-hero-eyebrow,
.usvi-hero-island-st-john .usvi-hero-eyebrow,
.usvi-hero-island-st-croix .usvi-hero-eyebrow {
    letter-spacing: 0.04em;
}

@media (max-width: 991px) {
    .usvi-hero-align-right .usvi-hero-content,
    .usvi-hero-align-center .usvi-hero-content {
        margin-right: 0;
        margin-left: 0;
        text-align: left;
    }

    .usvi-hero-align-right .banner-row,
    .usvi-hero-align-center .banner-row {
        justify-content: flex-start;
    }
}
