/* Adjustments for smaller screens */
@media (max-width: 768px) {
    #top-nav-icon {
        position: fixed;
        top: 0;
        right: 0;
        box-sizing: content-box;
        padding: 8px;
        width: 24px;
        background: #15518a;
        cursor: pointer;
        z-index: 900;
        -webkit-backface-visibility: hidden;
    }

    .clearfix:after {
        content: "";
        clear: both;
        display: table;
    }
    .org-logo {
        display: inline-block !important;
        margin: 1rem;
        max-height: 80px;
        width: auto;
        max-width: 100%;
        z-index: 800;
    }
    .org-logo.desktop-only {
         display: none !important;
    }

    .org-text h1 {
        display: block !important;
        margin: 1rem auto 1.5rem;
        color: #fff;
        font-size: 1.8em;
        font-weight: 500;
        text-shadow: 0 2px 3px #000;
    }
    .org-text .desktop-only {
         display: none !important;
    }

    #top-nav-icon {
        display: block;
    }
    #main-nav {
        display: none;
    }

    /* Cart columns mobile order adjustment - display cart items first */
    .checkoutPage .payment-form-container {
        flex-direction: column-reverse !important;
    }

    .checkoutPage .right-column {
        margin-top: 0 !important;
        margin-bottom: 20px;
    }

    /* Hide the cart checkout button container on mobile for General Cart */
    .checkoutPage #CheckoutBtnContainer.cart-btn {
        display: none !important;
    }

    /* Mobile checkout button styling for General Cart */
    #MobileCheckoutBtnContainer {
        display: block !important;
        width: 100%;
        margin-top: 20px;
        padding: 0 10px;
    }

    #MobileCheckoutBtnContainer .mobile-checkout-btn {
        display: block !important;
        width: 100% !important;
        padding: 12px !important;
        font-size: 1.2rem !important;
        font-weight: bold !important;
        margin-top: 15px !important;
        background-color: #1C6BB6 !important;
        color: white !important;
        border: none !important;
        border-radius: 25px !important;
        cursor: pointer !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
        transition: background-color 0.3s ease !important;
        z-index: 100 !important;
        position: relative !important;
        text-align: center !important;
    }

    #MobileCheckoutBtnContainer .mobile-checkout-btn:hover {
        background-color: #15548f !important;
    }

    #MobileCheckoutBtnContainer .mobile-checkout-btn:active {
        background-color: #0d3c6a !important;
        transform: translateY(1px) !important;
    }
    
    #MobileCheckoutBtnContainer .mobile-checkout-btn:disabled,
    #MobileCheckoutBtnContainer .mobile-checkout-btn.disabled-btn {
        background-color: #a0a0a0 !important;
        cursor: not-allowed !important;
        opacity: 0.7 !important;
    }

    /* Make sure the payment form has enough space */
    .checkoutPage .left-column {
        padding-bottom: 20px !important;
    }
}

@media (max-width: 879px) {
    /* Cart columns mobile order adjustment - display cart items first */
    .checkoutPage .payment-form-container {
        flex-direction: column-reverse !important;
    }

    .checkoutPage .right-column {
        margin-top: 0 !important;
        margin-bottom: 20px;
    }

    /* Hide the cart checkout button container on mobile for General Cart */
    .checkoutPage #CheckoutBtnContainer.cart-btn {
        display: none !important;
    }

    /* Mobile checkout button styling for General Cart */
    #MobileCheckoutBtnContainer {
        display: block !important;
        width: 100%;
        margin-top: 20px;
        padding: 0 10px;
    }

    #MobileCheckoutBtnContainer .mobile-checkout-btn {
        display: block !important;
        width: 100% !important;
        padding: 12px !important;
        font-size: 1.2rem !important;
        font-weight: bold !important;
        margin-top: 15px !important;
        background-color: #1C6BB6 !important;
        color: white !important;
        border: none !important;
        border-radius: 25px !important;
        cursor: pointer !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
        transition: background-color 0.3s ease !important;
        z-index: 100 !important;
        position: relative !important;
        text-align: center !important;
    }
}

@media (max-width: 479px) {
    .org-text .mobile-only {
        font-size: 1.4em;
    }

    #MobileCheckoutBtnContainer .mobile-checkout-btn {
        font-size: 1.1rem !important;
        padding: 10px !important;
    }
}

/* Hide mobile checkout button on desktop */
@media (min-width: 769px) {
    #MobileCheckoutBtnContainer {
        display: none !important;
    }
}


@media (min-width: 480px) and (max-width: 768px) {
    .top-subnav li {
        width: 100%;
    }
    .top-subnav {
        min-width: 200px;
        max-width: 300px;
    }
    .top-subnav, .topnav-level3 {
        position: relative;
    }

    .top-subnav.hidden {
        background-color: transparent;
    }

    #main-menu-box>ul>li.exp ul.top-subnav.mid-mobile {
        display: none !important;
    }
}
