/* =========================================
   5. RESPONSIVE (Mobile & Tablet)
   ========================================= */

@media (max-width: 1024px) {
    /* Header & Nav */
    .nav { display: none; } 
    .burger { display: block; font-size: 1.5rem; cursor: pointer; color: var(--primary); z-index: 1001; }
    .header-actions .btn-header { display: none; } 
    .header-content { justify-content: space-between; gap: 10px; padding-right: 15px; padding-left: 15px; }
    .header-actions { display: flex; align-items: center; gap: 15px; margin-left: auto; }

    /* Lang Menu */
    .lang-menu { margin: 0; }
    .lang-btn span { display: none; }
    .lang-btn { padding: 6px 12px; font-size: 1.1rem; border: 1px solid var(--primary); }
    .lang-btn i { font-size: 1.1rem; } 
    
    /* Mobile Drawer */
    .nav.active { 
        display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; 
        background: #fff; padding: 0; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-top: 1px solid #eee; max-height: 85vh; overflow-y: auto;
    }
    .nav-item { width: 100%; border-bottom: 1px solid #f0f0f0; }
    .nav-link { 
        text-align: start; width: 100%; display: flex; justify-content: space-between; 
        align-items: center; padding: 15px 20px; font-size: 1.1rem; margin: 0; border-radius: 0; 
    }

    /* Accordion Dropdown */
    .dropdown-menu {
        display: none; position: static; width: 100%; box-shadow: none; border: none;
        background: #f8f9fa; padding: 0; margin: 0; border-top: 1px solid #eee;
    }
    .dropdown-item { padding: 12px 20px 12px 40px; font-size: 1rem; border-bottom: 1px dashed #eee; }
    .nav-item.dropdown-active > .dropdown-menu, .dropdown-submenu.dropdown-active > .dropdown-menu { 
        display: block; animation: fadeIn 0.3s;
    }
    .nav-item.dropdown-active > .nav-link i, .dropdown-submenu.dropdown-active > .dropdown-item i {
        transform: rotate(180deg); transition: transform 0.3s;
    }
    .dropdown-submenu > .dropdown-menu { background: #f1f3f2; padding-left: 20px; position: static; margin-top: 0; }

    /* Layout Adjustments */
    .hero { padding-top: 130px; min-height: auto; padding-bottom: 50px; }
    html[dir="rtl"] .dropdown-item { padding: 12px 40px 12px 20px; }
    html[dir="rtl"] .nav-link { text-align: right; }
    html[dir="rtl"] .header-actions { margin-left: 0; margin-right: auto; }
}

@media (max-width: 991px) {
    .footer-cols { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .footer-title::after { inset-inline-start: 50%; transform: translateX(-50%); }
    .contact-list li { justify-content: center; }
    .social-links { justify-content: center; }
}

@media (max-width: 768px) {
    .dean-layout, .two-cols, .req-box, .system-grid, .specs-grid { grid-template-columns: 1fr; }
    .history-block { grid-template-columns: 1fr; gap: 20px; }
    .history-img-frame { height: 250px; width: 100%; order: -1; }
    .page-title { font-size: 1.8rem; }
    .hero-khat { width: 80%; max-width: 300px; }
    .hero-text { font-size: 1.1rem; padding: 0 20px; }
    .hero-welcome { font-size: 1.3rem; }
    .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 20px; border: 1px solid #eee; }
    .clean-table { min-width: 600px; }
    .monthly-amount { font-size: 2.8rem; }
    .acc-number { font-size: 1.4rem; word-break: break-all; }
    .features-grid { grid-template-columns: 1fr; }
    .bio-header { flex-direction: column; text-align: center; }
    .bio-info { padding-left: 0; padding-right: 0; margin-top: 20px; }
    .bio-grid-list { grid-template-columns: 1fr; }
}