/* =========================================================
   BASE SLIDE STYLING
========================================================= */

.dbs-slide {
    position: relative;
    background-image: var(--desktop-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    width: 100%;
}

@media (max-width: 768px) {
    .dbs-slide {
        background-image: var(--mobile-bg, var(--desktop-bg)) !important;
		aspect-ratio: 16 / 9;
    }
	
}

/* =========================================================
   OVERLAY (MUST BE BELOW VIDEO)
========================================================= */

.dbs-slide-overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay-color, rgba(0,0,0,0.25));
    z-index: 5; /* must be LOWER than iframe */
    pointer-events: none;
}

/* =========================================================
   SLIDE CONTENT
========================================================= */

.dbs-slide-inner {
    position: relative;
    z-index: 6; /* content above overlay */
    width: 100%;
    height: 100%;
    padding: 40px;
    box-sizing: border-box;
}

/* =========================================================
   VIDEO LAYERS — Correct Z-INDEX Stack:
   iframe: 10
   play button: 9
   thumbnail: 8
   overlay: 5
   content: 6
   background: 1
========================================================= */

/* Thumbnail (image preview) */
.dbs-video-thumbnail {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 8;
    transition: opacity 0.35s ease;
}

/* Play Button */
.dbs-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;          /* center horizontally */
    transform: translate(-50%, -50%);
    max-width: 70px;
    width: 70px;
    height: auto;
    cursor: pointer;
    z-index: 9 !important; /* must be ABOVE thumbnail & overlay */
}

.dbs-video-play-btn img,
.dbs-play-icon-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Default SVG wrapper */
.dbs-default-play-icon svg {
    width: 70px;
    height: 70px;
    display: block;
}

/* Hide play button & thumbnail when playing */
.dbs-slide.dbs-video-playing .dbs-video-thumbnail,
.dbs-slide.dbs-video-playing .dbs-video-play-btn {
    opacity: 0;
    pointer-events: none;
}

/* VIDEO IFRAME — always on top */
.dbs-video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10 !important; /* highest layer */
    border: none;
    display: block;
}

/* =========================================================
   SWIPER STYLING
========================================================= */

.dbs-swiper .swiper {
    width: 100%;
    height: 100%;
	border-radius: 12px;
}

.swiper-wrapper {
    display: flex;
}

.swiper-slide {
    width: 100%;
    height: auto;
}

/* Navigation arrows - General styles (overridden by .dbs-slider-controls) */
.swiper-button-prev,
.swiper-button-next {
    color: #fff;
    mix-blend-mode: difference;
}

/* Override for our slider controls */
.dbs-slider-controls .swiper-button-prev,
.dbs-slider-controls .swiper-button-next {
    mix-blend-mode: normal !important;
}

/* Pagination dots */
.swiper-pagination-bullet {
    background: #fff;
}

/* Override Swiper default active bullet color */
.swiper-pagination-bullet-active {
    background: #22376D !important;
    background-color: #22376D !important;
}

/* =========================================================
   ALIGNMENT SUPPORT
========================================================= */

.dbs-slider.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.dbs-slider.alignwide {
    max-width: var(--wp--style--layout--wide-size, 1200px);
    margin-left: auto;
    margin-right: auto;
}

.dbs-slider {
    width: 100%;
    margin: 0 auto;
}

/* =========================================================
   EDITOR STYLING
========================================================= */

.dbs-slider-editor .dbs-slide {
    border: 1px dashed #ccc;
    min-height: 200px;
    background-size: cover;
}


/* =========================================================
   16:9 ASPECT RATIO — SLIDER & VIDEO (OLD VERSION)
========================================================= */

/* Force each slide to maintain 16:9 */
.dbs-slide {
    aspect-ratio: 21 / 9;
    height: auto;              /* important */
    min-height: unset !important;
}

/* Ensure swiper respects aspect ratio */
.dbs-swiper .swiper,
.dbs-swiper .swiper-wrapper,
.dbs-swiper .swiper-slide {
    height: auto;
	border-radius: 12px;
}

/* Video thumbnail must fill the same 16:9 area */
.dbs-video-thumbnail {
    width: 100%;
    height: 100%;
}

/* Video iframe must also match */
.dbs-video-container iframe {
    width: 100%;
    height: 100%;
}

/* Safety for content overlay */
.dbs-slide-inner,
.dbs-slide-overlay {
    height: 100%;
}


/* =========================================================
   CENTERED SLIDER CONTROLS — BELOW BANNER
========================================================= */

.dbs-slider-controls {
    width: 100%;
    display: flex;
    justify-content: center;   /* center the whole group */
    align-items: center;
    margin-top: 15px;
}

/* Inner alignment (arrows + dots together) */
.dbs-slider-controls > * {
    flex-shrink: 0;
}

/* ======================
   ARROWS (Rounded White)
====================== */

.dbs-slider-controls .swiper-button-prev,
.dbs-slider-controls .swiper-button-next {
    position: static !important;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    color: #000000 !important;
    mix-blend-mode: normal !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Remove Swiper default absolute positioning/icons */
.dbs-slider-controls .swiper-button-prev::after,
.dbs-slider-controls .swiper-button-next::after {
    font-size: 16px;
    font-weight: 600;
    color: #000000 !important;
}

/* ======================
   DOTS
====================== */

.dbs-slider-controls .swiper-pagination {
    position: static !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 10px; /* spacing between arrows */
    width: auto !important;
}

.dbs-slider-controls .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: #ffffff !important;
    opacity: 1;
    border-radius: 50%;
}

.dbs-slider-controls .swiper-pagination-bullet-active,
.dbs-slider-controls .swiper-pagination .swiper-pagination-bullet-active,
.dbs-slider-controls .swiper-pagination-bullet.swiper-pagination-bullet-active {
    background: #22376D !important;
    background-color: #22376D !important;
    opacity: 1 !important;
}

/* Force active bullet color with inline style override */
.dbs-slider-controls .swiper-pagination-bullet-active[style] {
    background: #22376D !important;
    background-color: #22376D !important;
}
.dbs-slider-controls .swiper-button-prev, .dbs-slider-controls .swiper-button-next{
	margin-top: auto;
}
@media (max-width: 768px) {
	
	.dbs-slide {
		aspect-ratio: 16 / 9;
    }
	.dbs-swiper .swiper, .dbs-swiper .swiper-wrapper, .dbs-swiper .swiper-slide{
		height:fit-content !important;
	}
    .dbs-slider-controls .swiper-button-prev, .dbs-slider-controls .swiper-button-next {
        width: 30px;
        height: 30px;
        border: 2px solid #000000 !important;
        background: #ffffff !important;
        color: #000000 !important;
        mix-blend-mode: normal !important;
        margin-top: auto;
    }
	
	.dbs-slider-controls .swiper-button-prev::after, .dbs-slider-controls .swiper-button-next::after{
		font-size: 12px;
		color: #000000 !important;
	}
	
}

/* =========================================================
   FIX VIDEO THUMBNAIL CROPPING — DESKTOP 21:9
========================================================= */

/* Desktop wide screens */
@media (min-width: 769px) {

    /* Video thumbnail tuning for 21:9 */
    .dbs-slide[data-video] .dbs-video-thumbnail {
        background-size: contain !important;
        background-position: center center;
        background-repeat: no-repeat;
        background-color: #000; /* letterbox color */
    }
	.dbs-slide{
       background-size: contain !important;
        background-position: center center;
        background-repeat: no-repeat;
        background-color: #000; /* letterbox color */
		
	}

}
