/* Forest OS | Central home forest entrances
   One visible card contains each forest's mark, name, and description.
   Scoped to the central home so the four working forests keep their styles. */

#home #forestModulesHome .forest-modules {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

#home #forestModulesHome .forest-module-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: 52px auto;
    align-content: start;
    align-items: center;
    column-gap: 12px;
    row-gap: 12px;
    box-sizing: border-box;
    min-width: 0;
    min-height: 160px;
    margin: 0;
    padding: 19px;
    border: 1px solid var(--forest-entry-line, rgba(75, 112, 83, .18));
    border-radius: 22px;
    background: var(--forest-entry-surface, #edf5ed);
    box-shadow: 0 10px 26px rgba(54, 70, 59, .045);
    color: var(--central-ink);
    text-align: left;
    appearance: none;
}

#home #timeForestModule {
    --forest-entry-surface: #eef2f6;
    --forest-entry-line: rgba(89, 116, 140, .18);
}

#home #wealthForestModule {
    --forest-entry-surface: #fbf3e8;
    --forest-entry-line: rgba(150, 116, 63, .17);
}

#home #learningForestModule {
    --forest-entry-surface: #f5f0f7;
    --forest-entry-line: rgba(117, 97, 127, .17);
}

/* The mark shares the card surface with the title; no second tile or border. */
#home #forestModulesHome .forest-module-icon {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    box-sizing: border-box;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    place-items: center;
}

#home #forestModulesHome .forest-module-icon img {
    display: block;
    width: 50px;
    height: 50px;
    max-width: 100%;
}

#home #forestModulesHome .forest-module-name {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    margin: 0;
    color: var(--central-ink);
    font-size: clamp(17px, 1.5vw, 20px);
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#home #forestModulesHome .forest-module-desc {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    margin: 0;
    color: var(--central-soft);
    font-size: 12px;
    line-height: 1.55;
    opacity: 1;
    overflow-wrap: anywhere;
    white-space: normal;
}

#home #forestModulesHome .forest-module-card.active:hover {
    background: var(--forest-entry-surface, #edf5ed);
    box-shadow: 0 14px 28px rgba(54, 70, 59, .09);
    transform: translateY(-3px);
}

#home #forestModulesHome .forest-module-card:focus-visible {
    outline: 2px solid rgba(70, 98, 78, .6);
    outline-offset: 3px;
}

body.night-mode #home #forestModulesHome .forest-module-card {
    border-color: var(--forest-entry-night-line, rgba(156, 187, 163, .2));
    background: var(--forest-entry-night-surface, #293a30);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .12);
}

body.night-mode #home #timeForestModule {
    --forest-entry-night-surface: #2b3742;
    --forest-entry-night-line: rgba(151, 174, 197, .2);
}

body.night-mode #home #wealthForestModule {
    --forest-entry-night-surface: #3a332b;
    --forest-entry-night-line: rgba(200, 175, 139, .2);
}

body.night-mode #home #learningForestModule {
    --forest-entry-night-surface: #372e3b;
    --forest-entry-night-line: rgba(180, 158, 190, .2);
}

body.night-mode #home #forestModulesHome .forest-module-card.active:hover {
    background: var(--forest-entry-night-surface, #293a30);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
}

@media (max-width: 780px) {
    #home #forestModulesHome .forest-modules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 13px;
    }

    #home #forestModulesHome .forest-module-card {
        grid-template-columns: 44px minmax(0, 1fr);
        grid-template-rows: 46px auto;
        column-gap: 9px;
        row-gap: 9px;
        min-height: 150px;
        padding: 14px;
        border-radius: 20px;
    }

    #home #forestModulesHome .forest-module-icon {
        width: 44px;
        height: 44px;
    }

    #home #forestModulesHome .forest-module-icon img {
        width: 43px;
        height: 43px;
    }

    #home #forestModulesHome .forest-module-name {
        font-size: 17px;
    }

    #home #forestModulesHome .forest-module-desc {
        font-size: 11.5px;
        line-height: 1.5;
    }
}

@media (max-width: 360px) {
    #home #forestModulesHome .forest-module-card {
        grid-template-columns: 40px minmax(0, 1fr);
        column-gap: 7px;
        padding: 12px;
    }

    #home #forestModulesHome .forest-module-icon {
        width: 40px;
        height: 40px;
    }

    #home #forestModulesHome .forest-module-icon img {
        width: 39px;
        height: 39px;
    }

    #home #forestModulesHome .forest-module-name {
        font-size: 16px;
    }
}
