/* ============================================================
   THM Slider v3.0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

.thm-slider-wrapper {
  width: 100%;
  overflow: hidden;
  background: #111;
}

.thm-slider {
  position: relative;
  width: 100%;
  user-select: none;
}

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

/* Slides — inactivos ficam sobrepostos, activo define a altura do wrapper */
.thm-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  pointer-events: none;
  z-index: 1;
}

.thm-slide.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* Imagem */
.thm-img {
  width: 100%;
  height: var(--thm-h-desktop, 600px);
  object-fit: var(--thm-fit-desktop, cover);
  object-position: center;
  display: block;
}

/* Caption invisível até o JS definir a posição — evita flash no centro */
.thm-caption {
  visibility: hidden;
}
.thm-caption.thm-ready {
  visibility: visible;
}

/* Caption — posicionado via left/top no style inline (definido pelo JS) */
.thm-caption {
  position: absolute !important;
  transform: translate(-50%, -50%) !important;
  pointer-events: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  width: max-content !important;
  max-width: 80vw !important;
  box-sizing: border-box !important;
  z-index: 5 !important;
}

/* Botão */
.thm-caption-title {
  margin: 0 !important;
  font-family: 'Open Sans', Arial, sans-serif !important;
  font-size: clamp(0.9rem, 1.8vw, 1.5rem) !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  /* background e color definidos por slide via JS (bindBtn) */
  padding: 12px 32px !important;
  border-radius: 12px !important;
  text-align: center !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  transition: background 0.2s, color 0.2s !important;
  text-decoration: none !important;
  display: inline-block !important;
  width: fit-content !important;
}

/* hover gerido pelo JS com cores por slide */

/* Descrição */
.thm-caption-desc {
  margin: 0 !important;
  font-family: 'Open Sans', Arial, sans-serif !important;
  font-size: clamp(0.8rem, 1.3vw, 1rem) !important;
  color: #fff !important;
  background: none !important;
  padding: 4px 0 !important;
  text-align: center !important;
  text-shadow: 0 1px 6px rgba(0,0,0,0.75) !important;
  pointer-events: none !important;
  width: fit-content !important;
  max-width: 80vw !important;
}

/* Setas */
.thm-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thm-arrow:hover { background: rgba(0,0,0,0.75); }
.thm-prev { left: 16px; }
.thm-next { right: 16px; }

@media (max-width: 768px) {
  .thm-img {
    height: var(--thm-h-mobile, 800px) !important;
    object-fit: var(--thm-fit-mobile, cover) !important;
  }
  .thm-caption {
    max-width: 88vw !important;
  }
  .thm-arrow { width: 36px; height: 36px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .thm-arrow { display: none; }
}
