/* =============================================
   Elegant Carousel Widget v2.5
   
   Breakpoints matched to Elementor config:
   Desktop   : > 1366px
   Laptop    : 1201–1366px
   Tablet L  : 1025–1200px
   Tablet P  : 881–1024px
   Mobile L  : 768–880px
   Mobile P  : ≤ 767px
   ============================================= */

.ecw-wrap {
    position: relative;
    overflow: hidden;
    background-color: #0A0A0A;
    border-radius: 16px;
    padding: 40px 48px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
}
.ecw-wrap *, .ecw-wrap *::before, .ecw-wrap *::after { box-sizing: border-box; }

.ecw-bg-wash {
    position: absolute; inset: 0; pointer-events: none;
    transition: background 0.8s ease; z-index: 0;
}

.ecw-inner {
    position: relative; z-index: 1;
    display: flex; flex-direction: row; align-items: center;
    gap: 48px; flex: 1;
}

/* ── Text side ── */
.ecw-text-side { flex: 1; display: flex; align-items: center; min-width: 0; order: 1; }
.ecw-text-inner { width: 100%; max-width: 480px; }

.ecw-counter { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; transition: opacity 0.5s ease, transform 0.5s ease; }
.ecw-counter-line { display: block; width: 32px; height: 1px; background: #FFFFFF; }
.ecw-counter-text { font-size: 12px; font-weight: 300; letter-spacing: 0.2em; text-transform: uppercase; color: #FFFFFF; }

.ecw-title {
    font-size: 42px; font-weight: 200; letter-spacing: -0.02em; line-height: 1.1;
    color: #FAFAFA; margin: 0 0 16px 0; padding: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ecw-desc {
    font-size: 15px; font-weight: 300; line-height: 1.7; color: #A1A1AA;
    margin-bottom: 32px; max-width: 420px;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.ecw-desc p           { margin: 0 0 10px; padding: 0; color: inherit; font-size: inherit; line-height: inherit; font-weight: inherit; }
.ecw-desc p:last-child { margin-bottom: 0; }
.ecw-desc a           { color: inherit; text-decoration: underline; }
.ecw-desc ul, .ecw-desc ol { margin: 8px 0; padding-left: 20px; color: inherit; font-size: inherit; line-height: inherit; }
.ecw-desc li          { margin-bottom: 6px; line-height: 1.6; color: inherit; font-size: inherit; }
.ecw-desc strong, .ecw-desc b { font-weight: 600; color: #D4D4D8; }
.ecw-desc em, .ecw-desc i { font-style: italic; }

/* Transition */
.ecw-hiding .ecw-counter, .ecw-hiding .ecw-title, .ecw-hiding .ecw-desc { opacity: 0; transform: translateY(-12px); }
.ecw-hiding .ecw-img-frame { opacity: 0; transform: scale(0.97); }

/* Arrows */
.ecw-arrows { display: flex; gap: 12px; }
.ecw-arrow {
    width: 48px; height: 48px; border-radius: 50% !important;
    border: 1.5px solid rgba(255,255,255,0.6) !important; background: transparent !important;
    color: #FFFFFF; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease; padding: 0; outline: none;
    -webkit-appearance: none; appearance: none;
}
.ecw-arrow:hover { color: #FFFFFF; border-color: rgba(255,255,255,1) !important; background: rgba(255,255,255,0.1) !important; }
.ecw-arrow:active { transform: scale(0.95); }
.ecw-arrow svg { flex-shrink: 0; }

/* ── Image side ── */
.ecw-img-side {
    flex: 1; position: relative; display: flex; align-items: center;
    justify-content: center; order: 2;
}
/* Tight wrapper — corners positioned relative to this */
.ecw-img-wrap {
    position: relative;
    width: 100%;
    overflow: visible;
}
.ecw-img-frame {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.ecw-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}
.ecw-img-overlay { position: absolute; inset: 0; pointer-events: none; transition: background 0.8s ease; z-index: 1; }

/* Frame corners */
.ecw-corner {
    position: absolute; width: 48px; height: 48px;
    pointer-events: none; transition: border-color 0.8s ease; z-index: 2;
}
.ecw-corner-tl { top: -8px; left: -8px; border-top: 1px solid; border-left: 1px solid; }
.ecw-corner-br { bottom: -8px; right: -8px; border-bottom: 1px solid; border-right: 1px solid; }


/* =============================================
   PROGRESS BAR
   All 7 items in ONE row on desktop.
   ALL labels forced to exactly 2-line height.
   ============================================= */

.ecw-progress {
    position: relative; z-index: 1;
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: transparent !important;
    background-color: transparent !important;
}

.ecw-prog-item {
    flex: 1 1 0%;
    min-width: 0;
    background: none !important;
    background-color: transparent !important;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.ecw-prog-track {
    width: 100%; height: 2px;
    background: rgba(255,255,255,0.15);
    border-radius: 1px; overflow: hidden;
    margin-bottom: 10px;
}
.ecw-prog-fill {
    height: 100%; background: rgba(255,255,255,0.3);
    border-radius: 1px; width: 0%; transition: width 0.05s linear;
}

.ecw-prog-label {
    display: block;
    font-size: 11px;
    line-height: 1.4;
    min-height: calc(11px * 1.4 * 2); /* reserve 2-line height for alignment */
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    transition: color 0.3s ease, font-weight 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.ecw-prog-item.active .ecw-prog-label {
    color: #FFFFFF;
    font-weight: 600;
}
.ecw-prog-item:hover .ecw-prog-label {
    color: rgba(255,255,255,0.9);
}


/* =============================================
   RESPONSIVE
   ============================================= */

/* ── Laptop: ≤1366 ── */
@media (max-width: 1366px) {
    .ecw-wrap { padding: 36px 40px; min-height: 560px; }
    .ecw-inner { gap: 40px; }
    .ecw-title { font-size: 38px; }
    .ecw-text-inner { max-width: 440px; }

    .ecw-corner { width: 42px; height: 42px; }
    .ecw-corner-tl { top: -7px; left: -7px; }
    .ecw-corner-br { bottom: -7px; right: -7px; }
    .ecw-prog-label { font-size: 10px; min-height: calc(10px * 1.4 * 2); }
    .ecw-progress { gap: 12px; }
}

/* ── Tablet Landscape: ≤1200 ── */
@media (max-width: 1200px) {
    .ecw-wrap { padding: 30px 32px; min-height: 520px; }
    .ecw-inner { gap: 32px; }
    .ecw-title { font-size: 34px; }
    .ecw-desc { font-size: 14px; }
    .ecw-text-inner { max-width: 380px; }

    .ecw-corner { width: 36px; height: 36px; }
    .ecw-corner-tl { top: -6px; left: -6px; }
    .ecw-corner-br { bottom: -6px; right: -6px; }
    .ecw-prog-label { font-size: 9px; letter-spacing: 0.05em; min-height: calc(9px * 1.4 * 2); }
    .ecw-progress {
        gap: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .ecw-progress::-webkit-scrollbar { display: none; }
    .ecw-prog-item {
        flex: 0 0 auto;
        width: 160px;
        min-width: 160px;
        scroll-snap-align: start;
    }
}

/* ── Tablet Portrait: ≤1024 ── */
@media (max-width: 1024px) {
    .ecw-wrap { padding: 28px 28px; min-height: 480px; }
    .ecw-inner { gap: 28px; }
    .ecw-title { font-size: 30px; }
    .ecw-desc { font-size: 13px; max-width: 360px; }
    .ecw-text-inner { max-width: 340px; }

    .ecw-corner { width: 32px; height: 32px; }
    .ecw-corner-tl { top: -5px; left: -5px; }
    .ecw-corner-br { bottom: -5px; right: -5px; }
    .ecw-arrow { width: 42px; height: 42px; }
    .ecw-arrow svg { width: 18px; height: 18px; }
    .ecw-prog-label { font-size: 8px; letter-spacing: 0.04em; min-height: calc(8px * 1.4 * 2); }
    .ecw-prog-item { width: 150px; min-width: 150px; }
    .ecw-prog-track { height: 3px; }
}

/* ── Mobile Landscape: ≤880 ── */
@media (max-width: 880px) {
    .ecw-wrap { padding: 24px 20px; min-height: auto; }
    .ecw-inner { flex-direction: column; gap: 24px; }

    .ecw-img-side  { order: 1 !important; width: 100%; flex: none; }
    .ecw-text-side { order: 2 !important; width: 100%; flex: none; }
    .ecw-text-inner { max-width: 100%; }

    .ecw-img-frame { height: auto; }

    .ecw-title { font-size: 28px; margin-bottom: 12px; }
    .ecw-desc { font-size: 14px; line-height: 1.6; margin-bottom: 24px; max-width: 100%; }
    .ecw-counter { margin-bottom: 16px; }

    .ecw-corner { width: 28px; height: 28px; }
    .ecw-corner-tl { top: -5px; left: -5px; }
    .ecw-corner-br { bottom: -5px; right: -5px; }

    /* Progress: horizontal scroll */
    .ecw-progress {
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scroll-behavior: smooth;
        padding-bottom: 6px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .ecw-progress::-webkit-scrollbar { display: none; }

    .ecw-prog-item {
        flex: 0 0 auto;
        width: 200px;
        min-width: 200px;
        padding: 0;
        scroll-snap-align: start;
    }
    .ecw-prog-label {
        font-size: 11px;
        min-height: auto;
        white-space: normal;
        color: rgba(255,255,255,0.75);
    }
    .ecw-prog-item.active .ecw-prog-label {
        color: #FFFFFF;
        font-weight: 600;
    }
    .ecw-prog-track { height: 3px; }
}

/* ── Mobile Portrait: ≤767 ── */
@media (max-width: 767px) {
    .ecw-wrap { padding: 20px 14px; border-radius: 12px; }
    .ecw-inner { gap: 20px; }
    .ecw-img-frame { height: auto; }
    .ecw-title { font-size: 24px; }
    .ecw-desc { font-size: 13px; margin-bottom: 20px; }
    .ecw-counter { margin-bottom: 12px; }
    .ecw-counter-text { font-size: 11px; }
    .ecw-counter-line { width: 24px; }
    .ecw-arrow { width: 38px; height: 38px; }
    .ecw-arrow svg { width: 16px; height: 16px; }
    .ecw-arrows { gap: 8px; }
    .ecw-corner { width: 22px; height: 22px; }
    .ecw-corner-tl { top: -4px; left: -4px; }
    .ecw-corner-br { bottom: -4px; right: -4px; }

    .ecw-progress { margin-top: 20px; padding-top: 16px; }
    .ecw-prog-item {
        width: 180px;
        min-width: 180px;
        padding: 0;
    }
    .ecw-prog-label {
        font-size: 10px;
        min-height: auto;
        white-space: normal;
        color: rgba(255,255,255,0.75);
    }
    .ecw-prog-item.active .ecw-prog-label {
        color: #FFFFFF;
    }
}