/* =====================================================
   Static Timeline for Elementor – v1.0.3
   Mobile: Grid সরিয়ে Flexbox — word-wrap bug final fix
   ===================================================== */

.stwel-wrap *, .stwel-wrap *::before, .stwel-wrap *::after {
    box-sizing: border-box; margin: 0; padding: 0;
}

.stwel-wrap  { width: 100%; padding: 40px 20px; -webkit-font-smoothing: antialiased; }
.stwel-inner { position: relative; display: flex; flex-direction: column; max-width: 1200px; margin: 0 auto; }

/* ── Vertical Line ── */
.stwel-track {
    position: absolute; left: 50%; top: 0; bottom: 0;
    transform: translateX(-50%);
    width: 2px; background: rgba(0,0,0,.08);
    border-radius: 10px; overflow: hidden; z-index: 0;
}
.stwel-line { width: 100%; height: 0; background: #c9982a; border-radius: 10px; transition: height .04s linear; }

/* ══════════════════════════════════════
   DESKTOP  > 600px  (3-column grid)
   ══════════════════════════════════════ */
.stwel-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 56px 1fr;
    align-items: center;
    gap: 24px;
    padding: 10px 0;
    min-height: 80px;
    z-index: 1;
}
.stwel-card-wrap, .stwel-date-wrap { min-width: 0; }

/* LEFT */
.stwel-left .stwel-card-wrap { grid-column: 1; order: 1; justify-content: flex-end;   }
.stwel-left .stwel-mid       { grid-column: 2; order: 2; }
.stwel-left .stwel-date-wrap { grid-column: 3; order: 3; justify-content: flex-start; }
.stwel-left .stwel-card      { text-align: right; }
.stwel-left .stwel-sub       { margin-left: auto; }

/* RIGHT */
.stwel-right .stwel-date-wrap { grid-column: 1; order: 1; justify-content: flex-end; text-align: right; }
.stwel-right .stwel-mid       { grid-column: 2; order: 2; }
.stwel-right .stwel-card-wrap { grid-column: 3; order: 3; justify-content: flex-start; }
.stwel-right .stwel-card      { text-align: left; }

/* ── Card wrap ── */
.stwel-card-wrap { display: flex; width: 100%; }
.stwel-left  .stwel-card-wrap { justify-content: flex-end;   }
.stwel-right .stwel-card-wrap { justify-content: flex-start; }

/* ── Card ── */
.stwel-card {
    background: #ffffff;
    border: 1px solid #e8e8f0;
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 520px;
    width: 100%; min-width: 0;
    box-shadow: 0 2px 20px rgba(0,0,0,.07);
    transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
    word-break: normal;
    overflow-wrap: break-word;
}
.stwel-card:hover { transform: translateY(-3px); }

.stwel-img-wrap { margin-bottom: 14px; border-radius: 8px; overflow: hidden; }
.stwel-img-wrap img { width: 100%; height: auto; display: block; }

.stwel-sub {
    display: inline-block;
    font-family: 'Lato', sans-serif;
    font-size: 11px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    color: #c9982a; background: rgba(201,152,42,.10);
    border-radius: 20px; padding: 3px 10px;
    margin-bottom: 8px; line-height: 1;
}

.stwel-h {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px; font-weight: 700; line-height: 1.35;
    color: #1a1a2e; margin-bottom: 10px;
    word-break: normal; overflow-wrap: break-word;
}

.stwel-p {
    font-family: 'Lato', sans-serif;
    font-size: 15px; line-height: 1.8;
    color: #5a6273; font-weight: 400;
    word-break: normal; overflow-wrap: break-word;
}

/* ── Icon Dot ── */
.stwel-mid { display: flex; justify-content: center; align-items: center; width: 56px; z-index: 2; }
.stwel-dot {
    width: 56px; height: 56px; border-radius: 50%; background: #c9982a;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 0 0 7px rgba(201,152,42,.20), 0 4px 16px rgba(0,0,0,.18);
    transition: transform .3s ease;
}
.stwel-dot:hover { transform: scale(1.08); }
.stwel-ico    { width: 26px; height: 26px; object-fit: contain; filter: brightness(0) invert(1); display: block; }
.stwel-ico-df { width: calc(56px * 0.44); height: calc(56px * 0.44); display: block; }

/* ── Date ── */
.stwel-date-wrap { display: flex; align-items: center; padding: 0 6px; }
.stwel-date { font-family: 'Lato', sans-serif; font-size: 15px; font-weight: 700; color: #c9982a; white-space: nowrap; }

/* ── Animation ── */
.stwel-anim .stwel-hide { opacity: 0; transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1); }
.stwel-anim .stwel-hide.stwel-left  { transform: translateX(-40px); }
.stwel-anim .stwel-hide.stwel-right { transform: translateX(40px);  }
.stwel-anim .stwel-show { opacity: 1 !important; transform: translate(0,0) !important; }

.stwel-empty {
    text-align: center; color: #999; font-size: 14px; line-height: 1.8;
    padding: 30px 20px; background: #f9f9f9; border: 1px dashed #ddd; border-radius: 8px;
}

/* ══════════════════════════════════════
   TABLET  ≤ 860px
   ══════════════════════════════════════ */
@media (max-width: 860px) {
    .stwel-item { gap: 14px; }
    .stwel-card { max-width: 100% !important; padding: 20px 22px; }
    .stwel-h    { font-size: 18px; }
    .stwel-p    { font-size: 14px; }
    .stwel-date { font-size: 13px; }
}

/* ══════════════════════════════════════════════════════
   MOBILE  ≤ 600px
   Grid সরিয়ে Flexbox wrap — word-per-line bug সম্পূর্ণ fix
   ══════════════════════════════════════════════════════ */
@media (max-width: 600px) {

    .stwel-wrap { padding: 20px 12px; }

    /* Line বাম দিকে icon এর পাশে */
    .stwel-track { left: 22px; transform: none; width: 2px; }

    /* ── Item: Flexbox wrap ── */
    .stwel-item {
        display:     flex !important;
        flex-wrap:   wrap;
        align-items: flex-start;
        gap:         0;
        padding:     8px 0;
        min-height:  unset;
    }

    /* ── Icon: বাম দিকে fixed width ── */
    .stwel-left  .stwel-mid,
    .stwel-right .stwel-mid {
        order:      1;
        flex:       0 0 44px;
        width:      44px;
        padding-top:2px;
        align-self: flex-start;
    }
    .stwel-left  .stwel-dot,
    .stwel-right .stwel-dot {
        width: 44px; height: 44px;
        box-shadow: 0 0 0 5px rgba(201,152,42,.18), 0 3px 10px rgba(0,0,0,.14);
    }
    .stwel-ico    { width: 20px; height: 20px; }
    .stwel-ico-df { width: 19px; height: 19px; }

    /* ── Date: icon এর পাশে ── */
    .stwel-left  .stwel-date-wrap,
    .stwel-right .stwel-date-wrap {
        order:           2;
        flex:            1 1 0;          /* বাকি সব width নেয় */
        min-width:       0;
        padding:         4px 0 4px 12px;
        justify-content: flex-start !important;
        text-align:      left !important;
        align-items:     center;
    }
    .stwel-date { font-size: 12px; white-space: normal; font-weight: 700; }

    /* ── Card: নিচে, icon width বাদ দিয়ে পুরো বাকি width ── */
    .stwel-left  .stwel-card-wrap,
    .stwel-right .stwel-card-wrap {
        order:           3;
        flex:            0 0 calc(100% - 44px);   /* icon বাদ দিয়ে বাকি সব */
        max-width:       calc(100% - 44px);
        width:           calc(100% - 44px);
        min-width:       0;
        margin-left:     44px;                     /* icon এর নিচে align */
        padding-left:    12px;
        justify-content: flex-start !important;
    }

    /* ── Card ── */
    .stwel-left  .stwel-card,
    .stwel-right .stwel-card {
        text-align:      left !important;
        max-width:       100% !important;
        width:           100% !important;
        min-width:       0 !important;
        padding:         14px 16px !important;
        border-radius:   8px !important;
        word-break:      normal !important;
        overflow-wrap:   break-word !important;
        hyphens:         none !important;
    }

    /* Reset sub-heading indent */
    .stwel-left  .stwel-sub { margin-left: 0 !important; }
    .stwel-right .stwel-sub { margin-left: 0; }

    /* Typography */
    .stwel-h {
        font-size:     16px !important;
        margin-bottom: 6px;
        line-height:   1.3;
        word-break:    normal !important;
        overflow-wrap: break-word !important;
        white-space:   normal !important;
    }
    .stwel-p {
        font-size:     13px !important;
        line-height:   1.7;
        word-break:    normal !important;
        overflow-wrap: break-word !important;
        white-space:   normal !important;
    }
    .stwel-sub  { font-size: 10px; padding: 2px 8px; margin-bottom: 6px; }
    .stwel-img-wrap { margin-bottom: 10px; border-radius: 6px; }

    /* Animation: side থেকে নয়, নিচ থেকে উঠবে */
    .stwel-anim .stwel-hide.stwel-left,
    .stwel-anim .stwel-hide.stwel-right { transform: translateY(14px); }
}

/* ── Very small ≤ 360px ── */
@media (max-width: 360px) {
    .stwel-card { padding: 12px 13px !important; }
    .stwel-h    { font-size: 15px !important; }
    .stwel-p    { font-size: 12px !important; }
}
