@media screen and (max-width: 991px) and (orientation: landscape) {
  body {
    overflow-x: hidden !important;
  }
}

@media (max-width: 768px) and (max-height: 500px) {

    /* Prevent navbar layout from breaking */
    .navbar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Force logo container to right side */
    .navbar-brand.custom-logo-box {
        order: 3 !important;            /* Always last = always right */
        margin-left: auto !important;   /* Push it to the right */
        margin-right: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    /* Make sure logo is small enough */
    .section-icon {
        width: 38px !important;
        height: 38px !important;
    }

    /* Remove background box if still applied */
    .logo-box {
        background: none !important;
        padding: 0 !important;
        margin: 0 !important;
        position: static !important;
    }

    /* Prevent toggler and menu from pushing logo */
    .navbar-toggler {
        order: 1 !important;
    }

    .navbar-collapse {
        order: 2 !important;
    }
}