/* ===== How It Works Tabs Widget ===== */
.hiw-wrap {
    --hiw-accent: #e05c2a;
    --hiw-bg: #fce8de;
    --hiw-card-bg: #fdf3ee;
    --hiw-tab-active-bg: #ffffff;
    --hiw-text: #1a1a1a;
    --hiw-muted: #888;
    font-family: inherit;
    width: 100%;
}

/* ── HEADER above card ── */
.hiw-header {
    text-align: center;
    margin-bottom: 20px;
}

.hiw-main-heading {
    font-size: 2rem;
    font-weight: 900;
    font-style: italic;
    color: var(--hiw-text);
    margin: 4px 0 0;
    line-height: 1.2;
}

.hiw-main-sub {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hiw-accent);
    margin: 0;
}

/* ── CARD wrapper ── */
.hiw-card {
    background: var(--hiw-bg);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
}

/* ── TAB BAR ── */
.hiw-tabbar {
    display: grid;
    grid-template-columns: repeat(var(--hiw-tab-count, 4), 1fr);
    background: var(--hiw-bg);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}

.hiw-tab {
    position: relative;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(0,0,0,0.07);
    padding: 14px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, color 0.2s;
    outline: none;
    white-space: nowrap;
}

.hiw-tab:last-child {
    border-right: none;
}

.hiw-tab.active {
    background: var(--hiw-tab-active-bg);
    color: var(--hiw-accent);
    border-radius: 10px 10px 0 0;
}

/* Progress bar under active tab */
.hiw-tab-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--hiw-accent);
    border-radius: 0;
}

.hiw-tab.hiw-counting .hiw-tab-progress {
    animation: hiwProgress var(--hiw-dur, 4000ms) linear forwards;
}

@keyframes hiwProgress {
    from { width: 0; }
    to   { width: 100%; }
}

/* ── PANEL BODY ── */
.hiw-panels {
    background: var(--hiw-tab-active-bg);
    margin: 0 0 0 0;
}

.hiw-panel {
    display: none;
}

.hiw-panel.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 280px;
    animation: hiwFadeIn 0.35s ease;
}

@keyframes hiwFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Left: image */
.hiw-panel-img {
    background: #d6eee8;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    overflow: hidden;
}

.hiw-panel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hiw-panel-img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d6eee8;
    color: #7bbfb0;
    font-size: 4rem;
}

/* Right: text */
.hiw-panel-body {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.hiw-panel-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hiw-text);
    margin: 0 0 14px;
    line-height: 1.25;
}

.hiw-panel-content {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.75;
}

.hiw-panel-content p {
    margin: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
    .hiw-panel.active {
        grid-template-columns: 1fr;
    }
    .hiw-panel-img {
        min-height: 180px;
    }
    .hiw-panel-body {
        padding: 24px 20px;
    }
    .hiw-tabbar {
        grid-template-columns: repeat(2, 1fr);
    }
    .hiw-main-heading {
        font-size: 1.4rem;
    }
}
