/* ===================================================
   FEATURE SHOWCASE COMPONENT
   Left/right interactive feature display
   =================================================== */

/* --- Container & Header --- */
.feature-showcase {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.feature-showcase__header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.feature-showcase__header h1 {
    margin-bottom: 0.25rem;
}

.feature-showcase__header h3 {
    opacity: 0.8;
    font-weight: 400;
}

/* --- Body: Left/Right Split --- */
.feature-showcase__body {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    min-height: 300px;
}

/* --- LEFT: Feature Index --- */
.feature-showcase__index {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-showcase__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border: 2px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    width: 100%;
}

.feature-showcase__item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.feature-showcase__item.active {
    background: rgba(var(--bs-primary-rgb, 0, 123, 255), 0.15);
    border-color: var(--bs-primary, #007bff);
    color: var(--bs-primary, #007bff);
}

.feature-showcase__item i {
    font-size: 1.2rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

/* --- RIGHT: Detail Panel --- */
.feature-showcase__detail {
    flex: 1;
    position: relative;
    min-height: 280px;
}

.feature-showcase__panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-showcase__panel.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.feature-showcase__panel h4 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.feature-showcase__panel p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.feature-showcase__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--bs-primary, #007bff);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.feature-showcase__link:hover {
    gap: 0.75rem;
    text-decoration: underline;
}

/* --- Progress Bar --- */
.feature-showcase__progress {
    margin-top: 1.5rem;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.feature-showcase__progress-bar {
    height: 100%;
    width: 0%;
    background: var(--bs-primary, #007bff);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.feature-showcase.interacted .feature-showcase__progress-bar {
    transition: none;
    width: 100% !important;
    opacity: 0.3;
}

/* ===================================================
   LIGHT SECTION THEME (default Docsy background)
   =================================================== */
.td-block:not(.td-block--dark) .feature-showcase__item {
    background: rgba(0, 0, 0, 0.03);
}

.td-block:not(.td-block--dark) .feature-showcase__item:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}

.td-block:not(.td-block--dark) .feature-showcase__item.active {
    background: rgba(var(--bs-primary-rgb, 0, 123, 255), 0.1);
    border-color: var(--bs-primary, #007bff);
}

.td-block:not(.td-block--dark) .feature-showcase__panel {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.td-block:not(.td-block--dark) .feature-showcase__progress {
    background: rgba(0, 0, 0, 0.08);
}

/* ===================================================
   DARK SECTION THEME
   =================================================== */
.td-block--dark .feature-showcase__item {
    background: rgba(255, 255, 255, 0.07);
}

.td-block--dark .feature-showcase__item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

.td-block--dark .feature-showcase__panel {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
}

/* ===================================================
   RESPONSIVE: Tablet (below 992px)
   =================================================== */
@media (max-width: 991px) {
    .feature-showcase__body {
        flex-direction: column;
        min-height: auto;
    }

    .feature-showcase__index {
        flex: none;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .feature-showcase__item {
        flex: 0 1 auto;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .feature-showcase__detail {
        min-height: 200px;
    }

    .feature-showcase__panel {
        padding: 1.25rem 1.5rem;
    }
}

/* ===================================================
   RESPONSIVE: Phone (below 576px)
   =================================================== */
@media (max-width: 575px) {
    .feature-showcase__index {
        flex-direction: column;
    }

    .feature-showcase__item {
        padding: 0.75rem 1rem;
    }

    .feature-showcase__panel {
        padding: 1rem;
    }

    .feature-showcase__panel h4 {
        font-size: 1.15rem;
    }

    .feature-showcase__panel p {
        font-size: 0.95rem;
    }
}
