/* --- Universal Responsive Layout (Max 800px) --- */

.recipe-grid {
    display: table; 
    width: 100%;
    max-width: 800px; /* Limits width on desktop */
    margin: 20px auto; /* Centers the table horizontally */
    border-collapse: collapse;
    border: 1px solid #C4E1F2;
    background-color: #ffffff;
}

/* Row styling */
.grid-header, .grid-row {
    display: table-row;
}

.grid-header {
    background-color: #e7f6fe;
    font-weight: bold;
}

/* Cell styling */
.grid-header div, .grid-row div {
    display: table-cell;
    padding: 12px;
    text-align: center;
    border: 1px solid #C4E1F2;
    vertical-align: middle;
}

/* --- Mobile Adaptation (Break-point: 768px) --- */
@media screen and (max-width: 768px) {
    .recipe-grid {
        display: block;
        width: 100%; /* Occupies full width on small screens */
        border: none;
    }

    .grid-header {
        display: none; 
    }

    .grid-row {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #C4E1F2;
        border-radius: 8px;
        overflow: hidden;
    }

    .grid-row div {
        display: flex;
        justify-content: space-between;
        text-align: left;
        padding: 10px;
        border: none;
        border-bottom: 1px dashed #e1f0f9;
    }

    .grid-row div:last-child {
        border-bottom: none;
    }

    /* Column labels from HTML data-label */
    .grid-row div::before {
        content: attr(data-label) ": ";
        font-weight: bold;
        color: #555;
        margin-right: 10px;
    }
}