/* ==========================================================================
   HERO SHOWCASE COMPONENT STYLES (REVISED)
   ========================================================================== */

:root {
    --emu-primary: #9d0b03;
    --emu-primary-soft: rgba(157, 11, 3, 0.08);
    --emu-border: #e2e8f0;
    --emu-text-dark: #1e293b;
    --emu-text-muted: #64748b;
}

.hero-showcase-section {
    overflow: hidden;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--emu-text-dark);
}

.hero-title .text-subtle {
    font-weight: 400;
    color: var(--emu-text-muted);
}

.hero-subtitle {
    max-width: 580px;
    font-size: 0.95rem;
    color: var(--emu-text-muted);
}

.hero-welcome-badge {
    font-size: 0.825rem;
    padding: 0.35rem 0.85rem;
    background: var(--emu-primary-soft);
    color: var(--emu-primary);
    border-radius: 50rem;
}


/* Navigation Layout */

.hero-carousel-wrapper {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 12px;
    align-items: center;
}

.carousel-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--emu-border);
    background: #ffffff;
    color: var(--emu-text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.carousel-nav-btn:hover {
    background: var(--emu-primary);
    color: #ffffff;
    border-color: var(--emu-primary);
}


/* Track Container - Memastikan seluruh 8 kartu dapat discroll tanpa terpotong */

.carousel-track-container {
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 4px;
    width: 100%;
}

.carousel-track-container::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    gap: 12px;
    width: max-content;
    /* Memastikan track membentang penuh mengikuti isi kartu */
}


/* Cards */

.carousel-card {
    min-width: 135px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid var(--emu-border);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    flex-shrink: 0;
    scroll-snap-align: center;
}

.carousel-card .card-icon {
    font-size: 1.25rem;
    color: var(--emu-text-muted);
    margin-bottom: 4px;
    transition: color 0.25s ease;
}

.carousel-card .card-module-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--emu-text-dark);
}

.carousel-card .card-module-sub {
    font-size: 0.725rem;
    color: var(--emu-text-muted);
}

.carousel-card .active-indicator {
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 40px;
    height: 3px;
    background: var(--emu-primary);
    border-radius: 3px 3px 0 0;
    transition: transform 0.25s ease;
}


/* Active Card State */

.carousel-card.active {
    background: #ffffff;
    border-color: var(--emu-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(157, 11, 3, 0.08);
}

.carousel-card.active .card-icon {
    color: var(--emu-primary);
}

.carousel-card.active .active-indicator {
    transform: translateX(-50%) scaleX(1);
}


/* Progress Bar Styles */

.hero-progress-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 320px;
    margin: 0 auto;
}

.progress-counter {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--emu-text-muted);
    letter-spacing: 0.5px;
}

.progress-track {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--emu-primary);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Panel Height Lock & Transition */

.preview-panel-wrapper {
    position: relative;
    min-height: 220px;
    max-width: 900px;
    margin: 0 auto;
}

.preview-panel {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    height: 100%;
}

.preview-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.preview-card {
    height: 100%;
    min-height: 220px;
    background: #ffffff;
    border-color: var(--emu-border) !important;
}

.preview-visual-box {
    min-height: 140px;
}

.btn-emu-primary {
    background-color: var(--emu-primary);
    color: #ffffff;
    border: none;
}

.btn-emu-primary:hover {
    background-color: #7d0902;
    color: #ffffff;
}

.bg-danger-soft {
    background-color: var(--emu-primary-soft);
}

.hero-mini-badge {
    font-size: 0.675rem;
    font-weight: 500;
}


/* Responsive Breakpoints */

@media (max-width: 991.98px) {
    .preview-panel-wrapper {
        min-height: auto;
    }
    .preview-card {
        min-height: auto;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-carousel-wrapper {
        grid-template-columns: 32px minmax(0, 1fr) 32px;
        gap: 8px;
    }
    .carousel-nav-btn {
        width: 32px;
        height: 32px;
    }
}