/*
 * Sawatech Woo - Template: BloomingBox Hero Banner
 */

.bbx-hero {
  --bbx-bg: var(--color-bg, #fff);
  --bbx-ink: var(--color-text, #111);
  --bbx-muted: var(--color-text-muted, #6e6e6e);
  --bbx-red: var(--color-primary, #ed1c24);
  --bbx-red-deep: var(--color-primary-hover, #c9121b);
  --bbx-cream: var(--color-secondary, #f6c98a);
  --bbx-sans: var(
    --font-body,
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif
  );
  --bbx-serif: var(
    --font-heading,
    "Cormorant Garamond",
    Georgia,
    "Times New Roman",
    serif
  );
  --bbx-edge-gap: clamp(0.5rem, 2vw, 1.35rem);
  --bbx-scroll-scale: 1;
  --bbx-card-bg: rgba(255, 255, 255, 0.8);
  --bbx-card-border: rgba(255, 255, 255, 0.68);
  --bbx-card-shadow: 0 1.2rem 2.6rem -1.3rem rgba(17, 17, 17, 0.28);
  --bbx-center-translate-inline: -50%;
  --bbx-shine-start: -135%;
  --bbx-shine-end: 135%;
  --bbx-panel-height: 80vh;
  --bbx-panel-min-height: 28rem;
  --bbx-panel-height-mobile: 52vh;
  --bbx-panel-max-height-mobile: 22rem;
  --bbx-panel-min-height-mobile: 15rem;

  inline-size: 100vw;
  max-inline-size: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-block: clamp(1.4rem, 3vw, 2.5rem) clamp(1.1rem, 2.4vw, 2rem);
  padding-inline: var(--bbx-edge-gap);
  background: var(--bbx-bg);
  color: var(--bbx-ink);
  font-family: var(--bbx-sans);
  box-sizing: border-box;
}

[dir="rtl"] .bbx-hero {
  --bbx-center-translate-inline: 50%;
  --bbx-shine-start: 135%;
  --bbx-shine-end: -135%;
}

.bbx-hero__inner {
  inline-size: 100%;
  margin: 0;
  box-sizing: border-box;
}

.bbx-hero__panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  block-size: var(--bbx-panel-height, 80vh);
  min-block-size: var(--bbx-panel-min-height, 28rem);
  border-radius: var(--radius-corner);
  background: #f4f1ec;
  box-shadow: 0 1.25rem 3.25rem -2.6rem rgba(17, 17, 17, 0.34);
}

.bbx-hero__slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

.bbx-hero__slide.is-active {
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.bbx-hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  inline-size: 100%;
  block-size: 100%;
  display: block;
  object-fit: cover;
  object-position: 66% 48%;
  filter: saturate(1.02) contrast(1.01) brightness(0.95);
  transform: scale(calc(1.01 * var(--bbx-scroll-scale, 1)));
  transition:
    transform 0.08s linear,
    filter 0.7s ease;
}

.bbx-hero__panel:hover .bbx-hero__slide.is-active .bbx-hero__image {
  filter: saturate(1.08) contrast(1.03) brightness(0.99);
  transform: scale(calc(1.035 * var(--bbx-scroll-scale, 1)));
  transition:
    transform 0.5s ease,
    filter 0.7s ease;
}

.bbx-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      100deg,
      rgb(0 0 0 / 54%) 2%,
      rgb(0 0 0 / 30%) 36%,
      rgba(0, 0, 0, 0.07) 100%
    ),
    linear-gradient(180deg, rgb(0 0 0 / 6%), rgb(255 255 255 / 12%));
}

[dir="rtl"] .bbx-hero__shade {
  background:
    linear-gradient(
      280deg,
      rgb(0 0 0 / 54%) 2%,
      rgb(0 0 0 / 22%) 36%,
      rgba(0, 0, 0, 0.07) 100%
    ),
    linear-gradient(180deg, rgb(0 0 0 / 22%), rgba(0, 0, 0, 0.12));
}

.bbx-hero__content {
  --bbx-content-pad-inline: 0;
  --bbx-content-pad-block: 0;
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.35rem;
  padding-block: var(--bbx-content-pad-block);
  padding-inline: var(--bbx-content-pad-inline);
  inset-inline-start: clamp(1.2rem, 3vw, 2.5rem);
  inset-block-end: clamp(1.2rem, 3vw, 2.5rem);
  inline-size: min(58%, 36rem);
}

.bbx-hero__content--pad-sm {
  --bbx-content-pad-inline: clamp(0.55rem, 1.4vw, 0.75rem);
  --bbx-content-pad-block: clamp(0.45rem, 1vw, 0.65rem);
}

.bbx-hero__content--pad-md {
  --bbx-content-pad-inline: clamp(0.75rem, 1.8vw, 1rem);
  --bbx-content-pad-block: clamp(0.6rem, 1.2vw, 0.85rem);
}

.bbx-hero__content--pad-lg {
  --bbx-content-pad-inline: clamp(0.95rem, 2.2vw, 1.35rem);
  --bbx-content-pad-block: clamp(0.8rem, 1.7vw, 1.1rem);
}

.bbx-hero__content--pad-x-large {
  --bbx-content-pad-inline: clamp(1.1rem, 2.7vw, 1.7rem);
  --bbx-content-pad-block: clamp(0.95rem, 2.1vw, 1.35rem);
}

.bbx-hero__content--pad-xx-large {
  --bbx-content-pad-inline: clamp(1.3rem, 3.2vw, 2.1rem);
  --bbx-content-pad-block: clamp(1.1rem, 2.5vw, 1.65rem);
}

/* — Horizontal alignment — */
.bbx-hero__content--h-center {
  inset-inline-start: 50%;
  inline-size: min(72%, 42rem);
  align-items: center;
  text-align: center;
  translate: var(--bbx-center-translate-inline) 0;
}

.bbx-hero__content--h-end {
  inset-inline-start: auto;
  inset-inline-end: clamp(1.2rem, 3vw, 2.5rem);
  align-items: flex-end;
  text-align: end;
}

/* — Vertical alignment — */
.bbx-hero__content--v-top {
  inset-block-end: auto;
  inset-block-start: clamp(1.2rem, 3vw, 2.5rem);
}

.bbx-hero__content--v-center {
  inset-block-end: auto;
  inset-block-start: 50%;
  translate: 0 -50%;
}

.bbx-hero__content--h-center.bbx-hero__content--v-center {
  translate: var(--bbx-center-translate-inline) -50%;
}

/* — Slider arrows — */
.bbx-hero__arrow {
  appearance: none;
  position: absolute;
  z-index: 4;
  top: 50%;
  translate: 0 -50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: clamp(2.4rem, 3.6vw, 3rem);
  block-size: clamp(2.4rem, 3.6vw, 3rem);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  color: #171717;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 0.6rem 1.6rem -1rem rgba(0, 0, 0, 0.28);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.bbx-hero__arrow svg {
  inline-size: 1.15rem;
  block-size: 1.15rem;
  flex-shrink: 0;
}

.bbx-hero__arrow--prev {
  inset-inline-start: clamp(0.75rem, 1.6vw, 1.25rem);
}

.bbx-hero__arrow--next {
  inset-inline-end: clamp(0.75rem, 1.6vw, 1.25rem);
}

.bbx-hero__arrow:hover,
.bbx-hero__arrow:focus-visible {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0.85rem 2rem -1rem rgba(0, 0, 0, 0.38);
  transform: translateY(-2px);
}

.bbx-hero__arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.bbx-hero__heading {
  margin: 0;
  color: #fff;
  font-family: var(--bbx-serif);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 700;
  line-height: var(--font-line-height-heading, 1.03);
  letter-spacing: -0.02em;
  text-transform: none;
}

.bbx-hero__heading span {
  display: block;
}

.bbx-hero__subtitle {
  margin: clamp(1rem, 1.8vw, 1.35rem) 0 0;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: var(--font-line-height-body, 1.5);
}

.bbx-hero__subtitle strong {
  color: #fff;
  font-weight: 700;
}

.bbx-hero__button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: clamp(8.75rem, 14vw, 13rem);
  min-block-size: clamp(2.7rem, 4.2vw, 3.5rem);
  margin-block-start: clamp(1.1rem, 2.2vw, 1.7rem);
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-corner);
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: var(--bbx-red);
  color: #fff;
  cursor: pointer;
  font-size: clamp(0.9rem, 1.2vw, 1.02rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 0.85rem 1.9rem -1rem rgba(237, 28, 36, 0.5);
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

.bbx-hero__button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 18%,
    rgba(255, 255, 255, 0.2) 48%,
    rgba(255, 255, 255, 0) 78%
  );
  opacity: 0;
  translate: var(--bbx-shine-start) 0;
  transition:
    translate 0.42s ease,
    opacity 0.28s ease;
}

.bbx-hero__button > * {
  position: relative;
  z-index: 1;
}

.bbx-hero__button:hover,
.bbx-hero__button:focus-visible {
  background: var(--bbx-red-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 1.15rem 2.4rem -1rem rgba(237, 28, 36, 0.68);
}

.bbx-hero__button:hover::before,
.bbx-hero__button:focus-visible::before {
  opacity: 1;
  translate: var(--bbx-shine-end) 0;
}

.bbx-hero__button:focus-visible,
.bbx-hero__dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.bbx-hero__dots {
  position: absolute;
  z-index: 4;
  inset-inline-start: 50%;
  inset-block-end: clamp(1.45rem, 2vw, 2.1rem);
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(8px);
  box-shadow: 0 0.6rem 1.6rem -1rem rgba(0, 0, 0, 0.28);
  translate: var(--bbx-center-translate-inline) 0;
}

.bbx-hero__dot {
  appearance: none;
  inline-size: 0.55rem;
  block-size: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.28);
  cursor: pointer;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.bbx-hero__dot.is-active {
  inline-size: 1.45rem;
  border-radius: 999px;
  background: var(--bbx-red);
  box-shadow: 0 0 0 0.15rem rgba(237, 28, 36, 0.18);
  transform: scale(1);
}

.bbx-hero__dot:hover {
  background: rgba(17, 17, 17, 0.48);
}

.bbx-hero__badge {
  position: absolute;
  z-index: 3;
  inset-inline-end: clamp(2rem, 3.1vw, 2.95rem);
  inset-block-end: clamp(1.45rem, 2vw, 2rem);
  display: grid;
  place-items: center;
  inline-size: clamp(5.1rem, 7.4vw, 6.75rem);
  min-block-size: clamp(5rem, 7.4vw, 6.55rem);
  padding: 0.38rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-corner);
  background: rgba(255, 255, 255, 0.66);
  color: #171717;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 0.65rem 1.8rem -0.9rem rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.bbx-hero__badge img {
  inline-size: 100%;
  block-size: 100%;
  display: block;
  object-fit: contain;
}

.bbx-hero__badge-mark {
  font-family: var(--bbx-sans);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 0.9;
}

.bbx-hero__badge strong,
.bbx-hero__badge span:not(.bbx-hero__badge-mark),
.bbx-hero__badge em {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 0.92;
}

.bbx-hero__badge em {
  font-family: var(--bbx-serif);
  font-size: 1rem;
  font-style: normal;
  line-height: 1;
}

@media (max-width: 900px) {
  .bbx-hero__content {
    inline-size: min(72%, 31rem);
    inset-inline-start: 1rem;
    inset-block-end: 1rem;
    padding-inline: clamp(0.95rem, 3.8vw, 1.3rem);
  }

  .bbx-hero__heading {
    font-size: clamp(1.8rem, 5.7vw, 2.45rem);
  }

  .bbx-hero__arrow {
    top: auto;
    inset-block-end: clamp(0.7rem, 2.2vw, 1.1rem);
    translate: 0 0;
  }

  .bbx-hero__arrow:hover,
  .bbx-hero__arrow:focus-visible {
    transform: translateY(-1px);
  }

  .bbx-hero__panel:has(.bbx-hero__dots) .bbx-hero__content {
    inset-block-end: clamp(2.75rem, 6.5vw, 3.25rem);
  }
}

@media (max-width: 680px) {
  .bbx-hero {
    padding-block: 0.65rem 0.55rem;
    padding-inline: clamp(0.45rem, 2.4vw, 0.75rem);
  }

  .bbx-hero__panel {
    block-size: clamp(
      var(--bbx-panel-min-height-mobile, 15rem),
      var(--bbx-panel-height-mobile, 52vh),
      var(--bbx-panel-max-height-mobile, 22rem)
    );
    min-block-size: 0;
  }

  .bbx-hero__image,
  .bbx-hero__video {
    object-position: center 42%;
  }

  .bbx-hero__shade {
    background:
      linear-gradient(
        280deg,
        rgb(0 0 0 / 54%) 2%,
        rgb(0 0 0 / 22%) 36%,
        rgba(0, 0, 0, 0.07) 100%
      ),
      linear-gradient(180deg, rgb(0 0 0 / 22%), rgba(0, 0, 0, 0.12));
  }

  .bbx-hero__content {
    inline-size: min(88%, 26rem);
    justify-content: flex-start;
    padding-block: 1rem;
    padding-inline: 0.95rem;
    inset-inline-start: 0.75rem;
    inset-block-end: 0.75rem;
  }

  .bbx-hero__heading {
    font-size: clamp(1.45rem, 6.8vw, 1.85rem);
    letter-spacing: 0;
  }

  .bbx-hero__subtitle {
    margin-block-start: 0.55rem;
    font-size: 0.95rem;
  }

  .bbx-hero__button {
    min-inline-size: 8.75rem;
    min-block-size: 2.65rem;
    margin-block-start: 0.85rem;
    font-size: 0.9rem;
  }

  .bbx-hero__arrow {
    top: auto;
    inset-block-end: clamp(0.55rem, 2.4vw, 0.9rem);
    inline-size: 2.15rem;
    block-size: 2.15rem;
  }

  .bbx-hero__arrow svg {
    inline-size: 1rem;
    block-size: 1rem;
  }

  .bbx-hero__arrow--prev {
    inset-inline-start: clamp(0.5rem, 2vw, 0.75rem);
  }

  .bbx-hero__arrow--next {
    inset-inline-end: clamp(0.5rem, 2vw, 0.75rem);
  }

  .bbx-hero__dots {
    inset-inline-start: 50%;
    inset-block-end: clamp(0.65rem, 2.2vw, 0.95rem);
  }

  .bbx-hero__panel:has(.bbx-hero__dots) .bbx-hero__content {
    inset-block-end: clamp(2.85rem, 7.5vw, 3.35rem);
  }

  .bbx-hero__badge {
    inline-size: 4.9rem;
    min-block-size: 4.85rem;
    inset-inline-end: 1rem;
    inset-block-end: 1rem;
  }
}

@media (max-width: 430px) {
  .bbx-hero__panel {
    border-radius: var(--radius-corner);
  }

  .bbx-hero__content {
    inline-size: calc(100% - 1rem);
    inset-inline-start: 0.5rem;
    inset-block-end: 0.5rem;
    padding-inline: 0.85rem;
  }

  .bbx-hero__heading {
    font-size: 1.5rem;
    letter-spacing: 0;
  }

  .bbx-hero__badge {
    inline-size: 4.2rem;
    min-block-size: 4.2rem;
    inset-inline-end: 0.6rem;
    inset-block-end: 3.2rem;
    transform: scale(0.88);
    transform-origin: bottom right;
  }
}
