/*SIDE BAR MOBILE*/
@media (max-width: 991.98px) {
    body {
        overflow-x: hidden;
    }
    .mobile-header, .mobile-sidebar {
        z-index: 999;
    }
    .mobile-sidebar {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100%;
        background-color: #ffffff;
        transition: right 0.4s ease-in-out;
    }
    body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
    }
    .mobile-sidebar.active {
        right: 0;
    }

    .mobile-sidebar.active + body::before {
        opacity: 1;
        visibility: visible;
    }
    .mobile-header {
        z-index: 1000;
    }
    .header .mainmenu_nav {
        margin: 0;
        padding: 0;
        text-align: center;
    }
}

/*POP UP TEAMS*/
@media (max-width: 991.98px) {
    /* Mencegah halaman melebar karena elemen di luar layar */
    body {
        overflow-x: hidden;
    }

    /* Pastikan header dan sidebar memiliki z-index yang tinggi */
    .mobile-header, .mobile-sidebar {
        z-index: 999;
    }
    
    /* Aturan dasar untuk sidebar yang tersembunyi */
    .mobile-sidebar {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100%;
        background-color: #ffffff;
        transition: right 0.4s ease-in-out;
    }

    /* Tampilkan sidebar saat kelas 'active' ditambahkan oleh JavaScript */
    .mobile-sidebar.active {
        right: 0;
    }

    /* Perbaikan tampilan pop-up modal di mobile */
    .modal-content-partner {
        width: 95% !important; /* Gunakan !important untuk memastikan aturan ini menimpa yang lain */
        margin: 10px auto !important;
        padding: 15px !important;
    }
    .modal-body-partner {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    .modal-image-container {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 15px !important;
    }
    .modal-image-container img {
        max-width: 100px !important;
        height: auto !important;
    }
    .modal-text-container {
        width: 100% !important;
        text-align: center !important;
    }
}

/* CLIENTS */
@media (max-width: 767px) {
    #clients .row .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }

    #clients .row > div {
        text-align: left;
    }
}

/*POP UP MODAL*/
.team {
    cursor: pointer;
}

.frame {
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

.frame p {
    margin: 0;
}

.values-section .row .col-lg-6 img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 767.98px) {
    .modal-content-partner {
        width: 90% !important;
        margin: auto !important;
    }
    .modal-body-partner {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    .modal-image-container {
        width: 120px !important;
        height: 120px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        text-align: center !important;
    }
    .modal-image-container img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    .modal-text-container {
        width: 100% !important;
        text-align: center !important;
    }
    .modal-body-partner .divider {
        margin: 15px auto !important;
    }
}