/* Mobile landing-page corrections; desktop layout stays unchanged. */
@media (max-width: 767px) {
    body:has(.home-page) .menu_mb .logo img {
        filter: brightness(0) invert(1);
    }
    /* The banner contains text: show the complete artwork instead of cropping it. */
    .home-page > .h_ss1 {
        height: auto;
        min-height: 0;
        padding-top: 60px;
        background: #781421;
    }
    .home-page > .h_ss1 > img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
    .home-page > .h_ss1 .abs {
        max-width: 100%;
    }
    .home-page .h_thongso .grid {
        grid-auto-rows: auto;
    }
    .home-page .h_thongso .card,
    .home-page .h_thongso .card.card-big {
        min-height: 0;
    }
    .home-page .h_thongso .card .img {
        flex: none;
        aspect-ratio: 16 / 9;
    }
    .home-page .h_thongso .card .stat-img {
        position: relative;
        flex: none;
        padding: 12px 4px 4px;
    }
    .home-page .h_thongso .card .stat-img img {
        position: static;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }
    .home-page #vi-tri .ss3 .left .list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 12px;
        padding: 0 16px;
    }
    .home-page #vi-tri .ss3 .left .list .item {
        min-width: 0;
        width: auto;
        margin: 0;
    }
    .home-page #vi-tri .ss3 .left .list .item p {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
    /* Use a compact bottom dock, reserving room to keep footer controls reachable. */
    body:has(.home-page) {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }
    body:has(.home-page) .soical-main {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        transform: none;
        width: 100%;
        height: auto;
        display: flex;
        justify-content: center;
        flex-direction: row;
        gap: 16px;
        padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
        border-radius: 0;
        box-sizing: border-box;
    }
    body:has(.home-page) .soical-main a {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border: 0;
    }
    body:has(.home-page) .soical-main a img {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }
}
