.main_content {
    padding: 5%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.brand-container {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.brand-card {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    grid-auto-rows: minmax(100px, auto);
    width: 70%;
}

.brand-card img {
    height: auto;
    margin: auto; 
    max-height: 150px;
    max-width: 150px;
    transition: transform 0.3s ease;
}

.brand-card img:hover {
    transform: scale(1.05);
}

.red-line {
    height: 5px;            
    background-color: #BD2133;  
    width: 100%;            
    margin: 20px 0;
    width: 25%;
    margin: auto;
}

/* --------------------- Base styles for mobile devices -------------------------- */
@media (max-width: 768px) {
    .brand-card {
        grid-template-columns: repeat(1, 1fr); 
    }

    .red-line {
        width: 100%;
        margin: 10px 0; 
    }

    .main_content {
        padding: 3%;
    }

    .brand-card img {
        max-width: 100%; 
    }
}

/* ------------ Adjustments specifically for tablets (768px to 1024px) ------------- */
@media (min-width: 769px) and (max-width: 1024px) {
    .brand-card {
        grid-template-columns: repeat(3, 1fr); 
        gap: 20px; 
    }

    .red-line {
        width: 80%; 
        margin: 15px auto;
    }

    .main_content {
        padding: 4%; 
    }

    .brand-card img {
        max-width: 100%; 
    }
}
