.umb-block-grid__layout-container {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--umb-block-grid--grid-columns, 1), minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-rows: minmax(50px, -webkit-min-content);
    grid-auto-rows: minmax(50px, min-content);
    -moz-column-gap: var(--umb-block-grid--column-gap, 0);
    column-gap: var(--umb-block-grid--column-gap, 0);
    row-gap: var(--umb-block-grid--row-gap, 0);
}

.umb-block-grid__layout-item {
    position: relative;
    /* For small devices we scale columnSpan by three, to make everything bigger than 1/3 take full width: */
    grid-column-end: span min(calc(var(--umb-block-grid--item-column-span, 1) * 3), var(--umb-block-grid--grid-columns));
    grid-row: span var(--umb-block-grid--item-row-span, 1);
}

    .umb-block-grid__layout-item[data-force-left] {
        grid-column-start: 1;
    }

    .umb-block-grid__layout-item[data-force-right] {
        grid-column-start: calc(1 + var(--umb-block-grid--grid-columns) - var(--umb-block-grid--item-column-span));
    }

.umb-block-grid__area-container, .umb-block-grid__block--view::part(area-container) {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--umb-block-grid--area-grid-columns, var(--umb-block-grid--grid-columns, 1)), minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-rows: minmax(50px, -webkit-min-content);
    grid-auto-rows: minmax(50px, min-content);
    --umb-block-grid--areas-column-gap : 30px;
    -moz-column-gap: var(--umb-block-grid--areas-column-gap, 0);
    column-gap: var(--umb-block-grid--areas-column-gap, 0);
    row-gap: var(--umb-block-grid--areas-row-gap, 0);
}

.umb-block-grid__area {
    position: relative;
    /* For small devices we scale columnSpan by three, to make everything bigger than 1/3 take full width: */
    grid-column-end: span min(calc(var(--umb-block-grid--item-column-span, 1) * 3), var(--umb-block-grid--grid-columns));
    grid-row: span var(--umb-block-grid--area-row-span, 1);
}

@media (min-width:1024px) {
    .umb-block-grid__layout-item {
        grid-column-end: span var(--umb-block-grid--item-column-span, 1);
    }

    .umb-block-grid__area {
        grid-column-end: span var(--umb-block-grid--area-column-span, 1);
    }
}

    .files-list-block h2.files-list-heading {
        font-size: 1.8em;
        color: #2c3e50;
        margin-top: 0;
        margin-bottom: 20px;
        border-bottom: 2px solid #3498db;
        padding-bottom: 10px;
    }
    .files-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .files-list li {
        margin-bottom: 12px;
        background-color: #f8f8f8;
        padding: 10px 15px;
        border-radius: 5px;
        transition: background-color 0.2s ease-in-out;
    }
    .files-list li:hover {
        background-color: #eaf2f8;
    }
    .file-link {
        text-decoration: none;
        color: #3498db;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap; /* Allow wrapping on smaller screens */
    }
    .file-link:hover {
        text-decoration: underline;
        color: #2980b9;
    }
    .file-icon {
        font-size: 1.4em;
        color: #7f8c8d;
        /* You can use Font Awesome or custom SVG icons here */
        /* Example using basic emoji as placeholder */
        display: inline-block;
        width: 24px; /* Ensure consistent icon size */
        text-align: center;
    }
    /* Basic icon placeholders - replace with actual icon fonts/SVGs */
    .file-icon.pdf::before { content: "📄"; }
    .file-icon.doc::before, .file-icon.docx::before { content: "📝"; }
    .file-icon.xls::before, .file-icon.xlsx::before { content: "📊"; }
    .file-icon.ppt::before, .file-icon.pptx::before { content: "🖥️"; }
    .file-icon.zip::before, .file-icon.rar::before { content: "🗜️"; }
    .file-icon.jpg::before, .file-icon.jpeg::before, .file-icon.png::before, .file-icon.gif::before { content: "🖼️"; }
    .file-icon.txt::before { content: "📜"; }
    .file-icon:not(.pdf):not(.doc):not(.docx):not(.xls):not(.xlsx):not(.ppt):not(.pptx):not(.zip):not(.rar):not(.jpg):not(.jpeg):not(.png):not(.gif):not(.txt)::before { content: "📁"; } /* Default icon */

    .file-name {
        flex-grow: 1; /* Allow file name to take up available space */
        min-width: 150px; /* Prevent name from becoming too small */
    }
    .file-meta {
        font-size: 0.9em;
        color: #7f8c8d;
        white-space: nowrap; /* Keep meta info on one line if possible */
    }
    .no-files-message {
        color: #95a5a6;
        font-style: italic;
        text-align: center;
        padding: 15px;
        border: 1px dashed #bdc3c7;
        border-radius: 5px;
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
        .files-list-block h2.files-list-heading {
            font-size: 1.5em;
            margin-bottom: 15px;
        }
        .file-link {
            flex-direction: column;
            align-items: flex-start;
            gap: 4px;
        }
        .file-icon {
            margin-right: 0;
        }
        .file-name {
            min-width: unset;
            width: 100%;
        }
        .file-meta {
            margin-left: 0;
            width: 100%;
        }
    }
