body {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #0078d4;
    align-items: center;
}

img {
    width: 200px;
    height: 200px;
    border-radius: 10px;
}

.row, h3{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    float: none
}

li {
    list-style: none;
    margin: 10px;
    padding: 10px;
    background-color: #0078d4;
    border-radius: 5px;
    width: calc(33.333% - 20px);
    box-sizing: border-box;
}

.col-3 {
    width: 33.333%;
    align-items: center;
    row-gap: 20px;
}

.col-4 {
    width: 25%;
    align-items: center;
}   

h1 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

h3 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

p {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.footer {
    text-align: center;
    margin-top: 20px;
    color: rgb(247, 243, 243);
}

@media screen and (max-width: 850px) {
    .col-3, .col-4 {
        width: 100%;
    }             
}

/* --- 1. Mobile Devices (Max width 767px) --- */
@media (max-width: 767.98px) {
    .row-centered > [class*="col-"] {
        width: 100%; /* Force columns to stack to prevent awkward half-widths */
        float: none;
        margin: 0 auto 15px auto; /* Centers the column and adds bottom spacing */
        text-align: center; /* Align text to the left for better readability on mobile */
    }
}

/* --- 2. iPad Pro & Tablets (768px - 1024px) --- */
@media (min-width: 768px) and (max-width: 1024.98px) {
    .row-centered > [class*="col-"] {
        float: none;
        margin: 0 auto 20px auto; 
    }
}