/* ========================================== */
/* 1. Large Desktops (1200px and up)          */
/* ========================================== */
@media (min-width: 1200px) {
    .add-form { width: 70%; }
    .table-body th, .table-body td { font-size: 15px; }
}

/* ========================================== */
/* 2. Laptops & Small Desktops (993px - 1199px)*/
/* ========================================== */
@media (min-width: 993px) and (max-width: 1199px) {
    .add-form { width: 80%; }
    .table-body th, .table-body td { font-size: 14px; }
    .home-section nav { width: calc(100% - 20%); left: 20%; height: 70px; padding: 0 15px; }
    .modal-content { width: 95%; margin: 10% auto; }
    .ab_slelct { flex: 1 1 calc(50% - 15px); }
}

/* ========================================== */
/* 3. Tablets (768px - 992px)                 */
/* ========================================== */
@media (max-width: 992px) {
    .sidebar { width: 70px; }
    .sidebar .logo-details, .sidebar .nav-links li { text-align: center; }
    .home-section { left: 70px; width: calc(100% - 70px); }
    .home-section nav { width: 100%; left: 0; height: 65px; padding: 0 15px; }
    
    .ab_slelct { width: 100%; margin-bottom: 15px; flex: 1 1 100%; }
    .add-form { width: 90%; }
    .frm-bnr-heading h3 { font-size: 20px; }
    .table-body th, .table-body td { font-size: 13px; }
    
    .modal-content { padding: 15px; }
    .user_category { flex-direction: column; gap: 8px; }
    
    /* FIX: Form responsiveness */
    .cq_contact-container { flex-direction: column !important; }
    .cq_image-section { flex: none !important; width: 100% !important; border-right: none !important; margin: 0 !important; }
    .center-ad-img { height: auto !important; max-height: 200px !important; }
    .cq_form-section { flex: none !important; width: 100% !important; max-height: none !important; overflow: visible !important; }
    .inline-form-box { overflow: visible !important; height: auto !important; }
}

/* ========================================== */
/* 4. Large Mobiles (576px - 767px)           */
/* ========================================== */
@media (max-width: 767px) {
    .add-form { width: 95%; padding: 10px; }
    .frm-bnr-heading h3 { font-size: 18px; }
    .table-body { display: block; overflow-x: auto; white-space: nowrap; }
    .table-body th, .table-body td { font-size: 12px; padding: 6px; }
    .btn-bnr-save { width: 100%; }
    .home-section nav { height: 60px; padding: 0 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
    .modal-content { width: 98%; margin: 5% auto; padding: 10px; }
    .cq_row { flex-direction: column; gap: 10px; }
}

/* ========================================== */
/* 5. Mobile devices (576px and down)         */
/* ========================================== */
@media (max-width: 576px) {
    .sidebar { position: absolute; left: -100%; width: 220px; z-index: 200; }
    .sidebar.active { left: 0; }
    .home-section { left: 0; width: 100%; }
    nav .search-box { display: none; }
    
    .form-actions { flex-direction: column; align-items: stretch; }
    .action-right { flex-direction: column; gap: 10px; }
    .cq_reset-btn, .cq_save-btn, .cq_next-btn { width: 100%; text-align: center; }
    
    .frm-bnr-heading { text-align: center; }
    .frm-bnr-heading h3 { margin-left: 0 !important; font-size: 16px; }
    .frm-close { right: 10px !important; top: 5px !important; }
    .in-text, .banner_class, .bannertext_area { width: 100% !important; }
    .table-body th, .table-body td { font-size: 11px; padding: 5px; }
}

/* ========================================== */
/* 6. Tablet & Mobile Menu Expansion          */
/* ========================================== */
@media (max-width: 1024px) {
    .sidebar.active {
        width: 240px !important;
        z-index: 9999 !important;
        box-shadow: 4px 0 10px rgba(0,0,0,0.2) !important;
        background: #1E90FF !important; 
    }
    .sidebar.active span, 
    .sidebar.active .logo_name, 
    .sidebar.active .links_name {
        display: inline-block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .sidebar.active .logo-details,
    .sidebar.active .nav-links li {
        text-align: left !important;
        padding-left: 10px !important;
    }
}