/* ========================================================
   ADVANCED FEATURES — SPOTLIGHT TAB DESIGN
   ======================================================== */

.adv-section {
    padding: 100px 0 0;
    background: var(--surface);
    overflow: hidden;
    position: relative;
}

/* ── Section Header ── */
.adv-section-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 1rem;
}

.adv-eyebrow-pill {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.adv-mega-title {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.05;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.adv-gradient-text {
    background: linear-gradient(135deg, #6366f1, #a78bfa, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.adv-lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* ── Tab Bar ── */
.adv-tab-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.adv-tab-bar::-webkit-scrollbar { display: none; }

.tab-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    flex-shrink: 0;
}

.adv-tab {
    background: none;
    border: none;
    cursor: pointer;
    padding: 1.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.adv-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.35s ease;
}

.adv-tab.active::after,
.adv-tab:hover::after {
    transform: scaleX(1);
}

.tab-num {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-secondary);
    opacity: 0.5;
    transition: all 0.3s;
}

.tab-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.3s;
}

.adv-tab.active .tab-num,
.adv-tab.active .tab-label {
    color: var(--primary);
    opacity: 1;
}

/* ── Feature Stage ── */
.adv-stage {
    position: relative;
    min-height: 600px;
}

/* ── Panel ── */
.adv-panel {
    display: none;
    align-items: center;
    gap: 4rem;
    padding: 5rem 4rem 0;
    position: relative;
    animation: panelSlideIn 0.5s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    max-width: 1200px;
    margin: 0 auto;
}

@keyframes panelSlideIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.adv-panel.active { display: flex; }

.panel-bg-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 0%, var(--panel-glow), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ── Panel Left ── */
.panel-left {
    flex: 1;
    position: relative;
    z-index: 1;
}

.panel-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--panel-color);
    background: color-mix(in srgb, var(--panel-color) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--panel-color) 30%, transparent);
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

.panel-title {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.panel-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 440px;
    margin-bottom: 2rem;
}

.panel-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.panel-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.pfeat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.panel-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.p-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
    animation: badgeFloat 4s ease-in-out infinite;
}

.p-badge strong {
    color: var(--text-primary);
}

.p-badge.b1 { animation-delay: 0s; }
.p-badge.b2 { animation-delay: 0.6s; }

@keyframes badgeFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-5px); }
}

[data-theme="dark"] .p-badge {
    background: rgba(255,255,255,0.04);
}

/* ── Panel Right ── */
.panel-right {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    position: relative;
    z-index: 1;
}

.adv-device-wrap {
    position: relative;
    width: 320px;
}

.adv-device {
    width: 280px;
    height: 560px;
    border-radius: 44px;
    border: 10px solid #222;
    box-shadow: 0 40px 80px rgba(0,0,0,0.25), 
                0 0 0 1px rgba(255,255,255,0.05),
                inset 0 0 0 1px rgba(0,0,0,0.4);
    overflow: hidden;
    background: #111;
    position: relative;
}

[data-theme="light"] .adv-device {
    border-color: #e2e8f0;
    box-shadow: 0 40px 80px rgba(0,0,0,0.12), 
                0 0 0 1px rgba(0,0,0,0.05);
    background: #fff;
}

/* Dynamic Island */
.adv-device::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 26px;
    background: #000;
    border-radius: 14px;
    z-index: 10;
}

.adv-device-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Floating Stat Cards ── */
.stat-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    backdrop-filter: blur(16px);
    min-width: 140px;
    animation: floatCard 5s ease-in-out infinite;
}

[data-theme="dark"] .stat-card {
    background: rgba(30, 41, 59, 0.9);
}

.sc-top {
    top: 80px;
    right: -30px;
    animation-delay: 0s;
}

.sc-bottom {
    bottom: 100px;
    right: -20px;
    animation-delay: 1.2s;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.sc-icon {
    font-size: 1.4rem;
}

.sc-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pulse-green  { background: #25D366; animation: pulse 2s infinite; }
.pulse-purple { background: #6366f1; animation: pulse 2s infinite; }
.pulse-amber  { background: #f59e0b; animation: pulse 2s infinite; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
    50%       { box-shadow: 0 0 0 8px transparent; opacity: 0.7; }
}

.sc-info {
    display: flex;
    flex-direction: column;
}

.sc-info span {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.sc-info strong {
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* ── Progress Bar ── */
.adv-progress-bar {
    width: 100%;
    height: 2px;
    background: var(--border);
    position: relative;
    margin-top: 60px;
}

.adv-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width 5000ms linear;
}

/* ── Responsive: Tablet ── */
@media (max-width: 992px) {
    .adv-panel {
        flex-direction: column-reverse;
        padding: 2.5rem 2rem 0;
        gap: 2.5rem;
        align-items: center;
    }

    .panel-left {
        width: 100%;
        text-align: center;
    }

    .panel-desc { max-width: 100%; }
    .panel-badges { justify-content: center; }
    .panel-features { align-items: center; }
    .panel-right { justify-content: center; }

    .sc-top { right: -10px; }
    .sc-bottom { right: -5px; }
}

/* ═══════════════════════════════════════════════════
   MOBILE — Swipe Cards Design
   Hidden on desktop, shown only on mobile
   ═══════════════════════════════════════════════════ */

/* Hide mobile swiper on desktop */
.adv-mobile-swiper,
.adv-swipe-dots {
    display: none;
}

@media (max-width: 768px) {
    /* HIDE the desktop tab/panel UI */
    .adv-tab-bar,
    .adv-stage,
    .adv-progress-bar {
        display: none !important;
    }

    /* SHOW the mobile swiper */
    .adv-mobile-swiper {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        margin-top: 1.5rem;
    }

    .adv-mobile-swiper::-webkit-scrollbar { display: none; }

    /* Each swipe card = one full screen width */
    .adv-swipe-card {
        flex: 0 0 100%;
        scroll-snap-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 2rem 1.5rem 2.5rem;
        position: relative;
        overflow: hidden;
        gap: 1.5rem;
        min-height: 85vh;
    }

    /* Coloured radial glow behind the video */
    .asc-glow {
        position: absolute;
        top: -60px;
        left: 50%;
        transform: translateX(-50%);
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, var(--card-glow), transparent 70%);
        pointer-events: none;
        z-index: 0;
    }

    /* Feature tag */
    .asc-tag {
        position: relative;
        z-index: 1;
        align-self: flex-start;
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: var(--card-color);
        background: color-mix(in srgb, var(--card-color) 12%, transparent);
        border: 1px solid color-mix(in srgb, var(--card-color) 30%, transparent);
        padding: 4px 12px;
        border-radius: 50px;
    }

    /* Phone container + floating badge */
    .asc-phone-wrap {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }

    .asc-phone {
        width: 200px;
        height: 400px;
        border-radius: 38px;
        border: 8px solid #222;
        overflow: hidden;
        background: #111;
        box-shadow: 0 30px 60px rgba(0,0,0,0.3),
                    0 0 0 1px rgba(255,255,255,0.05);
        position: relative;
    }

    [data-theme="light"] .asc-phone {
        border-color: #e2e8f0;
        box-shadow: 0 30px 60px rgba(0,0,0,0.1);
        background: #fff;
    }

    /* Dynamic Island */
    .asc-phone::before {
        content: '';
        position: absolute;
        top: 6px;
        left: 50%;
        transform: translateX(-50%);
        width: 70px;
        height: 18px;
        background: #000;
        border-radius: 10px;
        z-index: 10;
    }

    .asc-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* Floating badge beside the phone */
    .asc-badge {
        position: absolute;
        bottom: 40px;
        right: -20px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 8px 12px;
        font-size: 0.8rem;
        color: var(--text-secondary);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        white-space: nowrap;
        backdrop-filter: blur(10px);
        animation: badgeFloat 4s ease-in-out infinite;
    }

    [data-theme="dark"] .asc-badge {
        background: rgba(30, 41, 59, 0.95);
    }

    .asc-badge strong { color: var(--text-primary); }

    /* Text content below video */
    .asc-content {
        position: relative;
        z-index: 1;
        width: 100%;
        text-align: left;
    }

    .asc-content h3 {
        font-size: 1.65rem;
        font-weight: 800;
        line-height: 1.15;
        color: var(--text-primary);
        margin-bottom: 0.75rem;
    }

    .asc-content p {
        font-size: 0.98rem;
        color: var(--text-secondary);
        line-height: 1.6;
        margin-bottom: 1.25rem;
    }

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

    .asc-features li {
        font-size: 0.95rem;
        color: var(--text-primary);
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* Dot indicators */
    .adv-swipe-dots {
        display: flex !important;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 1.25rem 0 2rem;
    }

    .adv-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--border);
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .adv-dot.active {
        background: var(--primary);
        width: 24px;
        border-radius: 4px;
    }

    /* Section header adjustments */
    .adv-section-header {
        padding: 0 1.25rem;
        margin-bottom: 0.5rem;
    }

    .adv-mega-title {
        font-size: 2rem;
        line-height: 1.1;
    }

    .adv-lead { font-size: 1rem; }
}


/* ── Responsive: Mobile ── */
@media (max-width: 768px) {
    .adv-section {
        padding: 70px 0 0;
    }

    /* Header */
    .adv-section-header {
        padding: 0 1.25rem;
        margin-bottom: 2.5rem;
    }

    .adv-mega-title {
        font-size: 2.2rem;
        line-height: 1.1;
    }

    .adv-lead {
        font-size: 1rem;
    }

    /* Tab Bar — scrollable pills on mobile */
    .adv-tab-bar {
        justify-content: flex-start;
        padding: 0 1rem;
        gap: 0;
    }

    .tab-divider { display: none; }

    .adv-tab {
        padding: 0.85rem 1rem;
        flex-direction: row;
        gap: 6px;
    }

    .tab-num { display: none; }

    .tab-label {
        font-size: 0.82rem;
        white-space: nowrap;
    }

    /* Panels */
    .adv-panel {
        flex-direction: column; /* text TOP, video BOTTOM on mobile */
        padding: 2rem 1.25rem 0;
        gap: 2rem;
        align-items: flex-start;
    }

    .panel-left {
        text-align: left;
        width: 100%;
    }

    .panel-badges { justify-content: flex-start; }
    .panel-features { align-items: flex-start; }

    .panel-title {
        font-size: 1.75rem;
    }

    .panel-desc {
        font-size: 1rem;
        max-width: 100%;
        margin-bottom: 1.25rem;
    }

    .panel-features {
        margin-bottom: 1.5rem;
    }

    /* Device — smaller phone */
    .panel-right {
        width: 100%;
        justify-content: center;
    }

    .adv-device-wrap {
        width: 260px;
        margin: 0 auto;
    }

    .adv-device {
        width: 210px;
        height: 420px;
        border-radius: 36px;
        border-width: 8px;
    }

    /* Dynamic Island */
    .adv-device::before {
        width: 70px;
        height: 20px;
    }

    /* Hide floating stat cards on mobile — they overflow on small screens */
    .stat-card {
        display: none;
    }

    /* Progress bar */
    .adv-progress-bar {
        margin-top: 40px;
    }
}
