/* ==========================================================================
   ECOSYSTEM SECTION
   Product showcase grid for index.html
   Uses problem-card/timeline-result pattern from index-components.css
   Card titles use .ecosystem-card-title (not h-tags) to avoid
   global heading !important overrides from index-base.css
   ========================================================================== */

.ecosystem-section {
    padding: 4rem 0 3rem;
}

.ecosystem-header {
    text-align: center;
    margin-bottom: 3rem;
}

/* Group labels */
.ecosystem-group-label {
    font-family: var(--index-font-primary);
    font-size: var(--index-text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.25rem;
    padding-left: 0.25rem;
}

.ecosystem-group-label--paid {
    color: var(--index-primary);
}

.ecosystem-group-label--free {
    color: var(--index-accent);
}

/* Grid */
.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2.5rem;
    padding: 0;
}

/* Card */
.ecosystem-card {
    background: var(--index-card-bg) !important;
    border: 2px solid var(--index-primary-10) !important;
    border-radius: var(--index-radius-lg) !important;
    padding: 2rem !important;
    text-align: center !important;
    transition: all 0.3s var(--index-ease-organic) !important;
    box-shadow: var(--index-shadow-soft) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    height: 100% !important;
    text-decoration: none !important;
    color: inherit !important;
}

.ecosystem-card:hover {
    transform: translateY(-5px);
    border-color: var(--index-primary);
    box-shadow: var(--index-shadow-strong);
}

.ecosystem-card--free {
    border-color: var(--index-accent-10);
}

.ecosystem-card--free:hover {
    border-color: var(--index-accent);
}

.ecosystem-card--disabled {
    cursor: default;
    opacity: 0.65;
}

.ecosystem-card--disabled:hover {
    transform: none;
    border-color: var(--index-primary-10);
    box-shadow: var(--index-shadow-soft);
}

/* Card logo (product logos) */
.ecosystem-card-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

/* Card icon fallback (SVG for products without logo) */
.ecosystem-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.ecosystem-card-icon--paid {
    background: var(--index-primary);
}

.ecosystem-card-icon--free {
    background: var(--index-accent);
}

.ecosystem-card-icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
}

/* Card title (NOT an h-tag to avoid global !important overrides) */
.ecosystem-card-title {
    font-family: var(--index-font-primary);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--index-charcoal);
    margin-bottom: 0.5rem;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badge */
.ecosystem-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--index-font-primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 5px;
    margin-bottom: 0.75rem;
}

.ecosystem-badge--soon {
    background: var(--index-primary-10);
    color: var(--index-primary);
}

.ecosystem-badge--free {
    background: var(--index-accent-10);
    color: var(--index-accent);
}

/* Card description */
.ecosystem-card p {
    flex-grow: 1 !important;
    text-align: center !important;
}

/* Card CTA (matching .timeline-result pattern) */
.ecosystem-card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--index-radius-sm);
    font-family: var(--index-font-primary) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
    margin-top: auto !important;
    min-height: 48px;
    width: 100%;
    transition: all 0.3s var(--index-ease-organic);
}

.ecosystem-card-cta--paid {
    background: var(--index-primary-10);
    color: var(--index-primary);
}

.ecosystem-card-cta--free {
    background: var(--index-accent-10);
    color: var(--index-accent);
}

.ecosystem-card:hover .ecosystem-card-cta--paid {
    background: var(--index-primary);
    color: white;
}

.ecosystem-card:hover .ecosystem-card-cta--free {
    background: var(--index-accent);
    color: white;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .ecosystem-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .ecosystem-section {
        padding: 3rem 0 2.5rem;
    }

    .ecosystem-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .ecosystem-card-title {
        min-height: auto;
    }

}
