/* ========================================
   Engineering Projects Split Showcase
   Scoped under .sv-eng-showcase
   Light editorial layout: featured image + list
   ======================================== */

/* --- Reset: Override global main.css leaks --- */
.sv-eng-showcase h2,
.sv-eng-showcase h3,
.sv-eng-showcase h4 {
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.sv-eng-showcase a,
.sv-eng-showcase button,
.sv-eng-showcase span,
.sv-eng-showcase p,
.sv-eng-showcase img {
    transition: none;
}

.sv-eng-showcase a,
.sv-eng-showcase a:hover,
.sv-eng-showcase a:focus {
    color: inherit;
    text-decoration: none;
    outline: none;
    box-shadow: none;
}

.sv-eng-showcase button,
.sv-eng-showcase button:hover,
.sv-eng-showcase button:focus {
    color: inherit;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    outline: none;
    box-shadow: none;
}

.sv-eng-showcase button::before,
.sv-eng-showcase button::after {
    content: none !important;
    display: none !important;
}

.sv-eng-showcase p {
    margin-bottom: 0;
}

.sv-eng-showcase img {
    max-width: 100%;
}
/* --- End Reset --- */

/* --- Section --- */
.sv-eng-showcase {
    padding: 90px 0 80px;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

/* --- Header --- */
.sv-eng-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 16px;
    padding: 0 20px;
}

.sv-eng-showcase .sv-eng-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #e64c29;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.sv-eng-showcase .sv-eng-subtitle-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.sv-eng-showcase .sv-eng-main-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
    margin-bottom: 0;
}

/* --- Filter Tabs --- */
.sv-eng-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    margin: 0 auto 50px;
    background: #ffffff;
    border-radius: 40px;
    max-width: fit-content;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

button.sv-eng-filter-btn {
    display: inline-block !important;
    position: relative !important;
    z-index: 1;
    padding: 10px 26px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #777 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 30px !important;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4 !important;
    overflow: visible !important;
    text-transform: capitalize;
    margin: 0;
    transition: color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease !important;
}

button.sv-eng-filter-btn:hover {
    color: #1a1a2e !important;
    background: rgba(0, 0, 0, 0.03) !important;
    padding: 10px 26px !important;
    transform: none !important;
}

button.sv-eng-filter-btn.active {
    color: #ffffff !important;
    background: #e64c29 !important;
    box-shadow: 0 4px 14px rgba(230, 76, 41, 0.3) !important;
    padding: 10px 26px !important;
}

button.sv-eng-filter-btn.active:hover {
    color: #ffffff !important;
    background: #cf3f1f !important;
    padding: 10px 26px !important;
    transform: none !important;
}

/* ========================================
   Split Showcase Layout
   ======================================== */

.sv-eng-showcase-layout {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

/* --- Left: Featured Panel --- */
.sv-eng-featured {
    flex: 0 0 58%;
    max-width: 58%;
    display: flex;
    flex-direction: column;
}

/* Image Container with crossfade */
.sv-eng-image-wrap {
    position: relative;
    width: 100%;
    height: 440px;
    border-radius: 14px;
    overflow: hidden;
    background: #e9ecef;
}

.sv-eng-image-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.sv-eng-image-wrap img.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

/* Featured Info below image */
.sv-eng-featured-info {
    padding: 24px 4px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.sv-eng-featured-meta {
    flex: 1;
    min-width: 0;
}

.sv-eng-showcase .sv-eng-featured-type {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(230, 76, 41, 0.1);
    color: #e64c29;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.sv-eng-showcase .sv-eng-featured-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    margin-bottom: 6px;
}

.sv-eng-showcase .sv-eng-featured-bio {
    font-size: 14px;
    color: #777;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* View button */
.sv-eng-showcase .sv-eng-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: #e64c29;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 6px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.sv-eng-showcase .sv-eng-view-btn:hover {
    background: #cf3f1f;
    box-shadow: 0 6px 20px rgba(230, 76, 41, 0.3);
    color: #ffffff;
}

.sv-eng-showcase .sv-eng-view-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[dir="rtl"] .sv-eng-showcase .sv-eng-view-btn svg {
    transform: scaleX(-1);
}

/* --- Right: Project List --- */
.sv-eng-list {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    max-height: 540px;
}

.sv-eng-list-inner {
    padding: 8px 0;
}

/* List Item */
.sv-eng-showcase .sv-eng-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    cursor: pointer;
    position: relative;
    border-left: 3px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease;
}

[dir="rtl"] .sv-eng-showcase .sv-eng-list-item {
    border-left: none;
    border-right: 3px solid transparent;
}

.sv-eng-showcase .sv-eng-list-item:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.sv-eng-showcase .sv-eng-list-item:hover {
    background: #fafafa;
}

.sv-eng-showcase .sv-eng-list-item.active {
    background: rgba(230, 76, 41, 0.04);
    border-left-color: #e64c29;
}

[dir="rtl"] .sv-eng-showcase .sv-eng-list-item.active {
    border-left-color: transparent;
    border-right-color: #e64c29;
}

/* Hidden by filter */
.sv-eng-showcase .sv-eng-list-item.sv-filtered-out {
    display: none;
}

/* Index Number */
.sv-eng-showcase .sv-eng-list-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #bbb;
    background: #f5f5f5;
    transition: background 0.3s ease, color 0.3s ease;
}

.sv-eng-showcase .sv-eng-list-item.active .sv-eng-list-num {
    background: #e64c29;
    color: #ffffff;
}

/* Title in list */
.sv-eng-showcase .sv-eng-list-title {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.sv-eng-showcase .sv-eng-list-item.active .sv-eng-list-title {
    color: #1a1a2e;
    font-weight: 700;
}

/* Type Tag in list */
.sv-eng-showcase .sv-eng-list-tag {
    flex-shrink: 0;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    background: #f0f0f0;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: background 0.3s ease, color 0.3s ease;
}

.sv-eng-showcase .sv-eng-list-item.active .sv-eng-list-tag {
    background: rgba(230, 76, 41, 0.1);
    color: #e64c29;
}

/* Progress bar on active item */
.sv-eng-list-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #e64c29;
    border-radius: 2px;
}

[dir="rtl"] .sv-eng-list-progress {
    left: auto;
    right: 0;
}

.sv-eng-showcase .sv-eng-list-item.active .sv-eng-list-progress {
    animation: svEngProgress 5s linear forwards;
}

.sv-eng-showcase.sv-eng-paused .sv-eng-list-item.active .sv-eng-list-progress {
    animation-play-state: paused;
}

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

/* --- Empty State --- */
.sv-eng-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1199px) {
    .sv-eng-image-wrap { height: 380px; }
    .sv-eng-showcase .sv-eng-featured-title { font-size: 21px; }
}

@media (max-width: 991px) {
    .sv-eng-showcase { padding: 70px 0 60px; }
    .sv-eng-showcase .sv-eng-main-title { font-size: 34px; }

    .sv-eng-showcase-layout {
        flex-direction: column;
        gap: 24px;
    }

    .sv-eng-featured {
        flex: none;
        max-width: 100%;
    }

    .sv-eng-image-wrap { height: 340px; }
    .sv-eng-list { max-height: 320px; }
    .sv-eng-filters { margin-bottom: 36px; }
}

@media (max-width: 767px) {
    .sv-eng-showcase { padding: 50px 0 45px; }
    .sv-eng-showcase .sv-eng-main-title { font-size: 28px; }

    .sv-eng-image-wrap {
        height: 260px;
        border-radius: 12px;
    }

    .sv-eng-featured-info {
        flex-direction: column;
        gap: 14px;
        padding: 18px 0 0;
    }

    .sv-eng-showcase .sv-eng-view-btn {
        width: 100%;
        justify-content: center;
    }

    button.sv-eng-filter-btn {
        padding: 8px 18px !important;
        font-size: 13px !important;
    }

    button.sv-eng-filter-btn:hover,
    button.sv-eng-filter-btn.active,
    button.sv-eng-filter-btn.active:hover {
        padding: 8px 18px !important;
    }

    .sv-eng-filters {
        padding: 4px;
        gap: 4px;
    }

    .sv-eng-showcase .sv-eng-list-item {
        padding: 14px 18px;
        gap: 10px;
    }

    .sv-eng-showcase .sv-eng-list-title { font-size: 14px; }
    .sv-eng-showcase .sv-eng-list-tag { display: none; }

    .sv-eng-list {
        max-height: 260px;
        border-radius: 12px;
    }
}
