* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', Arial, sans-serif;
    direction: rtl;
    text-align: right;
    padding-top: 80px;
}

.navbar {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 50%, #3d7ab8 100%);
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.3);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff !important;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    width: 150px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3px;
}

.logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.1);
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    margin: 0 0.25rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link:hover {
    background: rgba(109, 213, 181, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(109, 213, 181, 0.2);
}

.navbar-nav .nav-link:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(109, 213, 181, 0.3), transparent);
    transition: all 0.5s;
}

.navbar-nav .nav-link:hover:before {
    left: 100%;
}

.dropdown-menu {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(30, 58, 95, 0.2);
    padding: 1rem;
    margin-top: 10px;
    min-width: 300px;
    max-width: 400px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #6dd5b5 #f1f1f1;
}

.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: #6dd5b5;
    border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #4ade80;
}

.dropdown-item {
    color: #333;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin: 2px 0;
}

.dropdown-header {
    color: #667eea !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    transform: translateX(-5px);
}

.navbar-toggler {
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 10px;
    padding: 0.5rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.search-box {
    position: relative;
    margin-right: 1rem;
}

.search-input {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 25px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    color: white;
    width: 250px;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255,255,255,0.8);
}

.search-input:focus {
    outline: none;
    background: rgba(109, 213, 181, 0.2);
    border-color: rgba(109, 213, 181, 0.6);
    width: 300px;
}

.search-btn {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 1001;
}

/* Search Dropdown Styles */
.search-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(30, 58, 95, 0.3);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1002;
    margin-top: 5px;
    display: none;
    border: 1px solid rgba(30, 58, 95, 0.1);
}

.search-dropdown.show {
    display: block;
    animation: searchDropdownSlide 0.3s ease;
}

@keyframes searchDropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
}

.search-result-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(-3px);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-left: 12px;
    border: 2px solid rgba(30, 58, 95, 0.1);
}

.search-result-name {
    font-weight: 600;
    color: #1e3a5f;
    font-size: 14px;
    flex: 1;
}

.search-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.search-no-results {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

.search-error {
    text-align: center;
    padding: 20px;
    color: #dc3545;
    font-style: italic;
}

/* Dropdown animation */
.dropdown-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 991px) {
    .dropdown-menu {
        min-width: auto;
        width: 100%;
    }
    .search-input {
        width: 200px;
    }
    .search-input:focus {
        width: 220px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 72px;
    }
    .navbar-brand {
        font-size: 1.5rem;
    }
    .search-box {
        margin: 1rem 0;
    }
    .search-input {
        width: 100%;
    }
    
    .search-dropdown {
        right: -15px;
        left: -15px;
    }
}

.brand-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  margin-left: 5px;
}

.brand-icon-sam {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-left: 5px;
}

/* أضف هذا CSS إلى ملف header.css */

/* تنسيق قائمة البحث المنسدلة */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-dropdown.show {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    margin-left: 12px;
    flex-shrink: 0;
}

.search-result-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.search-loading,
.search-no-results,
.search-error {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.search-error {
    color: #dc3545;
}

/* تأكد من أن search-box له position relative */
.search-box {
    position: relative;
}