@media (min-width:1200px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl { max-width: 1400px; }
}
@media(max-width:1699px) {
    .email-form .select2-container { width: 100% !important; }
    /*.sign-in-page { height: 100%; }*/
    .sign-in-detail { height: 100%; }
    .iq-menu-horizontal .iq-sidebar-menu .iq-menu li a { padding: 28px 0 28px 30px; }
}
@media(max-width:1399px) {
    .animation-card .an-img .bodymovin { margin-bottom: -28px; }
    .animation-card .an-img { margin-top: 0; }
}
@media(min-width:1300px) {

    .sidebar-main .iq-sidebar .iq-submenu { opacity: 0; height: 0; }
    .sidebar-main .iq-sidebar:hover  .iq-submenu { opacity: 1; height: auto; }
    /*---------------------------------------------------------------------
    Horizontal Menu Page
    -----------------------------------------------------------------------*/
    .iq-menu-horizontal .iq-sidebar-menu .iq-menu li { position: relative; }
    .iq-page-menu-horizontal .content-page { margin-right: 0; }
    .iq-page-menu-horizontal .iq-footer { margin-right: 0; }
    .iq-page-menu-horizontal .iq-sidebar-logo { padding-top: 0; }
    .iq-page-menu-horizontal .iq-top-navbar .iq-sidebar-logo .top-logo { display: block; }
    .iq-menu-horizontal .iq-sidebar-menu .iq-menu li ul { display: block; position: absolute; top: 100%; padding: 0; min-width: 200px; background: #fff; z-index: 9; box-shadow: 0px 0px 12px 0px rgba(55, 73, 72, 0.06); transition: all 0.45s ease 0s; -webkit-transition: all 0.45s ease 0s; -moz-transition: all 0.45s ease 0s; -o-transition: all 0.45s ease 0s; transform: scale(1, 0); -webkit-transform: scale(1, 0); -moz-transform: scale(1, 0); -o-transform: scale(1, 0); -webkit-transform-origin: 100% 0 0; -moz-transform-origin: 100% 0 0; -o-transform-origin: 100% 0 0; transform-origin: 100% 0 0; }
    .iq-menu-horizontal .iq-sidebar-menu .iq-menu li ul #sidebar-scrollbar { height: 50vh; }
    .iq-menu-horizontal .iq-sidebar-menu li.menu-open>a, .iq-menu-horizontal .iq-sidebar-menu li:hover >a { color: #0084ff; background: transparent; }
    .iq-menu-horizontal .iq-sidebar-menu li:hover > .iq-submenu { display: block; transition: all 0.45s ease 0s; -webkit-transition: all 0.45s ease 0s; -moz-transition: all 0.45s ease 0s; -o-transition: all 0.45s ease 0s; transform: scale(1, 1); -webkit-transform: scale(1, 1); -moz-transform: scale(1, 1); -o-transform: scale(1, 1); }
    .iq-menu-horizontal .iq-sidebar-menu .iq-menu li.menu-open .iq-arrow-right, .iq-menu-horizontal .iq-sidebar-menu .iq-menu li:hover .iq-arrow-right { transform: rotate(-90deg); }
    .iq-menu-horizontal .iq-sidebar-menu .iq-menu li li .iq-arrow-right, .iq-menu-horizontal .iq-sidebar-menu .iq-menu li:hover li .iq-arrow-right { transform: rotate(0deg); }
    .iq-menu-horizontal .iq-sidebar-menu .iq-menu li li a .iq-arrow-right { transform: rotate(0); }
    .iq-menu-horizontal .iq-sidebar-menu .iq-menu li ul li a { padding: 12px 15px; }
    .iq-menu-horizontal .iq-sidebar-menu li > .iq-submenu.iq-submenu-data { opacity: 0; visibility: hidden; right: 100%; top: 0; transition: transform 0.2s; transform: translateX(50px); }
    .iq-menu-horizontal .iq-sidebar-menu li:hover > .iq-submenu.iq-submenu-data { opacity: 1; visibility: visible; transition: all 0.45s ease 0s; transform: translateX(0); }
    .iq-menu-horizontal .iq-sidebar-menu .iq-menu li a:hover, .iq-menu-horizontal .iq-sidebar-menu .iq-menu li.active>a, .iq-menu-horizontal .iq-sidebar-menu .iq-menu li.menu-open>a { background: transparent; }
    .iq-menu-horizontal .iq-sidebar-menu .iq-menu li>a::before { display: none; }

    /*---------------------------------------------------------------------
    sidebar icon with text
    -----------------------------------------------------------------------*/
    body.icon-with-text .iq-sidebar { width: 150px; overflow: unset; }
    body.icon-with-text .iq-sidebar #sidebar-scrollbar { overflow: unset !important; }
    body.icon-with-text .content-page { margin-right: 150px; }
    body.icon-with-text.sidebar-main .iq-sidebar { width: 80px; }
    body.icon-with-text.sidebar-main .iq-sidebar:hover, body.icon-with-text.sidebar-main .iq-sidebar:hover .iq-sidebar-logo { width: 180px; }
    body.icon-with-text.sidebar-main .iq-sidebar-logo { width: 80px; }
    body.icon-with-text.sidebar-main .content-page, body.icon-with-text.sidebar-main .iq-footer { margin-right: 80px; }
    body.icon-with-text .iq-sidebar-logo { width: 150px; position: relative; overflow: hidden; height: 74px; z-index: 9; flex-direction: column; }
    body.icon-with-text .iq-sidebar-menu .iq-menu > li > a { display: flex; flex-direction: column; }
    body.icon-with-text .iq-sidebar-menu .iq-menu li > a > i { margin: 0 0 10px }
    body.icon-with-text .iq-sidebar-menu .iq-menu li li > a > i {margin: 0 0 0 10px;}
    body.icon-with-text .iq-sidebar-menu .iq-menu li ul { background: #858afb; position: absolute; display: block; top: 0; right: 100%; padding: 0; min-width: 200px; opacity: 0; visibility: hidden; transition: transform 0.2s; transform: translateX(-50px); }
    body.icon-with-text .iq-sidebar-menu .iq-menu li:hover > ul { opacity: 1; visibility: visible; transition: all 0.45s ease 0s; transform: translateX(0); }
    body.icon-with-text .iq-sidebar.sidebar-dark .iq-sidebar-menu .iq-menu li ul li a { padding-right: 15px; }
    body.icon-with-text .iq-sidebar-menu .iq-menu li a { padding: 15px; }
    body.icon-with-text .iq-footer { margin-right: 150px; }
    body.icon-with-text .iq-sidebar-menu .iq-menu li a .iq-arrow-right {position: absolute; right: auto; left: 0; top: 27px; font-size: 12px;}
    body.icon-with-text .iq-sidebar-menu .iq-menu .iq-submenu li a .iq-arrow-right {top: 15px;}
    body.icon-with-text .iq-sidebar-menu .iq-menu li a[aria-expanded="true"] .iq-arrow-right, body.icon-with-text .iq-sidebar-menu .iq-menu li.menu-open .iq-arrow-right, body.icon-with-text .iq-sidebar-menu .iq-menu li.active .iq-arrow-right{transform: rotate(0deg);}




    /* top-tab-horizontal */
    .top-tab-horizontal .iq-top-navbar .iq-sidebar-logo .top-logo { display: block; }
    .top-tab-horizontal .iq-sidebar-logo { padding: 0; }
    .top-tab-horizontal .content-page { padding: 80px 15px 0; width: 100%; margin-right: 0; }
    .top-tab-horizontal .iq-footer { margin-right: 0; }
    .tab-menu-horizontal { background: #0084ff; margin-top: 75px; transition: all 0.45s ease 0s; position: fixed; top: 0; right: 0; left: 0; z-index: 9; }
    body.top-tab-horizontal .tab-menu-horizontal.menu-down { top: -60px; transition: all 0.45s ease 0s; opacity: 0; }
    body.top-tab-horizontal .tab-menu-horizontal.menu-up { top: 0; opacity: 1; transition: all 0.45s ease 0s; }
    .iq-menu-horizontal-tab .iq-sidebar-menu .iq-menu li > ul.iq-submenu { display: block; position: absolute; top: 150%; background: #ffffff; min-width: 260px; z-index: 9; padding: 0; opacity: 0; visibility: hidden; box-shadow: 0px 0px 12px 0px rgba(55, 73, 72, 0.06); transition: all 0.45s ease 0s; }
    .iq-menu-horizontal-tab .iq-sidebar-menu .iq-menu > li:hover > ul.iq-submenu{opacity: 1; visibility: visible; top: 100%; transition: all 0.45s ease 0s;}
    .iq-menu-horizontal-tab .iq-sidebar-menu .iq-menu li > ul.iq-submenu#ui-elements { height: 350px; overflow-y: scroll; }
    .iq-menu-horizontal-tab .iq-sidebar-menu .iq-menu li > ul.iq-submenu ul.iq-submenu-data { right: 130%; top: 0; padding: 0; opacity: 0; visibility: hidden; display: block; transition: all 0.45s ease 0s; }
    .iq-menu-horizontal-tab .iq-sidebar-menu .iq-menu li > ul.iq-submenu li:hover ul.iq-submenu-data { right: 100%; opacity: 1; visibility: visible; transition: all 0.45s ease 0s; }
    .iq-menu-horizontal-tab .iq-sidebar-menu .iq-menu > li { padding: 10px 0; }
    .iq-menu-horizontal-tab .iq-sidebar-menu .iq-menu > li > a { border-radius: 4px; padding: 10px 20px; color: #ffffff; transition: all 0.5s ease-out 0s; }
    .iq-menu-horizontal-tab .iq-sidebar-menu .iq-menu > li:hover > a{color: #0084ff; background: #e5f2ff;transition: all 0.5s ease-out 0s;}
    body.top-tab-horizontal .iq-top-navbar .top-menu { border-radius: 0; margin-bottom: 0; padding: 0; min-height: 73px; position: fixed; top: 0; right: 0; width: 100%; display: inline-block; z-index: 99; background: #ffffff; -webkit-box-shadow: 0px 0px 25px 0px rgba(45, 69, 95, 0.1); -moz-box-shadow: 0px 0px 25px 0px rgba(45, 69, 95, 0.1); box-shadow: 0px 0px 25px 0px rgba(45, 69, 95, 0.1); }
    body.top-tab-horizontal .iq-top-navbar { position: static; box-shadow: none; }
}
@media(max-width:1299px) {
    .iq-circle-progressbar .percent { font-size: 1.3rem !important; }
    .iq-circle-progressbar svg { width: 80px !important; height: 80px !important; }
    .iq-circle-progressbar { margin: 0 auto; width: 80px !important; height: 80px !important; }
    .content-page, body.sidebar-main .content-page { margin-right: 0; padding: 100px 0 0; }
    .iq-top-navbar .iq-sidebar-logo .top-logo { display: block; }
    .iq-footer, body.sidebar-main .iq-footer { padding: 15px 10px; margin-right: 0; }
    .iq-sidebar { display: inline-block; z-index: 99; right: -260px; }
    .iq-top-navbar .iq-navbar-custom .navbar-breadcrumb { display: none; }
    .iq-sidebar-logo { width: auto; }
    .iq-top-navbar .iq-navbar-custom .iq-menu-bt { display: inline-block; position: absolute; left: 360px; opacity: 1; }
    body.sidebar-main .iq-top-navbar .iq-sidebar-logo a span { opacity: 1; display: inline-block; }
    body.sidebar-main .iq-sidebar { width: 260px; right: 0; }
    body.sidebar-main .iq-sidebar .iq-sidebar-menu .iq-menu li a span { display: inline-block; opacity: 1; }
    body.sidebar-main .iq-sidebar-menu .iq-menu li a .iq-arrow-right { display: inline-block; }
    .iq-email-to-list ul li { margin: 0 0 0 2px; }
    .an-img-two { width: 600px; top: -118px; }
    .iq-menu-horizontal { position: absolute; right: -100%; left: 0; width: 100%; opacity: 0; top: 100%; width: 260px; background: #fff; height: 80vh; overflow-y: scroll; overflow-x: hidden; transition: all 0.45s ease 0s; }
    .iq-page-menu-horizontal.sidebar-main .iq-menu-horizontal { opacity: 1; right: 0; transition: all 0.45s ease 0s; }
    .iq-sidebar-menu .iq-menu { display: block !important; }
    .iq-menu-horizontal .iq-sidebar-menu .iq-menu li a { padding: 15px 30px 15px 20px; }
    .iq-sidebar-menu .iq-menu li ul { padding-right: 30px; }
    .iq-sidebar-menu .iq-menu li ul.iq-submenu-data { padding-right: 40px; }
    .two-sidebar .content-page { margin-right: 60px; }
    .two-sidebar .iq-footer { margin-right: 60px; }
    body.two-sidebar.sidebar-main .content-page, body.sidebar-main .iq-footer { margin-right: 60px; }
    body.two-sidebar.sidebar-main .iq-sidebar { width: 260px; }
    .two-sidebar .iq-sidebar-logo { width: auto; margin-right: 40px; }
    .tab-menu-horizontal { position: fixed; z-index: 999; top: 75px; right: -260px; width: 260px; overflow: hidden; height: 100vh; overflow-y: scroll; overflow-x: hidden; background: #ffffff; transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; -ms-transition: all 0.3s ease-in-out; -o-transition: all 0.3s ease-in-out; -webkit-transition: all 0.3s ease-in-out; }
    body.top-tab-horizontal.sidebar-main .tab-menu-horizontal{right: 0;}
    body.top-tab-horizontal .iq-menu-horizontal-tab {width: 100%;}
    .iq-sidebar.sidebar-dark-blue .iq-sidebar-menu .iq-menu li ul li a{padding-right: 60px;}
}
@media(max-width:1199px) {
    .an-img-two { display: none; }
    .iq-booking-no li .iq-seat { width: 35px; height: 45px; }
    .iq-booking-no li { width: 4.7%; }
    .iq-email-to-list { overflow-x: scroll; }
    .iq-email-to-list ul li { margin: 0 0 0 5px; }
    .iq-email-to-list .justify-content-between { float: right; width: 900px; }
    .sign-in-from { padding: 0 30px; }
    .sign-in-detail { padding: 100px 50px; }
}
@media(max-width:992px) {
    .an-img-two .bodymovin { display: none; }
    .display-1 { font-size: 4rem; font-weight: 300; }
    .display-2 { font-size: 3.5rem; font-weight: 300; }
    .display-3 { font-size: 3rem; font-weight: 300; }
    .display-4 { font-size: 2.5rem; font-weight: 300; }
    .display-5 { font-size: 2rem; font-weight: 300; }
    .display-6 { font-size: 1.5rem; font-weight: 300; }
    .iq-top-navbar .navbar { position: relative; display: inherit; }
    .iq-top-navbar .navbar-toggler {display: block; left: 85px; top: 18px; position: absolute; color: #0084ff; background: #e5f2ff; border: none; padding: 7px 10px; border-radius: 5px; font-size: 24px; }
    .navbar-collapse { position: absolute; top: 75px; right: 0; width: 100%; background: #fff; -webkit-box-shadow: 0px 5px 12px 0px rgba(55, 73, 72, 0.15); -moz-box-shadow: 0px 5px 12px 0px rgba(55, 73, 72, 0.15); box-shadow: 0px 5px 12px 0px rgba(55, 73, 72, 0.15); }
    .navbar-nav.navbar-list { float: left; display: inline-block; }
    .iq-top-navbar .iq-navbar-custom .iq-menu-bt { left: 130px; top: 18px; }
    .animation-card .an-img .bodymovin { margin-bottom: 0; margin-right: 0; width: 100%; }
    .iq-footer, .iq-footer .col-lg-6.text-right { text-align: center !important; }
    .iq-booking-index { overflow-x: scroll; }
    .seat-booking { width: 980px; position: relative; }
    .seat-booking .col-sm-1 { -ms-flex: 0 0 8.333333%; flex: 0 0 8.333333%; max-width: 8.333333%; width: 8.333333%; }
    .seat-booking .col-sm-10 { -ms-flex: 0 0 83.333333%; flex: 0 0 83.333333%; max-width: 83.333333%; width: 83.333333%; }
    .iq-booking-offer { padding: 30px; }
    .offer-an-img { position: static; width: 100%; }
    .sign-in-from { padding: 0 20px; }
    .iq-maintenance .col-lg-4 { margin-bottom: 15px; }
    .chat-data-left { position: absolute; right: 0; max-width: 320px; top: 0; z-index: 9; background: #fff; transform: translateX(100%); opacity: 0; transition: all 0.45s ease 0s; box-shadow: 0px 0px 12px 0px rgba(55, 73, 72, 0.06); overflow-y: scroll; height: 100%; }
    .chat-sidebar-channel { overflow: auto; height: auto; padding-right: 0 !important; }
    .chat-search { padding-right: 0 !important; }
    .chat-data-left.show { transform: translateX(0); opacity: 1; transition: all 0.45s ease 0s; }
    button.close-btn-res { display: block; background: transparent; border: none; font-size: 20px; font-weight: 600; position: absolute; top: 10px; right: auto; left: 0; }
    .chat-head header { padding-right: 15px; }
    div#sidebar-toggle { display: block; }
    #sidebar-toggle { background: #e5f2ff; padding: 12px 10px; margin-left: 15px; border-radius: 5px; height: 40px; width: 40px; line-height: 17px; text-align: center; color: #0084ff; }
    #chat-user-detail-popup { overflow-y: scroll; padding-bottom: 20px; }
    #user-detail-popup { overflow: scroll; }
    ul.profile-img-gallary li img { width: 100%; }
    .profile-feed-items li a { margin: 0 0 0 5px; }
    .profile-left { order: 2; }
    .profile-center { order: 1; }
    .profile-right { order: 3; }
    .iq-edit-profile .nav-link { font-size: 14px; }
    .stepwizard-row .wizard-step a { padding: 20px 15px; margin: 10px 10px; }
    .top-tab-horizontal .iq-navbar-custom.d-flex {display: block !important;}
    .iq-page-menu-horizontal .iq-navbar-custom.d-flex {display: block !important;}
}
@media(max-width:979px) {
    .iq-circle-progressbar .percent { font-size: 2.5rem !important; }
    .iq-circle-progressbar svg { width: 200px !important; height: 200px !important; }
    .iq-circle-progressbar { margin: 0 auto; width: 200px !important; height: 200px !important; }
}
@media(max-width:767px) {
    .table { width: 100%; max-width: 100%; margin-bottom: 1rem; display: block; overflow-x: auto; }
    .display-1 { font-size: 2.5rem; font-weight: 500; }
    .display-2 { font-size: 2.3rem; font-weight: 500; }
    .display-3 { font-size: 2rem; font-weight: 500; }
    .display-4 { font-size: 1.6rem; font-weight: 500; }
    .display-5 { font-size: 1.3rem; font-weight: 500; }
    .display-6 { font-size: 1rem; font-weight: 500; }
    .search-box .search-input { width: 240px; }
    .navbar-nav.navbar-list { display: inline-block; width: 100%; }
    .navbar-nav.navbar-list li { float: left; }
    .sign-info { text-align: center; margin-bottom: 30px; }
    .iq-social-media { width: 100%; }
    .iq-social-media li { float: none; display: inline-block; }
    .sign-in-from button { margin-top: 10px; }
    .sign-in-from .custom-control.custom-checkbox { display: block !important; }
    .sign-in-detail { padding: 50px 20px; }
    .sign-in-from { padding: 20px; }
    .iq-error h1 { font-size: 12rem; }
    .user-detail { margin-bottom: 15px; padding-right: 0 !important; }
    .user-detail .d-flex { display: block !important; text-align: center; }
    .profile-img { text-align: center; padding-left: 0 !important }
    .profile-feed-items { width: 100%; justify-content: center; }
    .iq-edit-profile .nav-link { border: none; }
    .user-list-files.d-flex.float-right { display: block !important; text-align: center; margin-top: 30px; width: 100%; }
    .table-responsive #exampleInputSearch { width: 100%; }
    .wizard-step { width: 50%; }
    .Products ul.product_list { text-align: center; }
    .iq-image-container { text-align: center; }
    .iq-item-product-right { margin-top: 30px; }
    .ckeckout-product-lists .d-flex { display: block !important; }
    .ckeckout-product { width: 100%; text-align: center; margin-bottom: 20px; }
    .checkout-product-details { text-align: center; }
    .iq-advance-course.d-flex { display: block !important; text-align: center; }
    .iq-advance-course .right-block { margin-top: 15px; }
    .iq-advance-course .left-block .d-flex { display: block !important; }
    .right-block .image-absulute.image-absulute-1{left: 50px;}
    .right-block .image-absulute.image-absulute-2{right: 40px;left: auto; top: auto; bottom: 50px;}
    body.iq-page-menu-horizontal .iq-navbar-custom.d-flex {display: block !important;}
    .iq-top-navbar .search-box { float: left; left: -114px; }
    #passwordBoxWrap { margin: -44px 5px !important; }
}
@media(max-width:479px) {
    .display-1 { font-size: 2.0rem; font-weight: 500; }
    .display-2 { font-size: 1.8rem; font-weight: 500; }
    .display-3 { font-size: 1.6rem; font-weight: 500; }
    .display-4 { font-size: 1.4rem; font-weight: 500; }
    .display-5 { font-size: 1.2rem; font-weight: 500; }
    .iq-circle-progressbar .percent { font-size: 2rem !important; }
    .iq-circle-progressbar svg { width: 150px !important; height: 150px !important; }
    .iq-circle-progressbar { margin: 0 auto; width: 150px !important; height: 150px !important; }
    .iq-card-body { padding: 15px; }
    .iq-sidebar-logo a span { display: none; }
    body.sidebar-main .iq-top-navbar .iq-sidebar-logo a span { opacity: 0; display: none; }
    .iq-error h1 { font-size: 8rem; }
    .chat-head header { overflow-x: scroll; }
    #chat-user-detail-popup { width: 300px; }
    .profile-feed-items { display: block !important; }
    .profile-feed-items li { margin: 0 0 20px 0; }
    ul.header-nav li { height: 35px; width: 35px; line-height: 35px; margin: 0 0 0 5px; font-size: 16px; }
    .comment-area.p-3 > div { display: block !important; }
    .comment-area.p-3 > div> div { margin-bottom: 10px; }
    .profile-feed-items li a { text-align: center; }
    .wizard-step { width: 100%; }
}
@media(max-width:359px) { }

/* ===================================================================
   Mobile Responsiveness Additions
   Fix reCAPTCHA overflow, auth form layout, and general mobile issues
   =================================================================== */

/* -- reCAPTCHA: scale down on narrow screens (widget is fixed 302px by Google) -- */
@media (max-width: 420px) {
    .recaptcha-mobile-wrapper > div {
        transform: scale(0.88);
        transform-origin: center;
        display: block;
    }
}
@media (max-width: 360px) {
    .recaptcha-mobile-wrapper > div {
        transform: scale(0.77);
        transform-origin: center;
        display: block;
    }
}

/* -- Auth form card: reduce padding on tiny screens -- */
@media (max-width: 420px) {
    .form-container .card-body,
    .sign-in-page .card .card-body {
        padding: 16px !important;
    }
    .sign-in-page .container {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* -- Register: terms + recaptcha + button stack vertically on mobile -- */
@media (max-width: 576px) {
    .auth-bottom-section {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px;
    }
    .auth-bottom-section .custom-control.custom-checkbox {
        float: none !important;
        display: block !important;
        width: 100%;
    }
    .auth-bottom-section .btn-submit {
        float: none !important;
        width: 100% !important;
        margin-top: 4px;
    }
}

/* -- General mobile fixes -- */
@media (max-width: 576px) {
    /* Prevent horizontal page overflow */
    body { overflow-x: hidden; }

    /* Modals: full-width with small margin */
    .modal-dialog { margin: 8px auto; }
    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl { max-width: calc(100vw - 16px); }

    /* Tables: horizontal scroll instead of breaking layout */
    .table-responsive-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* -- Modal height fix: constrain to viewport so footer buttons are never cut off -- */
@media (max-width: 767px) {
    /* Make the modal dialog flex so body scrolls and footer stays pinned */
    .modal-dialog {
        max-height: calc(100vh - 32px);
        display: flex;
        flex-direction: column;
        margin-top: 16px;
        margin-bottom: 16px;
    }
    .modal-content {
        max-height: calc(100vh - 32px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    /* Body scrolls; footer never moves off screen */
    .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1 1 auto;
        min-height: 0;
    }
    .modal-footer {
        flex-shrink: 0;
    }
    /* Ensure modal-dialog-scrollable also respects the viewport */
    .modal-dialog-scrollable .modal-body {
        overflow-y: auto;
    }
}

/* -- File input: replace English "Browse" label with Arabic -- */
.custom-file-label::after {
    content: "استعرض" !important;
}

/* -- Register page: ensure parent-data trigger buttons are always reachable -- */
@media (max-width: 767px) {
    /* Dropdowns (react-select / custom selects) inside a scrollable container
       must not overflow outside the viewport, pushing action buttons off screen */
    .register-scroll .select2-container,
    .register-scroll [class*="select__menu"] {
        position: fixed !important;
        z-index: 9999;
    }
    /* Make the two red parent-data buttons stack on very small screens */
    .parent-data-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .parent-data-buttons .btn {
        width: 100%;
    }
}

/* ===================================================================
   Mobile Sidebar Toggle Fixes
   =================================================================== */

/*
 * Mobile header — two-row layout for ≤1299px.
 *
 * RTL flex (direction: rtl on body) — order: lower = rightmost on screen.
 *
 * Row 1 (73px):  [Avatar — LEFT (order:3)]  [Logo — CENTER (order:2)]  [Hamburger — RIGHT (order:1)]
 * Row 2 (50px):  [All 5 action buttons centered — nav with order:4, width:100%]
 */
@media (max-width: 1299px) {
    .iq-top-navbar .iq-navbar-custom {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 0;
        height: auto;
        min-height: 73px;
    }

    /* Row 1 — Hamburger: rightmost (order:1), stretches to fill full row height.
       NOTE: the JSX div has className "iq-menu-bt align-self-center".
       Bootstrap's .align-self-center adds align-self:center !important which
       shrinks the button to icon-height and hides the background.
       We must use !important here to beat it. */
    .iq-top-navbar .iq-navbar-custom .iq-menu-bt {
        order: 1 !important;
        flex-shrink: 0 !important;
        align-self: stretch !important;
        position: static !important;
        left: auto !important; right: auto !important; top: auto !important;
        transform: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 18px !important;
        border-radius: 0 !important;
        height: auto !important;
        background: transparent;
    }
    body.sidebar-main .iq-top-navbar .iq-navbar-custom .iq-menu-bt {
        background: transparent;
        align-self: stretch !important;
    }

    /* Row 1 — Logo: centered (order:2) */
    .iq-top-navbar .iq-navbar-custom .iq-sidebar-logo {
        order: 2;
        flex: 1;
        float: none !important;
        width: auto !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 73px;
    }

    /* Row 1 — Avatar: leftmost (order:3), stretches to fill full row height */
    .iq-top-navbar .iq-navbar-custom > .navbar-list {
        order: 3;
        flex-shrink: 0;
        float: none !important;
        display: flex !important;
        align-items: stretch;
        height: 73px;
        margin: 0; padding: 0;
    }
    .iq-top-navbar .iq-navbar-custom > .navbar-list li {
        float: none !important;
        display: flex;
        align-items: stretch;
    }
    .iq-top-navbar .iq-navbar-custom > .navbar-list li > a {
        line-height: normal !important;
        min-height: unset !important;
        display: flex !important;
        align-items: center;
        align-self: stretch;
        padding: 0;
        overflow: hidden;
    }

    /* Row 2 — Nav: full width, centered (order:4 → wraps to second line) */
    .iq-top-navbar .iq-navbar-custom .navbar {
        order: 4;
        width: 100%;
        flex-shrink: 0;
        padding: 2px 0;
        position: static;
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center;
        border-top: 1px solid rgba(0,0,0,0.06);
    }

    /* Collapse hidden on mobile — only icon buttons live in row 2 */
    .iq-top-navbar .iq-navbar-custom .navbar .navbar-collapse {
        display: none !important;
    }

    /* All icon lists and nav-navs inside the row-2 nav: horizontal row, no auto-margins */
    .iq-top-navbar .iq-navbar-custom .navbar .navbar-list,
    .iq-top-navbar .iq-navbar-custom .navbar .navbar-nav {
        float: none !important;
        display: flex !important;
        flex-direction: row !important;
        flex: 0 0 auto !important;
        align-items: center;
        justify-content: center;
        margin: 0 !important; padding: 0;
    }
    .iq-top-navbar .iq-navbar-custom .navbar .navbar-list li,
    .iq-top-navbar .iq-navbar-custom .navbar .navbar-nav li { float: none !important; }
    .iq-top-navbar .iq-navbar-custom .navbar .navbar-list li > a,
    .iq-top-navbar .iq-navbar-custom .navbar .navbar-nav li > a {
        line-height: 46px !important;
        min-height: unset !important;
        padding: 0 12px;
    }

    /* Bootstrap navbar-toggler: hide — we use .iq-menu-bt */
    .iq-top-navbar .navbar-toggler { display: none !important; }

    /* Breadcrumb: hidden on mobile */
    .iq-top-navbar .iq-navbar-custom .navbar-breadcrumb { display: none !important; }

    /* Two-row header is ~130px tall — push content down far enough to clear it.
       Also add bottom padding so the last page section never touches the footer. */
    .content-page {
        padding-top: 140px !important;
        padding-bottom: 30px !important;
    }

    /* Notification/action dropdowns: break out of position:relative parent and
       anchor to the viewport so they never overflow or clip on any screen size */
    .iq-top-navbar .iq-sub-dropdown {
        position: fixed !important;
        top: 140px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        max-width: none !important;
        -webkit-transform: none !important;
        transform: none !important;
        z-index: 99999 !important;
    }

    /* Sidebar open: restore Arabic category titles */
    body.sidebar-main .iq-sidebar-menu .iq-menu .iq-menu-title span {
        display: inline !important;
        opacity: 1 !important;
    }
    body.sidebar-main .iq-sidebar-menu .iq-menu .iq-menu-title i {
        display: none !important;
    }
}

/*
 * Desktop (≥1300px): make .iq-navbar-custom a flex row so the avatar <ul>
 * (which is now a direct child of .iq-navbar-custom, outside <nav>) stays
 * in the header instead of dropping below it (float-based layouts break when
 * the avatar ul is not inside the Bootstrap nav flex container).
 */
@media (min-width: 1300px) {
    .iq-top-navbar .iq-navbar-custom {
        display: flex;
        align-items: center;
        height: 73px;
    }
    /* Logo: no longer float-right; stretch corner block aligned with sidebar */
    .iq-top-navbar .iq-navbar-custom .iq-sidebar-logo {
        float: none !important;
        flex-shrink: 0;
        padding-top: 0 !important;
        width: 260px;
        height: 73px;
        display: flex !important;
        align-items: center;
    }
    /* Breadcrumb: no longer float-right; centered by flex align-items */
    .iq-top-navbar .iq-navbar-custom .navbar-breadcrumb {
        float: none !important;
        display: flex !important;
        align-items: center;
        margin: 0 30px 0 0 !important;
        flex-shrink: 0;
    }
    /* Nav: takes remaining space */
    .iq-top-navbar .iq-navbar-custom .navbar {
        flex: 1;
        min-width: 0;
    }
    /* Avatar ul: stretch to fill the full 73px header height so the bg-primary
       colour creates a solid corner block instead of a floating square */
    .iq-top-navbar .iq-navbar-custom > .navbar-list {
        float: none !important;
        flex-shrink: 0;
        display: flex !important;
        align-items: stretch;
        height: 73px;
        margin: 0; padding: 0;
    }
    .iq-top-navbar .iq-navbar-custom > .navbar-list li {
        display: flex;
        align-items: stretch;
    }
    .iq-top-navbar .iq-navbar-custom > .navbar-list li > a {
        display: flex !important;
        align-items: center;
        align-self: stretch;
        padding: 0;
        line-height: normal !important;
        overflow: hidden;
    }

    /* Dashboard two-column layout: side-by-side only at ≥1300px */
    .col-dash-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-dash-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
}

/*
 * Mobile sidebar backdrop.
 * A full-screen translucent overlay behind the open sidebar.
 * Tapping it closes the sidebar (onClick in Sidebar / AdminSidebar).
 * Hidden on desktop (≥ 1300px).
 */
.sidebar-mobile-backdrop {
    display: none;
    pointer-events: none;
}

@media (max-width: 1299px) {
    body.sidebar-main .sidebar-mobile-backdrop {
        display: block;
        pointer-events: auto;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 998; /* below sidebar (1000) but above page content */
    }
}

/* Avatar image: fills the full 73px corner block on all screen sizes */
.iq-top-navbar .iq-navbar-custom > .navbar-list li img {
    width: 73px !important;
    height: 73px !important;
    object-fit: cover;
    border-radius: 0 !important;
    display: block;
}

/*
 * Global (all screen sizes): hide the site-name text from the top navbar header.
 * Only the logo image should show in the header — the text belongs in the sidebar.
 * This overrides:
 *   - style-rtl.css: .iq-sidebar-logo a span (always visible by default)
 *   - responsive-rtl.css line 95: body.sidebar-main shows it on mobile when sidebar opens
 *   - Any desktop rule that un-hides it on wider screens (unfolded phone, tablet, desktop)
 */
.iq-top-navbar .iq-sidebar-logo a span,
body.sidebar-main .iq-top-navbar .iq-sidebar-logo a span {
    display: none !important;
    opacity: 0 !important;
}
