/* ============================================
   Additional mobile UX fixes
   ============================================ */
@media (max-width: 767.98px) {
    /* Product page: one image card per line and full-width image */
    .productSec1 ul.product li,
    .productSec1 ul.product.five li,
    ul.product.three li {
        width: 100% !important;
        display: block !important;
    }

    .productSec1 ul.product .box {
        height: auto !important;
    }

    .productSec1 ul.product .box img {
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        padding: 0 !important;
        object-fit: contain !important;
    }

    /* Customer page: one item per line + justified text */
    .customerSec .main-heading,
    .globalCustomerSec1 .desc {
        text-align: justify !important;
    }

    .customerSec ul.customer li,
    .customerSec ul.customer.five li {
        width: 100% !important;
        display: block !important;
    }

    .customerSec ul.customer .box {
        height: 16rem !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .customerSec ul.customer .box img {
        width: auto !important;
        max-width: 90% !important;
        height: auto !important;
        max-height: 10rem !important;
        object-fit: contain !important;
        padding: 0.8rem;
    }

    /* Investors pages: one button per line */
    .investorSec1 .inv-btns {
        grid-template-columns: 1fr !important;
    }

    .inv-btns {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem;
    }

    .inv-btns a.btn-contact,
    .investorSec1 .btn-contact {
        width: 100% !important;
        display: block;
        text-align: center;
    }

    /* CSR page: make cards/items one per line on mobile */
    .impactSec1 .impact-grid {
        grid-template-columns: 1fr !important;
    }

    .trusteeSec1 .trustee-top {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }

    .honorSec1 .honor-row {
        display: block !important;
    }

    .honorSec1 .honor-img,
    .honorSec1 .honor-text {
        width: 100% !important;
    }

    /* CSR page: hide flipbook/PDF loader on mobile */
    #csrFlipbook {
        display: none !important;
    }

    /* Keep close button visible inside viewport on mobile */
    .video-modal .custom-close {
        top: 0.8rem !important;
        right: 0.8rem !important;
        width: 3.2rem !important;
        height: 3.2rem !important;
        font-size: 2.4rem !important;
        border-width: 2px !important;
        z-index: 1056 !important;
    }

    .video-modal .modal-dialog {
        margin: 1rem !important;
    }
}


/* ============================================
   Mobile fixes: top-bar sub-menus
   ============================================ */
@media (max-width: 991.98px) {
    /* Enable scroll on collapsed nav panel itself */
    .navbar .navbar-collapse.show,
    .navbar .navbar-collapse.collapsing {
        max-height: calc(100vh - 8rem);
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    .navbar .dropdown-menu {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 0.6rem !important;
        padding: 1rem !important;
        box-shadow: none !important;
    }

    .navbar .dropdown-menu:before {
        display: none !important;
    }

    /* IMPORTANT: keep submenu collapsed by default */
    .mega-menu,
    #aboutMega,
    #strengthsMega {
        width: 100% !important;
        max-width: 100% !important;
        display: none !important;
        padding: 0.8rem !important;
        margin-top: 0 !important;
    }

    /* Show only when top menu is clicked (Bootstrap adds .show) */
    .mega-menu.show,
    #aboutMega.show,
    #strengthsMega.show {
        display: block !important;
    }

    .mega-card,
    #strengthsMega .mega-card {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }

    .mega-card img {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        border-radius: 0.4rem;
    }

    /* Make opened submenu scrollable */
    .navbar .dropdown-menu.show,
    .navbar .mega-menu.show,
    #aboutMega.show,
    #strengthsMega.show {
        max-height: 70vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }
}

