/* ===========================================
   SABCLINIC MEDIA CAROUSEL STYLES
   =========================================== */

/* Container base */
.kk-media-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-wrap: nowrap;
  scroll-behavior: smooth;
  user-select: none;
}

/* Common slide styles */
.kk-carousel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  text-align: center;
  transition: transform 0.8s ease, opacity 0.8s ease;
}

/* Overlay dark tint */
.kk-carousel-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
}

/* Background image/video placement */
.kk-bg-image, video.kk-bg-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
	background-size: cover;
}

/* Content wrapper inside slide */
.kk-slide-content {
	position: relative;
	z-index: 1;
	color: #fff;
	text-align: center;
	padding: 2rem;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}
.carousel-control-next, .carousel-control-prev { 
	z-index: 2; 
}
/* Fullscreen version */
.kk-media-carousel-full .carousel-item {
  width: 100%;
  min-height: calc(100vh - 160px);
  position: relative;
}

.kk-media-carousel-full .carousel-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

/* Fixed-size version (within sections) */
.kk-media-carousel-fixed { 
}

.kk-media-carousel-full .kk-slide-content {  
	min-height: calc(100vh - 160px); 
}

.kk-media-carousel-small .kk-slide-content {  
	min-height: 350px; 
}
.kk-media-carousel-fixed .kk-slide-content {
	min-height: 400px;
}
/* Titles and text */
.slide-title {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.75rem;
}
 
.slide-desc {
  font-size: clamp(1.1rem, 2vw, 2rem);
  color: #f2f2f2;
  font-style: italic;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.slide-content {
  font-size: 1rem;
  color: #f8f8f8;
}

/* ===========================================
   MULTI-SLIDE (2–3 items per row)
   =========================================== */
.kk-media-carousel-2-slides .carousel-inner,
.kk-media-carousel-3-slides .carousel-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.kk-media-carousel-2-slides .kk-carousel-slide,
.kk-media-carousel-3-slides .kk-carousel-slide {
  position: relative;
  flex: 1 1 calc(50% - 0.75rem);
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}

.kk-media-carousel-3-slides .kk-carousel-slide {
  flex: 1 1 calc(33.333% - 1rem);
}

.kk-media-carousel-2-slides .kk-carousel-slide iframe,
.kk-media-carousel-3-slides .kk-carousel-slide iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 991.98px) {
  .kk-media-carousel-2-slides .kk-carousel-slide,
  .kk-media-carousel-3-slides .kk-carousel-slide {
    flex: 1 1 100%;
  }
}

@media (max-width: 767.98px) {
  .slide-title { font-size: 1.8rem; }
  .slide-desc { font-size: 1rem; }
}

/* ===========================================
   DTABLE LAYOUT (for vertical centering)
   =========================================== */
.dtable {
  display: table;
  width: 100%;
  height: 100%;
}

.dtable-vm-cell {
  display: table-cell;
  vertical-align: middle;
}

/* ===========================================
   VIDEO YOUTUBE EMBED (iframe wrapper)
   =========================================== */
.kk-bg-youtube {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.kk-bg-youtube iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ===========================================
   OPTIONAL FANCYBOX Z-INDEX FIX
   =========================================== */
.fancybox__container {
  z-index: 2000 !important;
}

#videoCarousel .kk-slide-content {
	position: absolute; 
}