/* =========================
ECOSYSTEM FILE TRANSFER STYLES
Balanced Grid Layout (PRO)
========================= */

.ecosystem-wrapper {
    background: #0d0d0d;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #2a2a2a;
    font-family: Arial, sans-serif;
}

/* Section */
.ecosystem-section {
    margin-bottom: 40px;
}

.ecosystem-title {
    color: #e5e5e5;
    font-size: 22px;
    margin-bottom: 20px;
    border-left: 4px solid #c1121f;
    padding-left: 12px;
}

/* =========================
GRID (BALANCED SYSTEM)
========================= */

.ecosystem-grid {
    display: grid;
    gap: 20px;

    /* Desktop default */
    grid-template-columns: repeat(4, 1fr);
}

/* Tablet */
@media (max-width: 1100px) {
    .ecosystem-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small tablet */
@media (max-width: 800px) {
    .ecosystem-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 500px) {
    .ecosystem-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
BALANCE LAST ROW (MAGIC)
========================= */

/* 2 items → left & right */
.ecosystem-grid:has(.ecosystem-card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
}

/* 3 items → left center right */
.ecosystem-grid:has(.ecosystem-card:nth-child(3):last-child) {
    grid-template-columns: repeat(3, 1fr);
}

/* 5 items → center last item */
.ecosystem-card:nth-child(5):last-child {
    grid-column: 2 / span 2;
}

/* 7 items → center last item */
.ecosystem-card:nth-child(7):last-child {
    grid-column: 2 / span 2;
}

/* =========================
CARD
========================= */

.ecosystem-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: 0.3s ease;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

.ecosystem-card:hover {
    border-color: #c1121f;
    transform: translateY(-4px);
}

/* Titles */
.ecosystem-card h3 {
    color: #f1f1f1;
    margin-bottom: 15px;
    font-size: 16px;
}

/* Button */
.ecosystem-btn {
    display: inline-block;
    padding: 10px 18px;
    background: linear-gradient(135deg, #c1121f, #780000);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.3s ease;
    margin-top: auto;
}

.ecosystem-btn:hover {
    background: linear-gradient(135deg, #e5383b, #9d0208);
    box-shadow: 0 0 10px rgba(197, 18, 31, 0.5);
}