/* Tablets */
@media (max-width: 992px){
    .top-navbar{
        flex-wrap:wrap;
    }
    .nav-item{
        padding:18px 15px;
        font-size:14px;
    }
    .access-grid{
        grid-template-columns:repeat(2,1fr);
    }
    .database-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

/* Mobile */
@media (max-width:600px){
    .top-navbar{
        flex-direction:column;
    }
    .nav-item{
        width:100%;
        justify-content:center;
    }
    .quick-access,
    .databases{
        padding:40px 20px;
    }
    .access-grid,
    .database-grid{
        grid-template-columns:1fr;
    }
    .section-title h2{
        font-size:26px;
    }
    .database-card{
        height:150px;
    }
}

@media (max-width: 768px){
    .site-header{
        padding:15px;
    }
    .brand-area{
        justify-content:center;
        flex-direction:column;
        text-align:center;
    }
    .brand-area h1{
        font-size:24px;
    }
    .main-navigation{
        height:auto;
        flex-direction:column;
        width:100%;
    }
    .main-navigation a{
        width:100%;
        height:50px;
        justify-content:center;
        padding:0;
    }
}

/* ==========================================
   📱 الإصلاح النهائي والاحترافي للهيدر والبحث على الجوال
   ========================================== */
@media (max-width: 768px) {
    /* 1. جعل زري (Contact DIC) و (Portal Access) متجاورين وبنفس العرض تماماً (50% لكل زر) */
    .site-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 14px !important;
        gap: 12px !important;
    }
    .header-right-actions {
        display: flex !important;
        width: 100% !important;
        gap: 8px !important;
    }
    .contact-top-btn, .login-dropdown-btn {
        flex: 1 !important;
        width: 50% !important;
        justify-content: center !important;
        padding: 10px 6px !important;
        font-size: 0.78rem !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

    /* 2. ضبط صندوق البحث ليكون حقل الكتابة كبيراً وواسعاً، وزر البحث مرتباً تحته أو بجانبه */
    .hero-section {
        padding: 20px 12px !important;
    }
    .main-search {
        width: 100% !important;
        padding: 16px !important;
        box-sizing: border-box !important;
    }
    .search-input-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }
    /* حقل الكتابة يأخذ العرض كاملاً وبحجم مريح جداً للكتابة */
    .search-input-group input {
        width: 100% !important;
        height: 48px !important;
        padding: 10px 14px !important;
        font-size: 0.92rem !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
    }
    /* زر البحث يأخذ العرض كاملاً وبشكل منسق وجميل */
    .search-input-group button {
        width: 100% !important;
        height: 46px !important;
        border-radius: 10px !important;
        font-size: 0.95rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }
}