/* ==========================================================================
   KREPTOFIX SHOWCASE // DUAL THEME (LIGHT & DARK) 3-VIDEO EXPERIENCE
   ========================================================================== */

/* ── Section Container & Spacing (Clears Floating Navbar) ── */
.kfx-showcase-section {
    position: relative;
    background-color: #f8fafc;
    color: #0f172a;
    padding: 135px 0 115px; /* Ample top clearance so floating navbar never covers title */
    scroll-margin-top: 100px;
    overflow: hidden;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    font-family: 'Tajawal', 'Readex Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html.dark .kfx-showcase-section,
body.dark .kfx-showcase-section,
body.dark-mode .kfx-showcase-section,
.dark .kfx-showcase-section {
    background-color: #080c14 !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Ambient Subtle Glow */
.kfx-showcase-glow {
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    opacity: 0.08;
    background: radial-gradient(circle, #2563eb 0%, transparent 70%);
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

html.dark .kfx-showcase-glow,
body.dark .kfx-showcase-glow {
    opacity: 0.16;
}

/* ── Top Centered Header ── */
.kfx-showcase-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 3.75rem;
    position: relative;
    z-index: 2;
}

.kfx-showcase-title {
    font-size: clamp(2rem, 3.8vw, 3.2rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 0.85rem;
    font-family: 'Tajawal', 'Readex Pro', sans-serif;
    transition: color 0.3s ease;
}

html.dark .kfx-showcase-title,
body.dark .kfx-showcase-title {
    color: #ffffff !important;
}

.kfx-gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

html.dark .kfx-gradient-text,
body.dark .kfx-gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.kfx-showcase-lead {
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    color: #475569;
    line-height: 1.7;
    margin: 0 auto;
    max-width: 640px;
    font-weight: 500;
    transition: color 0.3s ease;
}

html.dark .kfx-showcase-lead,
body.dark .kfx-showcase-lead {
    color: #94a3b8 !important;
}

/* ── Main Layout Grid ── */
.kfx-showcase-grid {
    position: relative;
    z-index: 2;
}

/* ── Sidebar: Features List ── */
.kfx-features-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 0.5rem;
}

.kfx-features-heading-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.75rem;
}

.kfx-features-heading {
    font-size: clamp(1.85rem, 3vw, 2.5rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-family: 'Tajawal', 'Readex Pro', sans-serif;
    margin: 0;
    transition: color 0.3s ease;
}

html.dark .kfx-features-heading,
body.dark .kfx-features-heading {
    color: #ffffff !important;
}

.kfx-features-tag {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

html.dark .kfx-features-tag,
body.dark .kfx-features-tag {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.3);
}

.kfx-features-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ── Interactive Nav Pill (Light & Dark Ready) ── */
.kfx-feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    user-select: none;
    text-align: right;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.kfx-feature-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

html.dark .kfx-feature-item,
body.dark .kfx-feature-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

html.dark .kfx-feature-item:hover,
body.dark .kfx-feature-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
}

/* Active Pill */
.kfx-feature-item.active {
    border-color: #2563eb;
    background: #f0f7ff;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.14);
}

html.dark .kfx-feature-item.active,
body.dark .kfx-feature-item.active {
    border-color: rgba(96, 165, 250, 0.65);
    background: rgba(37, 99, 235, 0.14);
    box-shadow: 0 4px 22px rgba(37, 99, 235, 0.3);
}

/* Numbered Circle Badge */
.kfx-item-num {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

html.dark .kfx-item-num,
body.dark .kfx-item-num {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

.kfx-feature-item.active .kfx-item-num {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

html.dark .kfx-feature-item.active .kfx-item-num,
body.dark .kfx-feature-item.active .kfx-item-num {
    background: #3b82f6;
    color: #ffffff;
    border-color: #60a5fa;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

/* Text Content in Pill */
.kfx-item-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-grow: 1;
    min-width: 0;
}

.kfx-item-label {
    color: #1e293b;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    transition: color 0.25s ease;
}

html.dark .kfx-item-label,
body.dark .kfx-item-label {
    color: #cbd5e1;
}

.kfx-feature-item.active .kfx-item-label {
    color: #1d4ed8;
    font-weight: 800;
}

html.dark .kfx-feature-item.active .kfx-item-label,
body.dark .kfx-feature-item.active .kfx-item-label {
    color: #ffffff !important;
}

.kfx-item-desc {
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.4;
    transition: color 0.25s ease;
}

html.dark .kfx-item-desc,
body.dark .kfx-item-desc {
    color: #94a3b8;
}

.kfx-feature-item.active .kfx-item-desc {
    color: #2563eb;
}

html.dark .kfx-feature-item.active .kfx-item-desc,
body.dark .kfx-feature-item.active .kfx-item-desc {
    color: #93c5fd !important;
}

/* Progress Indicator on Active Pill */
.kfx-pill-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    opacity: 0;
    transition: opacity 0.2s ease;
}

html.dark .kfx-pill-progress,
body.dark .kfx-pill-progress {
    background: rgba(255, 255, 255, 0.08);
}

.kfx-feature-item.active .kfx-pill-progress {
    opacity: 1;
}

.kfx-pill-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    transition: width 0.1s linear;
}

html.dark .kfx-pill-progress-bar,
body.dark .kfx-pill-progress-bar {
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #ffffff);
}

/* ── The Showcase Floating Card ── */
.kfx-showcase-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 14px 16px;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.03);
    color: #0f172a;
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html.dark .kfx-showcase-card,
body.dark .kfx-showcase-card {
    background: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.7), 0 0 35px rgba(37, 99, 235, 0.12) !important;
    color: #f8fafc !important;
}

/* Card Header */
.kfx-showcase-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.kfx-card-icon-box {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 1.1rem;
    transition: all 0.25s ease;
}

html.dark .kfx-card-icon-box,
body.dark .kfx-card-icon-box {
    background: rgba(37, 99, 235, 0.16);
    border-color: rgba(96, 165, 250, 0.35);
    color: #93c5fd;
}

.kfx-card-headline {
    font-size: 1.08rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.4;
    transition: opacity 0.2s ease, color 0.3s ease;
}

html.dark .kfx-card-headline,
body.dark .kfx-card-headline {
    color: #f8fafc !important;
}

.kfx-card-divider {
    height: 1px;
    background: #e2e8f0;
    margin-bottom: 12px;
    transition: background-color 0.3s ease;
}

html.dark .kfx-card-divider,
body.dark .kfx-card-divider {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* ── Screen Viewport (Edge-to-Edge 16:9 Display Without Side Black Bars) ── */
.kfx-screen-viewport {
    background: #000000;
    border-radius: 14px;
    border: 1px solid #1e293b;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 9;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: block;
}

html.dark .kfx-screen-viewport,
body.dark .kfx-screen-viewport {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Screen Topbar (Floating Glassmorphism Overlay) */
.kfx-screen-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 22px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.35) 60%, transparent 100%);
    border-bottom: none;
    z-index: 5;
    pointer-events: auto;
    transition: opacity 0.25s ease;
}

.kfx-window-dots {
    display: flex;
    gap: 6px;
}

.kfx-w-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.kfx-w-dot.dot-red { background: #ef4444; }
.kfx-w-dot.dot-yellow { background: #f59e0b; }
.kfx-w-dot.dot-green { background: #10b981; }

.kfx-screen-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.76rem;
    color: #cbd5e1;
    direction: ltr;
}

.kfx-pill-tag {
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
}

.kfx-screen-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 0.74rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.kfx-screen-action-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* Video Stage Area (Full Viewport Fill) */
.kfx-video-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    cursor: pointer;
}

/* Individual Video Panes */
.kfx-video-pane {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kfx-video-pane.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.kfx-html5-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fills full canvas edge-to-edge eliminating all side black bars */
    object-position: center top;
    background: #000000;
}

/* Pause Overlay on Video Stage */
.kfx-stage-pause-indicator {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 4;
}

.kfx-video-stage.is-paused .kfx-stage-pause-indicator {
    opacity: 1;
    pointer-events: auto;
}

.kfx-pause-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.92);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 0 25px rgba(37, 99, 235, 0.65);
    padding-left: 3px;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.kfx-video-stage:hover .kfx-pause-circle {
    transform: scale(1.08);
}

/* Floating Bottom Controls in Viewport (Floating Glassmorphism Overlay) */
.kfx-screen-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 14px 10px;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
    border-top: none;
    z-index: 5;
    pointer-events: auto;
    transition: opacity 0.25s ease;
}

.kfx-ctrl-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kfx-ctrl-btn {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 0.92rem;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kfx-ctrl-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.kfx-ctrl-btn.active {
    color: #60a5fa;
}

.kfx-ctrl-time {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.76rem;
    color: #94a3b8;
    direction: ltr;
}

.kfx-ctrl-dots-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kfx-ctrl-dot-step {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #334155;
    cursor: pointer;
    transition: all 0.25s ease;
}

.kfx-ctrl-dot-step.active {
    width: 18px;
    border-radius: 999px;
    background: #3b82f6;
}

/* ── Responsive Adjustments ── */
@media (max-width: 991px) {
    .kfx-showcase-section {
        padding: 135px 0 85px;
        scroll-margin-top: 110px;
    }
    .kfx-features-sidebar {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    .kfx-showcase-card {
        padding: 12px;
        border-radius: 16px;
    }
    .kfx-screen-viewport {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 576px) {
    .kfx-showcase-section {
        padding: 130px 0 75px;
        scroll-margin-top: 110px;
    }
    .kfx-showcase-header {
        margin-bottom: 2rem;
    }
    .kfx-showcase-title {
        font-size: 1.75rem;
    }
    .kfx-features-heading {
        font-size: 1.55rem;
    }
    .kfx-feature-item {
        padding: 12px 14px;
        gap: 12px;
    }
    .kfx-item-label {
        font-size: 0.95rem;
    }
    .kfx-item-desc {
        font-size: 0.8rem;
    }
    .kfx-item-num {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    .kfx-card-headline {
        font-size: 0.96rem;
    }
}
