/* ========================================
   HTML5 VIDEO CONTAINER - YAZICI GROUP
   ======================================== */

.html5-video-bg {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
  overflow: hidden;
  background: #000;
  display: block;
  touch-action: pan-y;
  pointer-events: none;
}

/* ========================================
   HTML5 VIDEO ELEMENT STYLING
   ======================================== */

.html5-video-bg .html5-video-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: none;
  z-index: 1;
  pointer-events: none;
  background: #000;
  display: block;
}

/* ========================================
   VIDEO POSTER IMAGE
   ======================================== */

.html5-video-bg .html5-video-player[poster] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ========================================
   SULAX VIDEO AREA INTEGRATION
   ======================================== */

/* tp-video-thumb içindeki html5-video-bg için özel stiller */
.tp-video-thumb {
  position: relative;
  overflow: hidden;
}

.tp-video-thumb .html5-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

/* Video area container için */
.tp-video-area .html5-video-bg {
  width: 100%;
  height: 100%;
}

/* tp-video-thumb için height ayarları (mevcut video stilleri ile uyumlu) */
.tp-video-thumb-wrap .tp-video-thumb {
  position: relative;
}

/* HTML5 video içeren tp-video-thumb için özel yükseklik */
.tp-video-thumb .html5-video-bg {
  min-height: 400px;
}

/* ========================================
   RESPONSIVE HEIGHT SYSTEM
   ======================================== */

/* Desktop (1200px ve üzeri) */
@media (min-width: 1200px) {
  .html5-video-bg {
    min-height: 500px;
  }
  
  .tp-video-thumb .html5-video-bg {
    min-height: 400px;
  }
}

/* Large Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .html5-video-bg {
    min-height: 450px;
  }
  
  .tp-video-thumb .html5-video-bg {
    min-height: 350px;
  }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .html5-video-bg {
    min-height: 400px;
  }
  
  .tp-video-thumb .html5-video-bg {
    min-height: 300px;
  }
}

/* Mobile (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .html5-video-bg {
    min-height: 350px;
  }
  
  .tp-video-thumb .html5-video-bg {
    min-height: 280px;
  }
}

/* Small Mobile (max-width: 575px) */
@media (max-width: 575px) {
  .html5-video-bg {
    min-height: 300px;
  }
  
  .tp-video-thumb .html5-video-bg {
    min-height: 250px;
  }
}

/* ========================================
   VIDEO THUMB SPECIFIC STYLES
   ======================================== */

/* Video thumb wrap için */
.tp-video-thumb-wrap .html5-video-bg {
  width: 100%;
  height: 100%;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.html5-video-bg:focus {
  outline: 2px solid #DBB800;
  outline-offset: 2px;
}

.html5-video-bg .html5-video-player:focus {
  outline: 2px solid #DBB800;
  outline-offset: 2px;
}

/* ========================================
   CORE WEB VITALS OPTIMIZATION
   ======================================== */

/* CLS (Cumulative Layout Shift) önleme */
.html5-video-bg {
  aspect-ratio: 16 / 9;
  contain: layout style paint;
}

.tp-video-thumb .html5-video-bg {
  aspect-ratio: auto;
}

/* Video yüklenene kadar placeholder */
.html5-video-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 0;
}

/* Video yüklendiğinde placeholder'ı gizle */
.html5-video-bg .html5-video-player:not([poster=""])::before {
  display: none;
}

/* ========================================
   PERFORMANCE OPTIMIZATION
   ======================================== */

/* GPU acceleration */
.html5-video-bg .html5-video-player {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Lazy loading için hazır */
.html5-video-bg .html5-video-player[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.html5-video-bg .html5-video-player[loading="lazy"].loaded {
  opacity: 1;
}

