/**
 * Ø£Ù†Ù…Ø§Ø· Ø§Ù„Ù‡ÙŠØ¯Ø± ÙˆØ§Ù„ÙÙˆØªØ±
 * Header and Footer Styles
 */

/* ===== Top Bar ===== */
.top-bar {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    position: relative;
    z-index: 1000;
}

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

.contact-info {
    display: flex;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item i {
    font-size: 0.875rem;
}

.contact-item a {
    color: white;
    text-decoration: none;
}

.contact-item a:hover {
    opacity: 0.8;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Language Links في Top Bar - روابط مباشرة */
.language-links-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-link-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    white-space: nowrap;
}

.language-link-top:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.language-link-top.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.language-link-top .flag {
    font-size: 1rem;
}

.language-link-top .lang-text {
    font-size: 0.875rem;
    font-family: auto;
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* Language Switcher ÙÙŠ Header */
.main-nav .language-switcher {
    position: relative;
    z-index: 2000;
}

.main-nav .current-lang {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #14664c;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 2001;
}

.main-nav .current-lang .fa-globe {
    color: #14664c;
    font-size: 1.1rem;
}

.main-nav .current-lang .fa-chevron-down {
    font-size: 0.75rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.main-nav .current-lang:hover {
    background: linear-gradient(135deg, #14664c 0%, #0d5940 100%);
    color: white;
    border-color: #14664c;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(20, 102, 76, 0.3);
}

.main-nav .current-lang:hover .fa-globe,
.main-nav .current-lang:hover .fa-chevron-down {
    color: white;
}

.main-nav .current-lang:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background-color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 2100;
    overflow: visible;
    margin-top: 0;
}

.language-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    z-index: 2101;
}

.language-switcher:hover .language-dropdown,
.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
    background-color: white;
    position: relative;
    z-index: 2102;
}

.language-option .flag {
    font-size: 1.5rem;
    line-height: 1;
}

.language-option .lang-text {
    font-weight: 500;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: linear-gradient(135deg, #14664c 0%, #0d5940 100%);
    color: white;
    padding-left: 1.5rem;
    padding-right: 1rem;
}

.language-option:hover .lang-text {
    font-weight: 600;
}

.language-option:active {
    background-color: #0a3d2c;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 0.75rem;
}

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

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* ===== Main Header ===== */
.main-header {
    background-color: white;
    box-shadow: var(--shadow-sm);
   /* position: sticky; */
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

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

.logo img {
    height: 65px;
    width: auto;
    object-fit: contain;
    /* filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); */
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition-base);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition-base);
    z-index: 1100;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

[dir="rtl"] .mobile-menu {
    left: auto;
    right: -100%;
}

[dir="rtl"] .mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav a {
    display: block;
    padding: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.mobile-nav a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.mobile-menu-footer {
    padding: 1rem;
}

/* ===== Footer ===== */
.main-footer {
    background: linear-gradient(135deg, #1a2332 0%, #0f1419 100%);
    color: #e0e6ed;
    margin-top: 5rem;
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #14664c 0%, #f39c12 50%, #14664c 100%);
}

.footer-top {
    padding: 4rem 0 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.footer-column {
    margin-bottom: 2.5rem;
}

.footer-widget h4 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 1.8rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #14664c, #f39c12);
    border-radius: 2px;
}

.footer-logo img {
    height: 70px;
    margin-bottom: 1.2rem;
    filter: brightness(1.1);
    transition: transform 0.3s ease;
}

.footer-logo img:hover {
    transform: scale(1.05);
}

.footer-desc {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-right: 5px;
}

[dir="rtl"] .footer-links a:hover {
    padding-right: 0;
    padding-left: 5px;
}

.footer-widget .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.footer-widget .contact-item i {
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.footer-widget .contact-item a {
    color: #ccc;
    text-decoration: none;
}

.footer-widget .contact-item a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    background-color: #111;
    padding: 1.5rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright p {
    margin: 0;
    color: #999;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-bottom-links a {
    color: #999;
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-bottom-links a:hover {
    color: var(--secondary-color);
}

.separator {
    color: #666;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: 900;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}

/* ===== WhatsApp Button ===== */
.whatsapp-button {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
    z-index: 900;
}

.whatsapp-button:hover {
    background-color: #20BA5A;
    transform: scale(1.1);
}

[dir="rtl"] .whatsapp-button {
    right: auto;
    left: 30px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    /* إظهار الـ top bar في الموبايل */
    .top-bar {
        display: block;
        padding: 0.5rem 0;
        background-color: var(--primary-color);
    }
    
    .top-bar-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.75rem;
    }
    
    /* إخفاء الهاتف والبريد في الموبايل */
    .contact-info {
        display: none !important;
    }
    
    /* إخفاء السوشيال ميديا في الموبايل */
    .social-links {
        display: none !important;
    }
    
    /* اللغات على الطرف اليمين */
    .language-links-top {
        display: flex !important;
        gap: 0.5rem;
        margin-left: auto;
    }
    
    .language-link-top {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        color: white;
        font-size: 0.875rem;
        font-weight: 600;
        text-decoration: none;
        transition: var(--transition-base);
        border: none;
        padding: 0;
        min-width: auto;
    }
    
    .language-link-top:hover {
        background-color: rgba(255, 255, 255, 0.25);
        transform: translateY(-2px);
    }
    
    .language-link-top.active {
        background-color: rgba(255, 255, 255, 0.3);
    }
    
    .language-link-top .lang-text {
        font-size: 0.875rem;
        font-family: auto;
    }
    
    .top-bar-right {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        order: 2;
        margin-left: auto;
    }
    
    /* تحسين التخطيط في الشاشات الصغيرة جداً */
    @media (max-width: 480px) {
        .top-bar-content {
            gap: 0.5rem;
        }
        
        .language-link-top {
            width: 30px;
            height: 30px;
            font-size: 0.8rem;
        }
        
        .language-link-top .lang-text {
            font-size: 0.8rem;
        }
        
        .social-links {
            gap: 0.4rem;
        }
        
        .social-links a {
            width: 30px;
            height: 30px;
            font-size: 0.8rem;
        }
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .back-to-top,
    .whatsapp-button {
        right: 20px;
    }
    
    [dir="rtl"] .back-to-top,
    [dir="rtl"] .whatsapp-button {
        left: 20px;
    }
}
