.dd-progress-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.dd-swiper-container {
    width: 100%;
    /* Min-height now dynamically controlled by Elementor Global Settings */
}

/* Ensure slides conform to the container boundaries and Swiper handles visibility natively */
.dd-swiper-slide.dd-swiper-slide {
    position: relative;
    display: flex;
    overflow: hidden;
    width: 100%;
    height: auto;
}
.dd-swiper-slide:not(.swiper-slide-active) {
    opacity: 0 !important;
    z-index: 0;
}

/* =========================================
   BACKGROUND VIDEO DOM MAPPING
   ========================================= */
.dd-bg-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.dd-bg-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.5);
}

/* 16:9 Aspect Ratio enforcement for iframes to prevent black bars */
.dd-bg-video-wrapper iframe {
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.77vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* =========================================
   BOTTOM NAVIGATION WRAPPER
   ========================================= */
.dd-slider-navigation {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: center;
    gap: clamp(10px, 1.5vw, 30px);
    z-index: 10;
}

.dd-nav-item {
    position: relative;
    flex: 1;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    border-radius: 100px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.47);
    transition: background 0.3s ease;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    mix-blend-mode: lighten;
    transition: background 0.3s ease;
    padding: 15px 30px;
}

.dd-nav-item.is-active {
    background: rgba(255, 255, 255, 0.1);
}

.dd-nav-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
    pointer-events: none;
}

.dd-nav-label {
    position: relative;
    z-index: 2;
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    pointer-events: none;
    line-height: 1;
}

/* =========================================
   CUSTOM CONTENT SCAFFOLDING
   ========================================= */
.dd-custom-slide-content {
    position: relative;
    z-index: 1; /* Elevates above background layers */
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding: 100px 40px 140px;
    background: transparent; /* Stripped to allow Elementor BG settings passthrough */
    color: #ffffff;
}

.dd-slide-heading {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    color: inherit;
    max-width: 1000px;
    width: 100%;
}

.dd-slide-description {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 35px;
    max-width: 800px;
    opacity: 0.9;
    max-width: 1000px;
    width: 100%;
}

.dd-slide-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    max-width: 450px;
    width: 100%;
}
.dd-slide-actions .dd-btn {
    flex: 1;
}
/* --- Alignment Matrices --- */
.dd-align-left {
    text-align: left;
    align-items: flex-start;
}
.dd-align-left .dd-slide-actions {
    justify-content: flex-start;
}

.dd-align-center {
    text-align: center;
    align-items: center;
}
.dd-align-center .dd-slide-actions {
    justify-content: center;
}

.dd-align-right {
    text-align: right;
    align-items: flex-end;
}
.dd-align-right .dd-slide-actions {
    justify-content: flex-end;
}

/* --- Buttons --- */
.dd-btn {
    padding: 14px 28px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.dd-btn-solid {
    background-color: #007bff;
    color: #ffffff;
    border: 2px solid #007bff;
}

.dd-btn-solid:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #ffffff;
}

.dd-btn-outline {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.dd-btn-outline:hover {
    background-color: #ffffff;
    color: #000000;
}

.dd-placeholder {
    padding: 100px;
    text-align: center;
    background: #f1f1f1;
    border: 2px dashed #ccc;
    width: 100%;
}

/* =========================================
   BACKGROUND OVERLAY DOM MAPPING
   ========================================= */
.dd-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Sits above video/background (z-index: 0) */
    pointer-events: none;
    transition: background 0.3s ease;
}

/* =========================================
   INNER CONTENT STACKING
   ========================================= */
.dd-slide-inner-content {
    position: relative;
    z-index: 2; /* Elevates Custom Content & Templates above the overlay */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .dd-custom-slide-content {
        padding: 50px 20px 100px;
    }
    .dd-slider-navigation {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
    .dd-nav-item {
        padding: 10px 15px;
        height: 40px;
    }
    .dd-nav-label {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .dd-slide-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    .dd-slide-actions .dd-btn {
        width: 100%;
    }
}

/* =========================================
   DD HERO VIDEO CARDS STYLES
   ========================================= */

.dd-hero-video-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* * Grid wrap defining the 4 text quadrants.
 * Elevated z-index to 10 to guarantee text sits above the video container.
 * align-content: center collapses the grid rows so they sit tightly together vertically.
 */
.dd-hero-text-wrap {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: center; /* Fixes the massive vertical gap */
    align-items: center;
    justify-items: center;
    z-index: 10;
    pointer-events: none;
}

/* Base text styling and hardware-accelerated transition parameters */
.dd-hero-text {
    font-size: clamp(2rem, 6vw, 6rem);
    font-weight: 700;
    line-height: 1;
    transition:
        opacity 1s cubic-bezier(0.25, 1, 0.5, 1),
        transform 1s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0;
    width: 100%;
}
.dd-text-1,
.dd-text-3 {
    text-align: right;
}

/* * Initial State: Strict Horizontal Split 
 * Left column starts pushed right, Right column starts pushed left.
 */
.dd-text-1,
.dd-text-3 {
    transform: translateX(50px);
}
.dd-text-2,
.dd-text-4 {
    transform: translateX(-50px);
}

/* Animation Trigger: Text splits horizontally to natural grid coordinates */
.animate-hero-text .dd-hero-text {
    transform: translateX(0);
    opacity: 1;
}

/* * Elevation and containment for the Swiper Cards element 
 * z-index set to 5 to sit strictly underneath the text wrapper (z-index: 10)
 */
.swiper-hero-vids {
    position: relative;
    z-index: 5;
    /* Width dynamically injected by Elementor Widget Settings */
    aspect-ratio: 9 / 16;
    opacity: 0;
    transform: scale(0.95);
    transition:
        opacity 0.8s ease,
        transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Animation Trigger: Video enters the DOM space */
.show-hero-video .swiper-hero-vids {
    opacity: 1;
    transform: scale(1);
}

.swiper-hero-vids-wrapper {
    width: 100%;
    height: 100%;
}

.swiper-hero-vids-wrapper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.swiper-hero-vids-wrapper .elementor-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
@media (max-width: 767px) {
    .dd-hero-text-wrap {
        column-gap: 10px !important;
        bottom: 0;
        top: auto;
    }
    .dd-hero-video-container {
        padding-bottom: 100px;
    }
    .swiper-hero-vids {
        width: 80% !important;
    }
}

@media (max-width: 480px) {
    .swiper-hero-vids {
        width: 60% !important;
    }
}
