/* Banner positioning and sizing. */
.custom-hero-banner {
    position: relative;
    width: 100%;
    min-height: 520px;
    height: 38vw;
    /* Scale with the viewport. */
    overflow: hidden;
    background-color: #141414;
}

/* Carousel wrapper. */
.custom-banner-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #141414;
}

/* Carousel viewport and track. */
.custom-banner-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-bottom: 20px;
}

.custom-banner-slider-track {
    display: flex;
    width: 100%;
}

.custom-banner-slider-track>div {
    width: 100%;
}

/* Each slide fills the carousel width. */
.custom-banner-slide-item {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    min-height: 520px;
    height: 38vw;
    overflow: hidden;
}

.custom-banner-slide-box {
    width: 100%;
}

/* Keep the image inside the slide bounds. */
.custom-banner-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Each slide owns its mask; text, links and carousel controls stay above it. */
.custom-banner-text-overlay {
    --banner-overlay-solid: rgb(var(--banner-overlay-color) / 1);
    --banner-overlay-soft: rgb(var(--banner-overlay-color) / 0.65);
    --banner-overlay-clear: rgb(var(--banner-overlay-color) / 0);
    --banner-overlay-left: linear-gradient(to right, var(--banner-overlay-solid) 0%, var(--banner-overlay-soft) 35%, var(--banner-overlay-clear) 80%);
    --banner-overlay-right: linear-gradient(to left, var(--banner-overlay-solid) 0%, var(--banner-overlay-soft) 35%, var(--banner-overlay-clear) 80%);
    --banner-overlay-top: linear-gradient(to bottom, var(--banner-overlay-solid) 0%, var(--banner-overlay-soft) 35%, var(--banner-overlay-clear) 80%);
    --banner-overlay-bottom: linear-gradient(to top, var(--banner-overlay-solid) 0%, var(--banner-overlay-soft) 35%, var(--banner-overlay-clear) 80%);
    --banner-overlay-center: radial-gradient(ellipse at center, var(--banner-overlay-solid) 0%, var(--banner-overlay-soft) 20%, var(--banner-overlay-clear) 75%);
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: var(--banner-overlay-opacity, 0%);
    background: var(--banner-overlay-left);
}

.custom-banner-text-overlay[data-overlay-position="right"] {
    background: var(--banner-overlay-right);
}

.custom-banner-text-overlay[data-overlay-position="center"] {
    background: var(--banner-overlay-center);
}

.custom-banner-text-overlay[data-overlay-position="top"] {
    background: var(--banner-overlay-top);
}

.custom-banner-text-overlay[data-overlay-position="bottom"] {
    background: var(--banner-overlay-bottom);
}

.custom-banner-text-overlay[data-overlay-position="full"] {
    background: var(--banner-overlay-solid);
}

@media (max-width: 768px) {
    .custom-banner-text-overlay {
        opacity: var(--banner-overlay-mobile-opacity, var(--banner-overlay-opacity, 0%));
        background: var(--banner-overlay-bottom);
    }

    .custom-banner-text-overlay[data-overlay-mobile-position="left"] {
        background: var(--banner-overlay-left);
    }

    .custom-banner-text-overlay[data-overlay-mobile-position="right"] {
        background: var(--banner-overlay-right);
    }

    .custom-banner-text-overlay[data-overlay-mobile-position="center"] {
        background: var(--banner-overlay-center);
    }

    .custom-banner-text-overlay[data-overlay-mobile-position="top"] {
        background: var(--banner-overlay-top);
    }

    .custom-banner-text-overlay[data-overlay-mobile-position="bottom"] {
        background: var(--banner-overlay-bottom);
    }

    .custom-banner-text-overlay[data-overlay-mobile-position="full"] {
        background: var(--banner-overlay-solid);
    }
}

/* Show the image configured for the current viewport. */
.custom-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.custom-banner-bg img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.custom-banner-bg picture {
    display: block;
    width: 100%;
    height: 100%;
}

.custom-banner-bg--pc {
    display: block;
}

.custom-banner-bg--mobile {
    display: none;
}

@media (max-width: 768px) {
    .custom-banner-bg--pc {
        display: none;
    }

    .custom-banner-bg--mobile {
        display: block;
    }

    .custom-banner-bg img {
        object-fit: contain;
        width: 100%;
        height: 100%;
    }
}

.custom-banner-desktop-img,
.custom-banner-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Text sits above the image and mask. */
.custom-banner-page-width {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    padding: 0 4%;
    box-sizing: border-box;
}

.custom-banner-content-matrix {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center vertically. */
    align-items: flex-start;
    /* Align to the left. */
    position: relative;
}

.banner-text-content-wrapper {
    margin-top: -20px;
    animation: fadeInUp 0.8s ease-out;
}

.custom-banner-slide-item .banner-main-title {
    font-size: 3.2rem;
    font-weight: bold;
    color: rgb(var(--color-text));
    margin: 0 0 10px 0;
    letter-spacing: 2px;

}

.banner-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 35px 0;
    letter-spacing: 1.5px;
}

/* Keep the highlight blue; other text follows the slide color scheme. */
.banner-subtitle .highlight-blue {
    color: #1974F9;
}

.custom-banner-slide-item .banner-subtitle .normal-white {
    color: rgb(var(--color-text));
}

/* Pill-shaped call to action. */
.custom-banner-slide-item .banner-action-btn {
    display: inline-block;
    background-color: #1974F9;
    color: rgb(var(--color-button-text)) !important;
    font-size: 1rem;
    font-weight: normal;
    padding: 12px 36px;
    border-radius: 50px;
    /* Rounded ends. */
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(63, 98, 246, 0.4);
}

.custom-banner-slide-item .banner-action-btn:hover {
    background-color: #2546d0;
    transform: translateY(-1px);
}

/* Optional feature bar. */
.custom-banner-slide-item .banner-features-blur-bar {
    position: absolute;
    bottom: 50px;
    left: 0;
    background: rgba(var(--color-background), 0.65);
    /* Use the slide background color with transparency. */
    backdrop-filter: blur(10px);
    /* Blur the backdrop. */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 15px 25px;
    gap: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.feature-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Feature icons. */
.feature-icon svg {
    width: 20px;
    height: 20px;
    color: #1974F9;
    display: block;
}

.custom-banner-slide-item .feature-text-box h4 {
    font-size: 18px;
    font-weight: normal;
    color: rgb(var(--color-text));
    margin: 0;
    line-height: 1.2;
}

.custom-banner-slide-item .feature-text-box p {
    font-size: 18px;
    font-weight: normal;
    color: rgb(var(--color-text));
    margin: 0;
    line-height: 1.2;
}

/* Feature divider. */
.feature-bar-divider {
    width: 1px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Carousel navigation. */
.custom-banner-slider-controls {
    position: absolute;
    bottom: 0px;
    right: 4%;
    z-index: 3;
    display: flex;
    gap: 12px;
}

.custom-banner-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #383838;
    border: 1px solid #383838;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.25s, transform 0.2s;
}

.custom-banner-arrow:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Mobile slides and viewport follow the active image aspect ratio. */
@media (max-width: 768px) {
    .custom-hero-banner {
        height: auto;
        min-height: 0;
    }

    .custom-banner-slider-container {
        padding-bottom: 0;
        aspect-ratio: var(--banner-active-mobile-aspect-ratio, var(--banner-initial-mobile-aspect-ratio, 1));
    }

    .custom-banner-slider-track {
        position: absolute;
        inset: 0 0 auto;
        align-items: flex-start;
    }

    .custom-banner-slide-item {
        height: auto;
        min-height: 0;
        aspect-ratio: var(--banner-mobile-aspect-ratio, 1);
        container-type: size;
    }

    .custom-banner-slider-controls {
        bottom: 12px;
    }

    .custom-banner-slide-item .banner-main-title {
        font-size: 2.2rem;
    }

    .banner-subtitle {
        font-size: 1.3rem;
    }

    /* Hide the optional feature bar on mobile. */
    .custom-banner-slide-item .banner-features-blur-bar {
        position: relative;
        bottom: 0;
        margin-top: 40px;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        background: rgba(var(--color-background), 0.9);
        display: none;
    }

    .feature-bar-divider {
        display: none;
    }

    .banner-text-content-wrapper {
        text-align: center;
    }

    .custom-banner-content-matrix {
        padding-bottom: 50px;
        justify-content: flex-end;
        align-items: center;
    }

    /* Keep text and the button inside a short desktop-image fallback. */
    @container (max-height: 360px) {
        .custom-banner-content-matrix {
            padding-block: 12px;
            justify-content: center;
        }

        .banner-text-content-wrapper {
            margin-top: 0;
        }

        .custom-banner-slide-item .banner-main-title {
            font-size: clamp(1rem, 8cqh, 1.6rem);
            line-height: 1.15;
            letter-spacing: 1px;
            margin-bottom: 6px;
        }

        .banner-subtitle {
            font-size: clamp(0.7rem, 5cqh, 1rem);
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }

        .custom-banner-slide-item .banner-action-btn {
            font-size: 0.75rem;
            padding: 6px 18px;
        }
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Editable promotion copy and independent CTA destinations. */
.custom-banner-slide-link { position:absolute; inset:0; z-index:2; }
.custom-banner-page-width { z-index:3; pointer-events:none; }
.banner-actions { display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
.banner-actions a { pointer-events:auto; }
.custom-banner-slide-item .banner-action-btn--secondary {
  background:rgba(255,255,255,.65); color:#1265e9 !important;
  border:1.5px solid #1265e9; box-shadow:none;
}
.custom-banner-slide-item .banner-action-btn--secondary:hover { background:#fff; }
.custom-banner-slide-item .banner-action-btn:focus-visible,
.custom-banner-slide-link:focus-visible { outline:3px solid #1974f9; outline-offset:3px; }
.banner-promo-line { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px 14px; }
.banner-promo-text { color:#1974f9; font-size:32px; font-weight:700; line-height:1.15; }
.banner-promo-detail { color:rgb(var(--color-text)); font-size:15px; line-height:1.4; }
.custom-banner-slide-item--promo .banner-text-content-wrapper {
  position:absolute; top:43%; transform:translateY(-50%); margin:0;
  width:52%; animation:none;
}
.custom-banner-slide-item--promo .banner-main-title {
  font-size:42px; line-height:1.15; letter-spacing:-.6px; margin:0 0 30px;
}
.custom-banner-slide-item--promo .banner-actions { margin-top:22px; }
.custom-banner-slide-item--promo .banner-action-btn {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:142px; min-height:46px; box-sizing:border-box;
  padding:10px 22px; font-size:16px; line-height:1.2;
  border:1.5px solid #1974f9; box-shadow:none; color:#fff !important;
}
.custom-banner-slide-item--promo .banner-action-btn--secondary { color:#1265e9 !important; }
@media (max-width:768px) {
  .banner-actions { justify-content:center; }
  .custom-banner-slide-item--promo .custom-banner-page-width { padding:0 6%; }
  .custom-banner-slide-item--promo .custom-banner-content-matrix { padding-bottom:0; }
  .custom-banner-slide-item--promo .banner-text-content-wrapper {
    top:var(--banner-promo-mobile-top,64%); width:100%; transform:none; text-align:center;
  }
  .custom-banner-slide-item--promo .banner-main-title {
    font-size:28px; line-height:1.18; letter-spacing:-.5px; margin:0 0 15px;
  }
  .banner-promo-line { justify-content:center; gap:6px 10px; }
  .banner-promo-text { font-size:28px; }
  .banner-promo-detail { font-size:13px; line-height:1.3; }
  .custom-banner-slide-item--promo .banner-actions { flex-wrap:nowrap; gap:10px; margin-top:18px; }
  .custom-banner-slide-item--promo .banner-action-btn {
    flex:1 1 0; min-width:0; min-height:46px; padding:10px 8px;
    font-size:14px; overflow-wrap:anywhere;
  }
  .custom-banner-slide-item--promo .banner-action-btn--secondary { flex-grow:1.15; background:rgba(255,255,255,.78); }
  @container (max-height:360px) {
    .custom-banner-slide-item--promo .banner-text-content-wrapper { top:50%; transform:translateY(-50%); }
    .custom-banner-slide-item--promo .banner-main-title { font-size:clamp(16px,8cqh,24px); margin-bottom:6px; }
    .banner-promo-text { font-size:clamp(16px,7cqh,24px); }
    .banner-promo-detail { font-size:12px; }
    .custom-banner-slide-item--promo .banner-actions { margin-top:8px; }
  }
}

/* Product promotions: keep carousel controls away from the mobile CTAs. */
@media (max-width: 768px) {
  .custom-banner-slide-item--promo .banner-main-title {
    font-size: clamp(22px, 7.2vw, 28px);
  }
  .custom-banner-slider-container:has(.is-active .custom-banner-slide-item--promo) .custom-banner-slider-controls {
    top: 45%; bottom: auto; left: 0; right: 0;
    transform: translateY(-50%); justify-content: space-between;
    padding: 0 8px; box-sizing: border-box; pointer-events: none;
  }
  .custom-banner-slider-container:has(.is-active .custom-banner-slide-item--promo) .custom-banner-arrow {
    width: 34px; height: 34px; pointer-events: auto;
  }
}

/* Keep the image link independent of visible button labels. */
.custom-banner-slide-item > .custom-banner-slide-link {
  display: block;
  pointer-events: auto;
  cursor: pointer;
}
.custom-banner-link-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
