/* ===========================================
   features.css — Scandinavian Clean / Nordic Minimal
   Depends on common.css design-system variables
   =========================================== */

/* ========= Hero ========= */
.features-hero {
    padding: calc(60px + var(--space-3xl)) 0 var(--space-xl);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.features-hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-xl);
}

.hero-text {
    max-width: 580px;
}

.hero-text .section-eyebrow {
    margin-bottom: var(--space-sm);
}

.hero-text .section-title {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: var(--space-sm);
    line-height: 1.25;
}

.hero-text .section-description {
    max-width: 480px;
}

.hero-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
    align-self: flex-end;
    padding-bottom: 4px;
}

.hero-filter-pill {
    padding: 7px 16px;
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hero-filter-pill:hover {
    color: var(--text-body);
    border-color: var(--border-strong);
}

.hero-filter-pill.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-border);
}

/* ========= Catalog layout ========= */
.catalog-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md) var(--space-2xl);
}

.catalog-layout {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
}

/* ========= Sidebar ========= */
.catalog-sidebar {
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: calc(60px + var(--space-md));
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-separator {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    line-height: 1.4;
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.sidebar-link.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.sidebar-link .count {
    font-size: 12px;
    color: var(--text-light);
    font-family: var(--font-mono);
    font-weight: 400;
}

.sidebar-link.active .count {
    color: var(--accent);
    opacity: 0.7;
}

/* ========= Feature list ========= */
.catalog-content {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-surface);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 16px 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.feature-item:hover {
    background: var(--bg-subtle);
}

.feature-item.featured {
    border-left-color: var(--accent);
}

.feature-item.hidden {
    display: none;
}

.feature-item.last-visible {
    border-bottom: none;
}

/* Icon */
.feature-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--radius-md);
    font-size: 16px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.feature-item:hover .feature-item-icon {
    background: var(--accent-border);
}

/* Content */
.feature-item-content {
    flex: 1;
    min-width: 0;
}

.feature-item-content h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    line-height: 1.4;
}

.feature-item-content p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Meta (category + status) */
.feature-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.meta-category {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
}

.status-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.status-tag.status-live {
    color: var(--success);
    background: var(--success-soft);
}

.status-tag.status-beta {
    color: #D97706;
    background: rgba(217, 119, 6, 0.08);
}

/* ========= CTA Banner ========= */
.features-cta-banner {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    padding: var(--space-2xl) var(--space-md);
    text-align: center;
}

.cta-banner-inner {
    max-width: 520px;
    margin: 0 auto;
}

.cta-banner-inner h3 {
    font-family: var(--font-heading);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.cta-banner-inner p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.btn-cta-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--accent);
    background: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-cta-white:hover {
    background: var(--bg-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.btn-cta-white i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.btn-cta-white:hover i {
    transform: translateX(3px);
}

/* ========= Responsive ========= */
@media (max-width: 900px) {
    .features-hero-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .hero-filters {
        align-self: flex-start;
    }

    .catalog-layout {
        flex-direction: column;
        gap: var(--space-md);
    }

    .catalog-sidebar {
        width: 100%;
        position: static;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .sidebar-separator {
        display: none;
    }

    .sidebar-link {
        padding: 7px 14px;
        font-size: 13px;
        width: auto;
    }

    .sidebar-link .count {
        display: none;
    }

    .feature-item-meta {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }
}

@media (max-width: 600px) {
    .features-hero {
        padding-top: calc(60px + var(--space-xl));
        padding-bottom: var(--space-lg);
    }

    .hero-filters {
        display: none;
    }

    .hero-filter-pill {
        padding: 5px 12px;
        font-size: 12px;
    }

    .feature-item {
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px 16px;
    }

    .feature-item-content {
        flex-basis: calc(100% - 52px);
    }

    .feature-item-meta {
        flex-direction: row;
        width: 100%;
        padding-left: 52px;
    }

    .features-cta-banner {
        padding: var(--space-xl) var(--space-md);
    }
}
