/* 
 * تصميم النافبار الحديث والمتطور
 */

:root {
    --navbar-primary: #667eea;
    --navbar-secondary: #764ba2;
    --navbar-accent: #4f46e5;
    --navbar-text: #ffffff;
    --navbar-text-hover: #f1f5f9;
    --navbar-shadow: rgba(0, 0, 0, 0.15);
    --navbar-height: 70px;
    --navbar-border-radius: 12px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#AlbaSport_header.modern-navbar {
    background: var(--navbar-primary);
    padding: 12px 0;
    box-shadow: 0 4px 20px var(--navbar-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    min-height: 70px;
}

#AlbaSport_header.modern-navbar.has-bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.header_inn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

.alba-logo {
    flex-shrink: 0;
}

.alba-logo .custom-logo {
    max-height: 55px;
    width: auto;
    border-radius: var(--navbar-border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-bounce);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.alba-logo .custom-logo:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.alba-logo .custom-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.site-name-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: var(--navbar-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    direction: rtl;
    unicode-bidi: embed;
}

.site-name-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.site-name-btn:hover::before {
    left: 100%;
}

.site-name-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: var(--navbar-text-hover);
}

.site-name-btn .site-icon {
    font-size: 24px;
    margin-left: 10px;
    animation: pulse 2s infinite;
    direction: ltr;
    color: inherit;
}

.site-name-btn .site-name {
    font-family: 'Cairo', 'Arial', sans-serif;
    letter-spacing: 0.5px;
    direction: rtl;
    unicode-bidi: embed;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 4px 25px rgba(102, 126, 234, 0.6), 0 0 20px rgba(102, 126, 234, 0.4); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

.custom-site-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    position: relative !important;
    overflow: hidden !important;
    font-family: 'Cairo', 'Arial', sans-serif !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    direction: rtl !important;
    unicode-bidi: embed !important;
}

.custom-site-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.custom-site-btn:hover::before {
    left: 100%;
}

.custom-site-btn:hover {
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.custom-site-btn .site-icon {
    margin-left: 8px !important;
    margin-right: 0 !important;
    font-size: 1.2em !important;
    direction: ltr !important;
}

.custom-site-btn .site-icon-img {
    border-radius: 4px !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2)) !important;
    direction: ltr !important;
}

.custom-site-btn .site-name {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    direction: rtl !important;
    unicode-bidi: embed !important;
}

.custom-site-btn[style*="animation: none"] {
    animation: none !important;
}

.custom-site-btn {
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    perspective: 1000px;
}

.custom-site-btn:active {
    transform: translateY(1px) scale(0.98) !important;
    transition: all 0.1s ease !important;
}

.custom-site-btn .site-name {
    max-width: calc(100% - 40px);
    display: inline-block;
    vertical-align: middle;
}

.modern-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.menu-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.modern-nav-menu li {
    position: relative;
}

/* فاصل بصري بين عناصر القائمة */
.modern-nav-menu li + li::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -3px;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 1px;
    z-index: 1;
}

.modern-nav-menu li a {
    color: var(--navbar-text);
    text-decoration: none;
    padding: 10px 18px;
    display: block;
    transition: var(--transition-smooth);
    font-weight: 600;
    border-radius: 20px;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.modern-nav-menu li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.modern-nav-menu li a:hover::before {
    left: 100%;
}

.modern-nav-menu li a:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.15);
}

.modern-nav-menu li.current-menu-item a,
.modern-nav-menu li.current_page_item a {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modern-nav-menu li ul {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    min-width: 250px;
    z-index: 1001;
    display: none;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    margin-top: 10px;
}

.modern-nav-menu li ul::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(0, 0, 0, 0.95);
}

.modern-nav-menu li:hover ul {
    display: block;
    animation: slideDown 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modern-nav-menu li ul li {
    margin: 5px 10px;
    width: calc(100% - 20px);
}

.modern-nav-menu li ul li a {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 5px;
}

.modern-nav-menu li ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px) scale(1.02);
}

@keyframes slideDown {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.social-links-nav {
    display: flex;
    align-items: center;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.social-links-nav .AlbaSocial {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.social-links-nav .AlbaSocial a {
    color: var(--navbar-text);
    font-size: 16px;
    transition: var(--transition-bounce);
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.social-links-nav .AlbaSocial a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.alba-social-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.social-link-custom i::before,
.social-link i::before {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", "FontAwesome", sans-serif;
}

.social-link-custom i,
.social-link i {
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

.social-link-custom {
    color: var(--navbar-text) !important;
    font-size: 16px;
    transition: var(--transition-bounce);
    padding: 10px;
    border-radius: 12px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.social-link-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 12px;
}

.social-link-custom:hover::before {
    transform: scale(1);
}

.social-link-custom:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.social-link-custom i {
    position: relative;
    z-index: 1;
    font-size: 16px;
}

.modern-toggle {
    background: none;
    border: none;
    color: var(--navbar-text);
    padding: 12px;
    cursor: pointer;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.modern-toggle:focus {
    outline: none;
}

.modern-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.toggle-line {
    width: 22px;
    height: 2px;
    background: var(--navbar-text);
    margin: 2px 0;
    border-radius: 2px;
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.modern-toggle.active .toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.modern-toggle.active .toggle-line:nth-child(2) {
    opacity: 0;
}

.modern-toggle.active .toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.menu-close-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--navbar-text);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1002;
    transition: var(--transition-smooth);
    font-size: 18px;
    align-items: center;
    justify-content: center;
}

.menu-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.close-icon {
    font-size: 20px;
    font-weight: bold;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 991px) {
    .modern-toggle {
        display: flex;
    }
    
    .modern-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: var(--navbar-primary);
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 1001;
        padding: 80px 25px 25px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .modern-menu.has-bg-image {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .modern-menu.open {
        right: 0;
    }
    
    .menu-close-btn {
        display: flex;
    }
    
    .menu-container {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 20px;
    }
    
    .modern-nav-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 10px;
    }
    
    .modern-nav-menu li {
        width: 100%;
    }
    
    .modern-nav-menu li + li::before {
        display: none;
    }
    
    .modern-nav-menu li a {
        padding: 18px 25px;
        width: 100%;
        border-radius: 15px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        background: rgba(255, 255, 255, 0.1);
        font-size: 16px;
        text-align: center;
    }
    
    .modern-nav-menu li a:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: translateX(10px) scale(1.02);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .modern-nav-menu li ul {
        position: static;
        display: block;
        background: rgba(0, 0, 0, 0.4);
        box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
        margin-top: 10px;
        border-radius: 12px;
        transform: none;
        left: 0;
        padding: 15px 0;
    }
    
    .modern-nav-menu li ul::before {
        display: none;
    }
    
    .social-links-nav {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-top: 20px;
        width: 100%;
        justify-content: center;
    }
    
    .social-links-nav .AlbaSocial {
        justify-content: center;
        gap: 15px;
    }
    
    .social-links-nav .AlbaSocial a {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .alba-social-custom {
        justify-content: center;
        gap: 15px;
    }
    
    .social-link-custom {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
    }
}

@media (max-width: 768px) {
    #AlbaSport_header.modern-navbar {
        padding: 8px 0;
    }
    
    .header_inn {
        min-height: 55px;
    }
    
    .alba-logo .custom-logo {
        max-height: 45px;
    }
    
    .site-name-btn,
    .custom-site-btn {
        padding: 10px 16px !important;
        font-size: 16px !important;
        width: auto !important;
        min-width: 150px !important;
        max-width: 250px !important;
        height: 45px !important;
    }
    
    .site-name-btn .site-icon,
    .custom-site-btn .site-icon {
        font-size: 20px;
        margin-left: 8px;
    }
    
    .custom-site-btn .site-icon-img {
        width: 20px !important;
        height: 20px !important;
    }
    
    .modern-menu {
        width: 300px;
        padding: 70px 20px 20px;
    }
    
    .modern-toggle {
        width: 45px;
        height: 45px;
    }
    
    .toggle-line {
        width: 20px;
    }
}

@media (max-width: 480px) {
    .modern-menu {
        width: 280px;
        padding: 65px 18px 18px;
    }
    
    .alba-logo .custom-logo {
        max-height: 40px;
    }
    
    .site-name-btn,
    .custom-site-btn {
        padding: 8px 14px !important;
        font-size: 15px !important;
        min-width: 130px !important;
        max-width: 200px !important;
        height: 40px !important;
    }
    
    .site-name-btn .site-icon,
    .custom-site-btn .site-icon {
        font-size: 18px;
        margin-left: 6px;
    }
    
    .custom-site-btn .site-icon-img {
        width: 18px !important;
        height: 18px !important;
    }
    
    .modern-nav-menu li a {
        padding: 16px 20px;
        font-size: 15px;
    }
    
    .social-links-nav .AlbaSocial a {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    
    .social-link-custom {
        width: 42px !important;
        height: 42px !important;
        font-size: 16px !important;
    }
}

@media (hover: hover) {
    .modern-nav-menu li a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: rgba(255, 255, 255, 0.6);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }
    
    .modern-nav-menu li a:hover::after {
        width: 80%;
    }
}
