/* ================================================================
   TopBeauty Theme – Image Banner Widget
   SCIA Studio – v1.0
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Jost:wght@200;300;400;500;600&family=Poppins:wght@300;400;500;600&display=swap');

/* ═══════ BASE ═══════ */
.tbt-ib {
  position: relative;
  display: flex;
  overflow: hidden;
  width: 100%;
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
  background-color: transparent;

  /* Posizione contenuto (override via inline style) */
  justify-content: var(--tbt-ib-justify, center);
  align-items: var(--tbt-ib-align, center);
}

.elementor-widget-tbt_image_banner,
.elementor-widget-tbt_image_banner > .elementor-widget-container {
  width: 100%;
}

.tbt-ib *,
.tbt-ib *::before,
.tbt-ib *::after { box-sizing: border-box; }

/* ═══════ IMMAGINE ═══════ */
.tbt-ib__img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block !important;
  transition-property: transform, filter;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  transition-duration: 600ms; /* override via Elementor */
  margin: 0 !important;
  padding: 0 !important;
}

/* ═══════ OVERLAY ═══════ */
.tbt-ib__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: background 0.4s ease;
  pointer-events: none;
}

/* ═══════ CONTENUTO ═══════ */
.tbt-ib__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1), opacity 0.5s ease;
}

.tbt-ib__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: #fff;
  margin: 0;
}

.tbt-ib__subtitle {
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #fff;
  margin: 0;
  opacity: 0.9;
}

/* ═══════ CTA STYLES ═══════ */
.tbt-ib__cta {
  display: inline-block;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  transition: all 0.3s ease;
  align-self: inherit;
}

/* Underline */
.tbt-ib__cta--underline {
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.tbt-ib:hover .tbt-ib__cta--underline {
  padding-bottom: 4px;
}

/* Button */
.tbt-ib__cta--button {
  background: #111;
  color: #fff;
  padding: 12px 28px;
  border-radius: 2px;
  font-weight: 600;
}
.tbt-ib:hover .tbt-ib__cta--button {
  opacity: 0.85;
}

/* Outline */
.tbt-ib__cta--outline {
  border: 1.5px solid #fff;
  padding: 10px 26px;
  border-radius: 2px;
}
.tbt-ib:hover .tbt-ib__cta--outline {
  background: rgba(255,255,255,0.15);
}

/* Ghost */
.tbt-ib__cta--ghost {
  opacity: 0.8;
}
.tbt-ib:hover .tbt-ib__cta--ghost {
  opacity: 1;
}

/* ═══════ HOVER: IMMAGINE ═══════ */

/* Zoom In */
.tbt-ib--hover-zoom-in .tbt-ib__img {
  transform: scale(1);
}
.tbt-ib--hover-zoom-in:hover .tbt-ib__img {
  transform: scale(var(--tbt-ib-scale, 1.08));
}

/* Zoom Out */
.tbt-ib--hover-zoom-out .tbt-ib__img {
  transform: scale(var(--tbt-ib-scale, 1.08));
}
.tbt-ib--hover-zoom-out:hover .tbt-ib__img {
  transform: scale(1);
}

/* Slide Up */
.tbt-ib--hover-slide-up .tbt-ib__img {
  transform: translateY(0);
}
.tbt-ib--hover-slide-up:hover .tbt-ib__img {
  transform: translateY(-8px);
}

/* Slide Left */
.tbt-ib--hover-slide-left .tbt-ib__img {
  transform: translateX(0);
}
.tbt-ib--hover-slide-left:hover .tbt-ib__img {
  transform: translateX(-8px);
}

/* Blur */
.tbt-ib--hover-blur:hover .tbt-ib__img {
  filter: blur(3px);
}

/* Brighten */
.tbt-ib--hover-brighten:hover .tbt-ib__img {
  filter: brightness(1.2);
}

/* Darken */
.tbt-ib--hover-darken:hover .tbt-ib__img {
  filter: brightness(0.7);
}

/* ═══════ HOVER: CONTENUTO ═══════ */

/* Fade Up */
.tbt-ib--content-fade-up .tbt-ib__content {
  transform: translateY(12px);
  opacity: 0.7;
}
.tbt-ib--content-fade-up:hover .tbt-ib__content {
  transform: translateY(0);
  opacity: 1;
}

/* Fade In */
.tbt-ib--content-fade-in .tbt-ib__content {
  opacity: 0.5;
}
.tbt-ib--content-fade-in:hover .tbt-ib__content {
  opacity: 1;
}

/* Scale Up */
.tbt-ib--content-scale-up .tbt-ib__content {
  transform: scale(0.95);
}
.tbt-ib--content-scale-up:hover .tbt-ib__content {
  transform: scale(1);
}

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 767px) {
  .tbt-ib__title {
    font-size: 26px;
  }
  .tbt-ib__subtitle {
    font-size: 13px;
  }
}
