/* =============================================
   TOP SLIDER — Zend'O
   ============================================= */

.hero .thumb {
  position: relative;
  overflow: hidden;
}

.ts-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ts-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.ts-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--ts-transition, 800ms) ease;
}

.ts-slide.ts-active {
  opacity: 1;
  z-index: 2;
}

.ts-slide.ts-exit {
  opacity: 0;
  z-index: 1;
}

.ts-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* =============================================
   LIGHTBOX
   ============================================= */

#ts-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#ts-lightbox.ts-lb-visible {
  opacity: 1;
  pointer-events: all;
}

/* Backdrop — blur + dim */
.ts-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Inner layout */
.ts-lb-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 48px 64px;
  box-sizing: border-box;
}

/* Image wrap */
.ts-lb-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ts-lb-img {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* Close button */
.ts-lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
  line-height: 1;
}

.ts-lb-close:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.1);
}

/* Prev / Next */
.ts-lb-prev,
.ts-lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
  line-height: 1;
  padding-bottom: 2px;
}

.ts-lb-prev { left: 20px; }
.ts-lb-next { right: 20px; }

.ts-lb-prev:hover,
.ts-lb-next:hover {
  background: rgba(255,255,255,0.28);
  transform: translateY(-50%) scale(1.08);
}

/* Counter */
.ts-lb-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
  letter-spacing: 0.05em;
  z-index: 2;
}

/* Prevent body scroll when lightbox open */
body.ts-lb-open {
  overflow: hidden;
}

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

@media (max-width: 1024px) {
  .hero {
    flex-direction: column !important;
    height: auto !important;
  }

  .hero .ctr {
    flex-direction: column !important;
    height: auto !important;
  }

  .hero .slogan {
    width: 100% !important;
    flex: 0 0 auto !important;
    padding: 2rem 1.5rem !important;
    box-sizing: border-box !important;
  }

  .hero .thumb {
    width: 100% !important;
    flex: 0 0 auto !important;
    height: 55vw !important;
    max-height: 480px !important;
    min-height: 260px !important;
  }

  .ts-lb-prev { left: 8px; }
  .ts-lb-next { right: 8px; }
}

@media (max-width: 640px) {
  .hero .thumb {
    height: 60vw !important;
    max-height: 320px !important;
    min-height: 200px !important;
  }

  .hero .slogan h1 {
    font-size: 1.4rem !important;
  }

  .ts-lb-prev,
  .ts-lb-next {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .ts-lb-inner {
    padding: 48px 16px;
  }
}