/* ================================================
   Dynamic Showcase 2 – Styles
   ================================================ */

/* ── Reset ── */
.dsw2-wrap,
.dsw2-wrap *,
.dsw2-wrap *::before,
.dsw2-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Layout ── */
.dsw2-wrap {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    font-family: inherit;
}

/* ── Left Sidebar ── */
.dsw2-sidebar {
    width: 340px;
    min-width: 340px;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.dsw2-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 24px;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}

.dsw2-item:hover {
    background: #f9fafb;
}

.dsw2-item.active {
    background: #fef2f2;
    border-left-color: #b91c1c;
}

.dsw2-item-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b91c1c;
    font-size: 16px;
}

.dsw2-item-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.dsw2-item-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dsw2-item-title {
    font-weight: 700;
    font-size: 15px;
    color: #1f2937;
    line-height: 1.3;
}

.dsw2-item-sub {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* ── Right Panels ── */
.dsw2-panels {
    flex: 1;
    position: relative;
    min-height: 320px;
}

.dsw2-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 28px 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    flex-direction: column;
}

.dsw2-panel.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.dsw2-panel-heading {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

/* ── Cards ── */
.dsw2-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.dsw2-card {
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: inherit;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
    border-radius: 6px;
}

.dsw2-card:last-child {
    border-bottom: none;
}

.dsw2-card:hover {
    background: #f9fafb;
}

.dsw2-card-img {
    width: 110px;
    height: 72px;
    min-width: 110px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.dsw2-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dsw2-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.dsw2-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dsw2-card-excerpt {
    font-size: 12.5px;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── View All link ── */
.dsw2-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 600;
    color: #b91c1c;
    text-decoration: none;
    transition: gap 0.2s;
}

.dsw2-view-all:hover {
    gap: 10px;
}

.dsw2-arrow {
    font-size: 16px;
    line-height: 1;
}

/* ── Mobile accordion body (hidden on desktop) ── */
.dsw2-mob-body {
    display: none;
}

/* ================================================
   Responsive
   ================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .dsw2-sidebar {
        width: 280px;
        min-width: 280px;
    }

    .dsw2-panel {
        padding: 22px 24px;
    }

    .dsw2-card-img {
        width: 90px;
        height: 60px;
        min-width: 90px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .dsw2-wrap {
        flex-direction: column;
        border-radius: 10px;
    }

    .dsw2-sidebar {
        width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 0;
    }

    /* hide desktop panels on mobile */
    .dsw2-panels {
        display: none;
    }

    /* show mobile accordion body */
    .dsw2-item {
        flex-wrap: wrap;
        border-left: none;
        border-bottom: 1px solid #f3f4f6;
        position: relative;
        padding-right: 44px;
    }

    .dsw2-item::after {
        content: '';
        position: absolute;
        right: 18px;
        top: 22px;
        width: 8px;
        height: 8px;
        border-right: 2px solid #9ca3af;
        border-bottom: 2px solid #9ca3af;
        transform: rotate(45deg);
        transition: transform 0.25s;
    }

    .dsw2-item.active::after {
        transform: rotate(-135deg);
    }

    .dsw2-item.active {
        background: #fef2f2;
    }

    .dsw2-mob-body {
        display: none;
        width: 100%;
        padding: 12px 0 4px 36px;
    }

    .dsw2-item.active .dsw2-mob-body {
        display: block;
    }

    .dsw2-mob-body .dsw2-card {
        gap: 12px;
        padding: 8px 0;
    }

    .dsw2-mob-body .dsw2-card-img {
        width: 80px;
        height: 54px;
        min-width: 80px;
    }

    .dsw2-mob-body .dsw2-view-all {
        margin-top: 10px;
        margin-bottom: 6px;
    }
}

@media (max-width: 480px) {
    .dsw2-item {
        padding: 14px 16px;
        padding-right: 40px;
        gap: 10px;
    }

    .dsw2-mob-body {
        padding-left: 26px;
    }

    .dsw2-mob-body .dsw2-card-img {
        width: 64px;
        height: 44px;
        min-width: 64px;
    }
}
