/* =============================================================================
   Canasa Hero Banner Widget  (.cb- prefix)
   ============================================================================= */

/* ── Banner container ── */
.cb-banner {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 560px;           /* default, overridden by Elementor */
    background: #111827;
    outline: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ── Slides wrapper ── */
.cb-slides-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ── Individual slide ── */
.cb-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;          /* used for vertical content alignment */
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity var(--cb-speed, 600ms) ease;
    pointer-events: none;
    z-index: 1;
}

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

/* Slide animation — when animation="slide", JS controls transform;
   override fade to make transition instant so slide handles its own */
.cb-anim-slide .cb-slide {
    transition: transform var(--cb-speed, 600ms) ease;
    opacity: 1;          /* slide mode: always visible, moved via transform */
}

.cb-anim-slide .cb-slide:not(.cb-active) {
    transform: translateX(100%);
    z-index: 1;
}

.cb-anim-slide .cb-slide.cb-active {
    transform: translateX(0);
    z-index: 2;
}

/* ── Slide image ── */
.cb-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* ── Image overlay ── */
.cb-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* ── Slide content (headline, subtext, button) ── */
.cb-slide-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;  /* overridden by Elementor selector */
    padding: 40px 60px;       /* overridden by Elementor selector */
    max-width: 600px;         /* overridden by Elementor selector */
    width: 100%;
    box-sizing: border-box;
}

.cb-slide-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin: 0 0 12px;
}

.cb-slide-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0 0 24px;
}

.cb-slide-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #ffffff;
    color: #111827;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    cursor: pointer;
}

.cb-slide-btn:hover {
    background: #f3f4f6;
    color: #111827;
    transform: translateY(-2px);
}

/* ── Navigation arrows ── */
.cb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    padding: 0;
    opacity: 0.85;
}

.cb-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
    opacity: 1;
}

.cb-prev { left: 16px; }
.cb-next { right: 16px; }

/* ── Dot indicators ── */
.cb-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cb-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.cb-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.cb-dot.cb-dot-active {
    background: #ffffff;
    transform: scale(1.25);
}

/* ── Progress bar ── */
.cb-progress-wrap {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: stretch;
    pointer-events: none;
    padding: 0 4px;
    box-sizing: border-box;
}

.cb-progress-wrap.cb-progress-top    { top: 0; }
.cb-progress-wrap.cb-progress-bottom { bottom: 0; }

.cb-progress-track {
    width: 100%;           /* overridden by Elementor slider control */
    height: 4px;           /* overridden by Elementor slider control */
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.cb-progress-fill {
    width: 0%;
    height: 100%;
    background: #ffffff;
    border-radius: inherit;
    /* transition is set dynamically by JS */
}

/* ── Responsive ── */
@media (max-width: 767px) {

    .cb-slide-title   { font-size: 1.6rem; }
    .cb-slide-subtitle { font-size: 0.95rem; }
    .cb-slide-btn     { padding: 10px 22px; font-size: 14px; }

    .cb-arrow {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    .cb-prev { left: 8px; }
    .cb-next { right: 8px; }
}
