/* =========================================================
   HUMAN AID FOOTER LOGO — FINAL PROPORTIONAL FIX
   Header and desktop footer structure remain untouched.
   ========================================================= */

/*
 | Footer logo wrapper
 */
footer .footer-brand,
footer .footer-logo,
footer .footer-logo-wrap,
footer .footer-brand-wrap,
footer .footer-logo-link,
footer .site-footer-logo,
.site-footer .footer-brand,
.site-footer .footer-logo,
.site-footer .footer-logo-wrap,
.site-footer .footer-brand-wrap,
.site-footer .footer-logo-link,
.site-footer .site-footer-logo {
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/*
 | Remove the old circular/badge style around the footer logo.
 */
footer .footer-logo-badge,
footer .footer-brand-badge,
footer .logo-badge,
.site-footer .footer-logo-badge,
.site-footer .footer-brand-badge,
.site-footer .logo-badge {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    width: auto !important;
    height: auto !important;

    padding: 0 !important;
    margin: 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/*
 | Desktop footer logo:
 | preserve the original aspect ratio and keep a sensible size.
 */
footer .footer-brand img,
footer .footer-logo img,
footer .footer-logo-wrap img,
footer .footer-brand-wrap img,
footer .footer-logo-link img,
footer .site-footer-logo img,
footer img.footer-logo,
footer img.footer-brand-logo,
footer img[alt*="Human Aid"],
footer img[alt*="হিউম্যান"],
.site-footer .footer-brand img,
.site-footer .footer-logo img,
.site-footer .footer-logo-wrap img,
.site-footer .footer-brand-wrap img,
.site-footer .footer-logo-link img,
.site-footer .site-footer-logo img,
.site-footer img.footer-logo,
.site-footer img.footer-brand-logo {
    display: block !important;

    width: auto !important;
    height: auto !important;

    min-width: 0 !important;
    min-height: 0 !important;

    max-width: 245px !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: contain !important;
    object-position: left center !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* =========================================================
   MOBILE FOOTER
   ========================================================= */

@media (max-width: 820px) {

    /*
     | Center only the footer brand/logo area.
     */
    footer .footer-brand,
    footer .footer-logo,
    footer .footer-logo-wrap,
    footer .footer-brand-wrap,
    footer .footer-logo-link,
    footer .site-footer-logo,
    footer .footer-logo-badge,
    footer .footer-brand-badge,
    footer .logo-badge,
    .site-footer .footer-brand,
    .site-footer .footer-logo,
    .site-footer .footer-logo-wrap,
    .site-footer .footer-brand-wrap,
    .site-footer .footer-logo-link,
    .site-footer .site-footer-logo,
    .site-footer .footer-logo-badge,
    .site-footer .footer-brand-badge,
    .site-footer .logo-badge {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        max-width: 100% !important;

        margin-right: auto !important;
        margin-left: auto !important;

        text-align: center !important;
    }

    /*
     | Use width instead of a forced height.
     | This prevents the logo from looking compressed or distorted.
     */
    footer .footer-brand img,
    footer .footer-logo img,
    footer .footer-logo-wrap img,
    footer .footer-brand-wrap img,
    footer .footer-logo-link img,
    footer .site-footer-logo img,
    footer img.footer-logo,
    footer img.footer-brand-logo,
    footer img[alt*="Human Aid"],
    footer img[alt*="হিউম্যান"],
    .site-footer .footer-brand img,
    .site-footer .footer-logo img,
    .site-footer .footer-logo-wrap img,
    .site-footer .footer-brand-wrap img,
    .site-footer .footer-logo-link img,
    .site-footer .site-footer-logo img,
    .site-footer img.footer-logo,
    .site-footer img.footer-brand-logo {
        width: min(260px, 76vw) !important;
        height: auto !important;

        min-width: 0 !important;
        min-height: 0 !important;

        max-width: min(260px, 76vw) !important;
        max-height: none !important;

        margin: 0 auto 22px !important;

        object-fit: contain !important;
        object-position: center !important;
    }

    /*
     | Footer copyright and developer credential only.
     | Other footer content remains left aligned.
     */
    footer .footer-bottom,
    footer .footer-bottom-inner,
    footer .footer-copyright,
    footer .footer-credit,
    footer .footer-credits,
    footer .footer-credential,
    footer .footer-credentials,
    footer .copyright,
    footer .copyright-text,
    .site-footer .footer-bottom,
    .site-footer .footer-bottom-inner,
    .site-footer .footer-copyright,
    .site-footer .footer-credit,
    .site-footer .footer-credits,
    .site-footer .footer-credential,
    .site-footer .footer-credentials,
    .site-footer .copyright,
    .site-footer .copyright-text {
        width: 100% !important;
        max-width: 100% !important;

        margin-right: auto !important;
        margin-left: auto !important;

        text-align: center !important;
    }

    footer .footer-bottom-inner,
    .site-footer .footer-bottom-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;

        gap: 4px !important;

        padding-right: 18px !important;
        padding-left: 18px !important;
    }

    footer .footer-bottom p,
    footer .footer-bottom span,
    footer .footer-bottom a,
    footer .footer-copyright,
    footer .footer-copyright a,
    footer .footer-credit,
    footer .footer-credit a,
    footer .footer-credits,
    footer .footer-credits a,
    .site-footer .footer-bottom p,
    .site-footer .footer-bottom span,
    .site-footer .footer-bottom a,
    .site-footer .footer-copyright,
    .site-footer .footer-copyright a,
    .site-footer .footer-credit,
    .site-footer .footer-credit a {
        text-align: center !important;
    }
}

/* Smaller phones */
@media (max-width: 480px) {

    footer .footer-brand img,
    footer .footer-logo img,
    footer .footer-logo-wrap img,
    footer .footer-brand-wrap img,
    footer .footer-logo-link img,
    footer .site-footer-logo img,
    footer img.footer-logo,
    footer img.footer-brand-logo,
    footer img[alt*="Human Aid"],
    footer img[alt*="হিউম্যান"],
    .site-footer .footer-brand img,
    .site-footer .footer-logo img,
    .site-footer .footer-logo-wrap img,
    .site-footer .footer-brand-wrap img,
    .site-footer .footer-logo-link img,
    .site-footer .site-footer-logo img,
    .site-footer img.footer-logo,
    .site-footer img.footer-brand-logo {
        width: min(230px, 76vw) !important;
        max-width: min(230px, 76vw) !important;
    }
}

/* FOOTER LOGO CONTRAST PLATE: START */

/*
 | The footer background is dark while the logo slogan is also dark.
 | A soft light plate keeps the complete logo readable.
 */
footer .footer-brand,
footer .footer-logo-wrap,
footer .footer-brand-wrap,
footer .footer-logo-link,
footer .site-footer-logo,
.site-footer .footer-brand,
.site-footer .footer-logo-wrap,
.site-footer .footer-brand-wrap,
.site-footer .footer-logo-link,
.site-footer .site-footer-logo {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    max-width: 100% !important;
    min-height: 0 !important;

    padding: 12px 18px !important;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.98),
            rgba(241,248,246,.96)
        ) !important;

    border: 1px solid rgba(255,255,255,.70) !important;
    border-radius: 14px !important;

    box-shadow:
        0 10px 28px rgba(0,0,0,.18),
        inset 0 1px 0 rgba(255,255,255,.95) !important;
}

/*
 | Neutralize inner badge styling so only one clean plate remains.
 */
footer .footer-logo-badge,
footer .footer-brand-badge,
footer .logo-badge,
.site-footer .footer-logo-badge,
.site-footer .footer-brand-badge,
.site-footer .logo-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/*
 | Preserve the original logo ratio.
 */
footer .footer-brand img,
footer .footer-logo img,
footer .footer-logo-wrap img,
footer .footer-brand-wrap img,
footer .footer-logo-link img,
footer .site-footer-logo img,
footer img.footer-logo,
footer img.footer-brand-logo,
footer img[alt*="Human Aid"],
footer img[alt*="হিউম্যান"],
.site-footer .footer-brand img,
.site-footer .footer-logo img,
.site-footer .footer-logo-wrap img,
.site-footer .footer-brand-wrap img,
.site-footer .footer-logo-link img,
.site-footer .site-footer-logo img,
.site-footer img.footer-logo,
.site-footer img.footer-brand-logo {
    display: block !important;

    width: auto !important;
    height: auto !important;

    max-width: 225px !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: contain !important;
    object-position: center !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Mobile */
@media (max-width: 820px) {

    footer .footer-brand,
    footer .footer-logo-wrap,
    footer .footer-brand-wrap,
    footer .footer-logo-link,
    footer .site-footer-logo,
    .site-footer .footer-brand,
    .site-footer .footer-logo-wrap,
    .site-footer .footer-brand-wrap,
    .site-footer .footer-logo-link,
    .site-footer .site-footer-logo {
        display: flex !important;

        width: fit-content !important;
        max-width: calc(100% - 40px) !important;

        margin-right: auto !important;
        margin-left: auto !important;

        padding: 11px 16px !important;

        border-radius: 12px !important;
    }

    footer .footer-brand img,
    footer .footer-logo img,
    footer .footer-logo-wrap img,
    footer .footer-brand-wrap img,
    footer .footer-logo-link img,
    footer .site-footer-logo img,
    footer img.footer-logo,
    footer img.footer-brand-logo,
    footer img[alt*="Human Aid"],
    footer img[alt*="হিউম্যান"],
    .site-footer .footer-brand img,
    .site-footer .footer-logo img,
    .site-footer .footer-logo-wrap img,
    .site-footer .footer-brand-wrap img,
    .site-footer .footer-logo-link img,
    .site-footer .site-footer-logo img,
    .site-footer img.footer-logo,
    .site-footer img.footer-brand-logo {
        width: min(190px, 58vw) !important;
        height: auto !important;

        max-width: min(190px, 58vw) !important;
        max-height: none !important;

        margin: 0 !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {

    footer .footer-brand,
    footer .footer-logo-wrap,
    footer .footer-brand-wrap,
    footer .footer-logo-link,
    footer .site-footer-logo,
    .site-footer .footer-brand,
    .site-footer .footer-logo-wrap,
    .site-footer .footer-brand-wrap,
    .site-footer .footer-logo-link,
    .site-footer .site-footer-logo {
        max-width: calc(100% - 32px) !important;
        padding: 10px 14px !important;
    }

    footer .footer-brand img,
    footer .footer-logo img,
    footer .footer-logo-wrap img,
    footer .footer-brand-wrap img,
    footer .footer-logo-link img,
    footer .site-footer-logo img,
    footer img.footer-logo,
    footer img.footer-brand-logo,
    footer img[alt*="Human Aid"],
    footer img[alt*="হিউম্যান"],
    .site-footer .footer-brand img,
    .site-footer .footer-logo img,
    .site-footer .footer-logo-wrap img,
    .site-footer .footer-brand-wrap img,
    .site-footer .footer-logo-link img,
    .site-footer .site-footer-logo img,
    .site-footer img.footer-logo,
    .site-footer img.footer-brand-logo {
        width: min(175px, 56vw) !important;
        max-width: min(175px, 56vw) !important;
    }
}

/* FOOTER LOGO CONTRAST PLATE: END */
