﻿/* ==========================================================================
   CARD COLUMNS (CSS GRID LAYOUT)
   Source: Refactored from GCF_card_2024.css
   Usage: Enables 2-column and 4-column layouts. Auto-scales card height.
   ========================================================================== */

/* 1. The Wrapper */
.cards-wrapper {
    padding-block: 20px;
}

    /* 2. Grid Systems */

    /* Two Columns (Standard Layout) */
    .cards-wrapper > .grid-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    /* Four Columns (KPI / Stat Rows) */
    .cards-wrapper > .grid-row-4 {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }

    /* 3. Equal Height Cards (The "Flex Fix") */
    /* Forces cards to stretch to the height of their grid cell */
    .cards-wrapper .card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    /* Pushes footer to the bottom if content is short */
    .cards-wrapper .card-body {
        flex: 1;
    }

    /* 4. Title Alignment */
    .cards-wrapper .card-title {
        display: flex;
        align-items: center;
        gap: 8px;
        padding-bottom: 20px;
    }

/* 5. Large Stat Font Utility (Often used in Grid layouts) */
.card-stat .card-stat-row .large-font {
    font-size: 80px;
    line-height: 1;
    font-weight: bold;
    color: inherit; /* Inherits from client theme */
}

/* 6. Mobile Responsiveness */
@media (max-width: 1000px) {
    /* Tablet: Collapse 4 columns to 2 */
    .cards-wrapper > .grid-row-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 750px) {
    /* Mobile: Stack everything vertically */
    .cards-wrapper > .grid-row,
    .cards-wrapper > .grid-row-4 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}
