/**
 * MPR Banner Revolution - Frontend Styles
 * v2.0 — Smooth transitions, Ken Burns, progress bar, content entrance
 */

/* =========================================================================
   BOOTSTRAP CAROUSEL TRANSITIONS
   Hummingbird puts these in @layer bs-components, which loses to unlayered
   CSS. We duplicate them here so transitions actually work.
   ========================================================================= */

.mpr-banner-revolution .carousel-item {
    display: none;
    position: relative;
    float: left;
    width: 100%;
    margin-right: -100%;
    backface-visibility: hidden;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: transparent;
}

.mpr-banner-revolution .carousel-item.active,
.mpr-banner-revolution .carousel-item-next,
.mpr-banner-revolution .carousel-item-prev {
    display: block;
}

.mpr-banner-revolution .carousel-item-next:not(.carousel-item-start),
.mpr-banner-revolution .active.carousel-item-end {
    transform: translateX(100%);
}

.mpr-banner-revolution .carousel-item-prev:not(.carousel-item-end),
.mpr-banner-revolution .active.carousel-item-start {
    transform: translateX(-100%);
}

/* Fade variant */
.mpr-banner-revolution .carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: none;
}

.mpr-banner-revolution .carousel-fade .carousel-item.active,
.mpr-banner-revolution .carousel-fade .carousel-item-next.carousel-item-start,
.mpr-banner-revolution .carousel-fade .carousel-item-prev.carousel-item-end {
    z-index: 1;
    opacity: 1;
}

.mpr-banner-revolution .carousel-fade .active.carousel-item-start,
.mpr-banner-revolution .carousel-fade .active.carousel-item-end {
    z-index: 0;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================================
   FULL-WIDTH BREAKOUT
   ========================================================================= */

.mpr-banner-revolution {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.mpr-banner-revolution .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: transparent;
}

.mpr-banner-revolution .carousel-inner::after {
    display: block;
    clear: both;
    content: "";
}

/* =========================================================================
   BANNER IMAGE
   ========================================================================= */

.mpr-banner-revolution .carousel-item img.mpr-banner-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* =========================================================================
   KEN BURNS EFFECT
   Subtle slow zoom on active slides for a cinematic feel.
   Transform-origin is varied per slide via JS for visual variety.
   ========================================================================= */

/* Multiple Ken Burns variants for visual variety */
@keyframes mpr-kb-zoom-in {
    from { transform: scale(1); }
    to   { transform: scale(1.08); }
}

@keyframes mpr-kb-zoom-out {
    from { transform: scale(1.08); }
    to   { transform: scale(1); }
}

@keyframes mpr-kb-pan-right {
    from { transform: scale(1.05) translateX(-1.5%); }
    to   { transform: scale(1.05) translateX(1.5%); }
}

@keyframes mpr-kb-pan-left {
    from { transform: scale(1.05) translateX(1.5%); }
    to   { transform: scale(1.05) translateX(-1.5%); }
}

@keyframes mpr-kb-zoom-pan-right {
    from { transform: scale(1) translateX(-1%); }
    to   { transform: scale(1.07) translateX(1%); }
}

.mpr-banner-revolution.mpr-kenburns .carousel-item .mpr-banner-img {
    will-change: transform;
}

/* Ken Burns animation is applied via JS inline style for reliable restart */

/* =========================================================================
   CONTENT ENTRANCE ANIMATION
   Text and CTA slide up with a subtle fade when a new slide enters.
   ========================================================================= */

.mpr-banner-revolution.mpr-initialized .mpr-banner-content {
    opacity: 0;
    transform: translateY(24px);
}

.mpr-banner-revolution .mpr-banner-content.mpr-animate-in {
    animation: mpr-content-enter 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

@keyframes mpr-content-enter {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================================
   PROGRESS BAR
   Thin bar at the bottom showing autoplay countdown.
   ========================================================================= */

.mpr-carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.12);
}

.mpr-carousel-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--bs-primary, #11162D);
    will-change: width;
}

.mpr-carousel-progress-bar.mpr-progress-running {
    transition: width linear;
}

.mpr-carousel-progress-bar.mpr-progress-paused {
    transition: none;
}

/* =========================================================================
   TEXT OVERLAY
   ========================================================================= */

.mpr-banner-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 2rem 6%;
    z-index: 2;
    pointer-events: none;
}

.mpr-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

/* Directional gradient — darkens the side where text sits */
.mpr-banner-caption::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.mpr-banner-align-left::before {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
}

.mpr-banner-align-center::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.45) 35%, rgba(0, 0, 0, 0.45) 65%, rgba(0, 0, 0, 0.15) 100%);
}

.mpr-banner-align-right::before {
    background: linear-gradient(to left, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
}

.mpr-banner-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    pointer-events: auto;
}

/* =========================================================================
   TEXT ALIGNMENT VARIANTS
   ========================================================================= */

.mpr-banner-align-left .mpr-banner-content {
    margin-right: auto;
}

.mpr-banner-align-center {
    justify-content: center;
    text-align: center;
}

.mpr-banner-align-center .mpr-banner-content {
    margin: 0 auto;
}

.mpr-banner-align-right {
    justify-content: flex-end;
    text-align: right;
}

.mpr-banner-align-right .mpr-banner-content {
    margin-left: auto;
}

/* =========================================================================
   TYPOGRAPHY
   ========================================================================= */

.mpr-banner-title {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.mpr-banner-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    font-weight: 400;
}

/* =========================================================================
   CTA BUTTON
   ========================================================================= */

.mpr-banner-cta {
    text-shadow: none;
    font-weight: 600;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    letter-spacing: 0.02em;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mpr-banner-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* =========================================================================
   CAROUSEL INDICATORS
   ========================================================================= */

.mpr-banner-revolution .carousel-indicators {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 4;
    display: flex;
    justify-content: center;
    padding: 0;
    margin-right: 15%;
    margin-bottom: 1rem;
    margin-left: 15%;
    list-style: none;
}

.mpr-banner-revolution .carousel-indicators [data-bs-slide-to] {
    box-sizing: content-box;
    flex: 0 1 auto;
    width: 12px;
    height: 12px;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background-color: transparent;
    background-clip: padding-box;
    opacity: 0.7;
    transition: all 0.3s;
    margin: 0 4px;
}

.mpr-banner-revolution .carousel-indicators .active {
    background-color: var(--bs-primary, #11162D);
    border-color: var(--bs-primary, #11162D);
    opacity: 1;
}

/* =========================================================================
   CAROUSEL CONTROLS
   ========================================================================= */

.mpr-banner-revolution .carousel-control-prev,
.mpr-banner-revolution .carousel-control-next {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    padding: 0 0.75rem;
    color: #fff;
    text-align: center;
    background: none;
    border: 0;
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.3s;
}

.mpr-banner-revolution .carousel-control-prev {
    left: 0;
}

.mpr-banner-revolution .carousel-control-next {
    right: 0;
}

/* Show controls on carousel hover */
.mpr-banner-revolution:hover .carousel-control-prev,
.mpr-banner-revolution:hover .carousel-control-next {
    opacity: 1;
}

.mpr-banner-revolution .carousel-control-prev-icon,
.mpr-banner-revolution .carousel-control-next-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 45%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.mpr-banner-revolution .carousel-control-prev:hover .carousel-control-prev-icon,
.mpr-banner-revolution .carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.08);
}

.mpr-banner-revolution .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.mpr-banner-revolution .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 991px) {
    .mpr-banner-caption {
        padding: 1.5rem 4%;
    }

    .mpr-banner-content {
        max-width: 500px;
    }
}

@media (max-width: 767px) {
    .mpr-banner-revolution {
        margin-bottom: 1rem;
    }

    .mpr-banner-caption {
        padding: 1rem 5%;
        align-items: flex-end;
        padding-bottom: 2rem;
    }

    .mpr-banner-content {
        max-width: 100%;
    }

    .mpr-banner-subtitle {
        margin-bottom: 1rem;
    }

    .mpr-banner-cta {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .mpr-banner-revolution .carousel-control-prev,
    .mpr-banner-revolution .carousel-control-next {
        display: none !important;
    }

    .mpr-banner-revolution .carousel-indicators {
        margin-bottom: 0.5rem;
    }
}

/* =========================================================================
   REDUCED MOTION
   Respect user preference for reduced motion.
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
    .mpr-banner-revolution .carousel-item {
        transition-duration: 0.01ms !important;
    }

    .mpr-banner-revolution .carousel-fade .carousel-item {
        transition-duration: 0.01ms !important;
    }

    .mpr-banner-revolution.mpr-kenburns .carousel-item.active .mpr-banner-img {
        animation: none !important;
    }

    .mpr-banner-revolution .mpr-banner-content.mpr-animate-in {
        animation-duration: 0.01ms !important;
    }
}
