/* الشريط العلوي */
.top-bar {
    background-color: var(--primary-dark);
    color: white;
    padding: 12px 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 1001;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 25px;
}

.contact-info a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    font-size: 1rem;
}

.contact-info a:hover {
    color: var(--gold);
}

.social-links {
    display: flex;
    gap: 18px;
    align-items: center;
}

.social-links a {
    color: white;
    font-size: 1.1rem;
    transition: var(--transition);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: var(--gold);
    transform: translateY(-3px);
    background: rgba(233, 185, 73, 0.2);
}

/* شريط التنقل */
nav {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    transition: var(--transition);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

.logo-text h1 {
    text-decoration: none;
}

.logo img {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-size: 2rem;
    color: var(--primary);
    line-height: 1.2;
    font-weight: 800;
    transition: var(--transition);
}

.logo-text span {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 35px;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding: 10px 16px;
    font-size: 1.1rem;
    border-radius: 999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

/* إزالة الخط السفلي عن الروابط */
.nav-links li a:after { display: none; }

.nav-links li a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--primary);
    opacity: 0;
    transform: scale(0.92);
    transition: var(--transition);
    z-index: -1;
}

.nav-links li a:hover {
    color: #fff;
    transform: translateY(-2px);
}

.nav-links li a:hover::before,
.nav-links li a.active::before {
    opacity: 1;
    transform: scale(1);
}

.nav-links li a.active {
    color: #fff;
}

.nav-links li a i {
    transition: var(--transition);
}

.nav-links li a:hover i,
.nav-links li a.active i {
    color: #fff;
    transform: translateY(-1px);
}

/* القوائم المنسدلة */
.dropdown { position: relative; }
.dropdown > .nav-link { display: inline-flex; align-items: center; gap: 8px; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 240px;
    background: white;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 12px;
    display: none;
    z-index: 1002;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li { list-style: none; }
.dropdown-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    padding: 10px 12px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}
.dropdown-menu .nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-dark);
    opacity: 0;
    transition: var(--transition);
}
.dropdown-menu .nav-link:hover {
    color: #fff;
    transform: translateY(-1px);
}
.dropdown-menu .nav-link:hover::before {
    opacity: 1;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    margin: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: var(--transition);
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-btn:hover span {
    background: var(--primary-dark);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* تأثير التمرير على الشريط */
nav.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 5px 0;
}

nav.scrolled .logo img {
    height: 50px;
}

nav.scrolled .logo-text h1 {
    font-size: 1.7rem;
}

/* القائمة المتنقلة للجوال */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: var(--transition);
    padding: 80px 30px 30px;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-links {
    list-style: none;
}

.mobile-nav-links li {
    margin-bottom: 5px;
}

.mobile-nav-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(14, 42, 71, 0.08);
    transition: var(--transition);
}

.mobile-dropdown > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--accent);
    padding-right: 12px;
}

@keyframes slideInItem {
    from { opacity: 0; transform: translateX(15px); }
    to { opacity: 1; transform: translateX(0); }
}

.mobile-nav-links li { opacity: 0; animation: slideInItem 0.4s ease forwards; }
.mobile-nav-links li:nth-child(1) { animation-delay: .05s; }
.mobile-nav-links li:nth-child(2) { animation-delay: .10s; }
.mobile-nav-links li:nth-child(3) { animation-delay: .15s; }
.mobile-nav-links li:nth-child(4) { animation-delay: .20s; }
.mobile-nav-links li:nth-child(5) { animation-delay: .25s; }

.mobile-dropdown .mobile-submenu {
    list-style: none;
    padding-right: 10px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu .nav-link { font-size: 0.98rem; font-weight: 500; padding: 10px 0; }
.mobile-submenu .nav-link i { margin-left: 6px; color: var(--accent); }
.mobile-dropdown.open .mobile-submenu { max-height: 1000px; }
.mobile-dropdown.open > a .toggle-icon { transform: rotate(180deg); }

.mobile-dropdown > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-dropdown .mobile-submenu {
    list-style: none;
    padding-right: 10px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu .nav-link {
    font-size: 0.98rem;
    font-weight: 500;
    padding: 10px 0;
}

.mobile-submenu .nav-link i {
    margin-left: 6px;
    color: var(--accent);
}

.mobile-nav-close {
    position: absolute;
    top: 20px;
    left: 20px;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    background: rgba(14, 42, 71, 0.06);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-nav-close:hover {
    background: rgba(14, 42, 71, 0.12);
    transform: rotate(90deg);
}

/* التكيف مع الشاشات الصغيرة */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }
    
    .logo-text h1 {
        font-size: 1.7rem;
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .contact-info {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .logo {
        gap: 10px;
    }
    
    .logo img {
        height: 50px;
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .logo-text span {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .mobile-nav { width: 280px; }
    
    .logo-text h1 {
        font-size: 1.4rem;
    }
}
