/* =========================================================
   DEDAANDSONS — RESPONSIVE ECOSYSTEM LAUNCHER
   Mobile-first | App-style launcher | No horizontal scroll
========================================================= */

.home-ecosystem {
    --eco-bg: #101827;
    --eco-text: #ffffff;
    --eco-muted: #aab8ca;
    --eco-accent: #8de0c6;

    position: relative;
    isolation: isolate;
    width: calc(100% - 24px);
    max-width: 1200px;
    margin: 24px auto;
    padding: 20px 16px 16px;
    color: var(--eco-text);
    background:
        radial-gradient(circle at 90% 0%, rgba(67, 130, 190, 0.16), transparent 38%),
        linear-gradient(135deg, #101827, #142638);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    box-sizing: border-box;
    min-width: 0;
}

.home-ecosystem *,
.home-ecosystem *::before,
.home-ecosystem *::after {
    box-sizing: border-box;
}

/* =========================================================
   HEADER
========================================================= */

.home-ecosystem-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    min-width: 0;
}

.home-ecosystem-heading {
    width: 100%;
    min-width: 0;
}

.home-ecosystem-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 8px;
    color: var(--eco-accent);
    font-size: 0.62rem;
    font-weight: 750;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.home-ecosystem-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    background: var(--eco-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(141, 224, 198, 0.6);
}

.home-ecosystem-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    font-weight: 750;
    letter-spacing: -0.5px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.home-ecosystem-subtitle {
    max-width: 540px;
    margin: 7px 0 0;
    color: var(--eco-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* =========================================================
   GRID — Mobile first: 3 columns
========================================================= */

.home-ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    min-width: 0;
}

/* =========================================================
   CARD (entire card is a link)
========================================================= */

.home-ecosystem-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    padding: 12px 4px 10px;
    color: #fff;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 14px;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.home-ecosystem-card:active {
    background: rgba(255, 255, 255, 0.09);
}

/* =========================================================
   ICON
========================================================= */

.home-ecosystem-card-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 9px;
}

.home-ecosystem-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(48px, 13vw, 58px);
    height: clamp(48px, 13vw, 58px);
    flex: 0 0 auto;
    padding: 9px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.045));
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 15px;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.home-ecosystem-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
}

.home-ecosystem-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
}

/* =========================================================
   TITLE
========================================================= */

.home-ecosystem-card-title {
    width: 100%;
    margin: 0;
    color: #f5f8fc;
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* =========================================================
   BOTTOM BAR
========================================================= */

.home-ecosystem-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0;
}

.home-ecosystem-bottom-text {
    color: var(--eco-muted);
    font-size: 0.7rem;
    overflow-wrap: anywhere;
}

.home-ecosystem-bottom-link {
    color: var(--eco-accent);
    font-size: 0.74rem;
    font-weight: 650;
    text-decoration: none;
    overflow-wrap: anywhere;
}

/* =========================================================
   VERY SMALL PHONES (≤ 360px)
========================================================= */

@media (max-width: 360px) {
    .home-ecosystem {
        width: calc(100% - 16px);
        padding: 16px 12px 14px;
    }

    .home-ecosystem-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
    }

    .home-ecosystem-card {
        padding: 10px 3px 8px;
    }

    .home-ecosystem-card-title {
        font-size: 0.71rem;
    }
}

/* =========================================================
   LARGER PHONES
========================================================= */

@media (min-width: 480px) {
    .home-ecosystem {
        padding: 22px 20px 18px;
    }

    .home-ecosystem-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 16px;
    }

    .home-ecosystem-grid {
        gap: 8px;
    }

    .home-ecosystem-card {
        padding: 13px 6px 11px;
    }
}

/* =========================================================
   TABLETS
========================================================= */

@media (min-width: 700px) {
    .home-ecosystem {
        padding: 26px 26px 20px;
        border-radius: 20px;
    }

    .home-ecosystem-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }

    .home-ecosystem-card {
        padding: 14px 8px;
    }

    .home-ecosystem-logo {
        width: 62px;
        height: 62px;
        border-radius: 17px;
    }

    .home-ecosystem-card-title {
        font-size: 0.78rem;
    }

    .home-ecosystem-bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* =========================================================
   DESKTOP
========================================================= */

@media (min-width: 1000px) {
    .home-ecosystem {
        margin: 34px auto;
        padding: 28px 32px 22px;
    }

    .home-ecosystem-header {
        margin-bottom: 22px;
    }

    .home-ecosystem-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 12px;
    }

    .home-ecosystem-card {
        padding: 16px 8px;
        border-radius: 16px;
    }

    .home-ecosystem-logo {
        width: 68px;
        height: 68px;
        border-radius: 19px;
    }

    .home-ecosystem-card-title {
        font-size: 0.80rem;
    }

    .home-ecosystem-card:hover {
        background: rgba(255, 255, 255, 0.065);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .home-ecosystem-card:hover .home-ecosystem-logo {
        transform: translateY(-3px);
        background: rgba(255, 255, 255, 0.13);
        box-shadow: 0 9px 22px rgba(0, 0, 0, 0.2);
    }
}

/* =========================================================
   ACCESSIBILITY
========================================================= */

.home-ecosystem-card:focus-visible,
.home-ecosystem-bottom-link:focus-visible {
    outline: 2px solid var(--eco-accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .home-ecosystem *,
    .home-ecosystem *::before,
    .home-ecosystem *::after {
        transition: none !important;
        animation: none !important;
    }
}