
/* ─────────────────────────────────────────
   DESKTOP  (≥ 1050px)
───────────────────────────────────────── */

@media only screen and (min-width: 1050px) {
    .sponsor {
        width: 100%;
        height: 100px;
        background-color: var(--background-light);
        /* margin-top: 40px; */
    }

    .sponsor .element {
        width: 50%;
        height: 100px;
        float: left;
    }

    .sponsor h3 {
        font-weight: 600;
        font-size: 16px;
        color: var(--font-text);

        width: 270px;
        float: left;
        margin-top: 20px;
        margin-left: 5px;
    }

    .sponsor .right {
        font-weight: 600;
        font-size: 16px;
        color: var(--font-text);

        width: 270px;
        float: right;
        margin-top: 20px;
        margin-right: 50px;
    }
}



/* ─────────────────────────────────────────
   MOBILE  (< 1050px)
───────────────────────────────────────── */
@media only screen and (max-width: 1049px) {

    .sponsor {
        display: flex;
        flex-direction: column;
        height: auto; /* Allow container to grow vertically */
        gap: 30px;    /* Adds space between the top and bottom sponsor */
        padding: 20px 0;
    }

    /* Make each sponsor element take full width */
    .sponsor .element {
        width: 100% !important;
        height: auto !important;
        float: none !important;
        display: flex;
        align-items: center; /* Vertically center image and text */
        justify-content: center; /* Center the content on mobile screens */
        padding: 0 20px;
        box-sizing: border-box;
    }

    /* Reverse the order of the second element so image comes after text, or keep it consistent */
    .sponsor .element:last-of-type {
        flex-direction: row; /* Keeps image on the right, text on left */
    }

    /* Reset headers to behave nicely in the flexbox layout */
    .sponsor h3, 
    .sponsor .right {
        float: none !important;
        width: auto !important;
        max-width: 90%; /* Prevents text from stretching too wide */
        margin: 0 15px !important; /* Consistent spacing between image and text */
        
        text-align: left; /* Clean left-aligned text for readability */
        /* margin-right: 50px; */
    }

    /* Override the inline styles on the images */
    .sponsor .element img {
        float: none !important;
        margin: 0 !important;
        height: 70px !important; /* Slightly smaller images for mobile screens */
        object-fit: contain;
    }

}