/* Top Bar Styles */
.top-bar {
    background: linear-gradient(135deg, 
        rgba(26, 35, 126, 0.95) 0%,
        rgba(57, 73, 171, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.3rem 0;
    position: relative;
    z-index: 1060;
    min-height: 38px;
    box-shadow: 0 2px 20px rgba(26, 35, 126, 0.15),
                inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.top-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

/* Social Links */
.social-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.social-links a {
    color: var(--text-light);
    font-size: 1rem;
    transition: all var(--transition-fast);
    position: relative;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    margin: 0 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
                inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.social-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--text-light);
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-fast);
}

.social-links a:hover::after {
    opacity: 0.2;
    transform: scale(1.2);
}

.social-links i {
    font-size: 1rem;
}

/* Top Bar Right Section */
.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    justify-content: flex-end;
}

/* Phone Number */
.phone {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.phone i {
    font-size: 1.1rem;
    color: var(--itcc-yellow);
    margin-right: 6px;
    transition: color 0.2s;
}

.phone span {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.12);
    transition: color 0.2s;
}

.phone:hover span {
    color: var(--light-blue);
}

.phone:hover i {
    color: var(--light-blue);
}

/* Language Switch */
.language-switch {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.language-switch a {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 0.95rem;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0 2px;
    position: relative;
    overflow: hidden;
}

.language-switch a.active, .language-switch a:focus {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 5px rgba(26, 35, 126, 0.22),
                0 0 12px 4px rgba(57, 73, 171, 0.4),
                0 0 8px 2.5px var(--itcc-yellow);
    transform: scale(1.18) rotate(-2deg);
    z-index: 2;
    transition: all 0.25s cubic-bezier(.4,2,.6,1);
}

/* إضافة أعلام داخل أزرار اللغات */
.language-switch a .flag {
    width: 16px;
    height: 16px;
    margin-right: 0;
    margin-left: 0;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: box-shadow 0.2s;
}

.language-switch a.active .flag, .language-switch a:focus .flag {
    box-shadow: 0 0 10px 3px rgba(57, 73, 171, 0.6),
                0 0 0 2px rgba(255, 255, 255, 0.4),
                0 0 6px 2px var(--itcc-yellow);
    filter: drop-shadow(0 0 6px rgba(26, 35, 126, 0.5));
    transition: box-shadow 0.25s, filter 0.25s;
}

/* إخفاء النص داخل زر اللغة إذا كان هناك علم */
.language-switch a .lang-text {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-bar {
        padding: 0.2rem 0;
        min-height: 28px;
    }

    .top-bar .container {
        padding: 0 0.5rem;
    }

    .top-bar .row {
        margin: 0;
    }

    .top-bar .col-md-6 {
        padding: 0.2rem 0.5rem;
    }

    .top-bar-right {
        justify-content: center;
        gap: var(--spacing-md);
        margin-top: 0;
    }

    .social-links {
        justify-content: center;
        gap: 0.3rem;
    }

    .phone {
        font-size: 0.8rem;
        gap: 0.2rem;
    }

    .phone i {
        font-size: 0.9rem;
        margin-right: 4px;
    }

    .social-links a {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }

    .language-switch {
        gap: 0.1rem;
    }

    .language-switch a {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }

    .language-switch a .flag {
        width: 12px;
        height: 12px;
    }

    .language-switch a.active, 
    .language-switch a:focus {
        transform: scale(1.1);
        box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.15),
                    0 0 8px 3px rgba(57, 73, 171, 0.3),
                    0 0 6px 2px var(--itcc-yellow);
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .top-bar {
        min-height: 24px;
    }

    .top-bar .col-md-6 {
        padding: 0.15rem 0.3rem;
    }

    .phone {
        font-size: 0.75rem;
    }

    .phone i {
        font-size: 0.85rem;
        margin-right: 3px;
    }

    .social-links a {
        width: 18px;
        height: 18px;
        font-size: 0.75rem;
    }

    .language-switch a {
        width: 18px;
        height: 18px;
    }

    .language-switch a .flag {
        width: 10px;
        height: 10px;
    }
}

/* RTL Support for Mobile */
@media (max-width: 768px) {
    [dir="rtl"] .top-bar-right {
        flex-direction: row-reverse;
        justify-content: center;
    }

    [dir="rtl"] .social-links {
        flex-direction: row-reverse;
        justify-content: center;
    }

    [dir="rtl"] .language-switch {
        flex-direction: row-reverse;
    }

    [dir="rtl"] .phone i {
        margin-right: 0;
        margin-left: 4px;
    }
}

/* RTL Support */
[dir="rtl"] .top-bar-right {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

[dir="rtl"] .social-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-switch {
    flex-direction: row-reverse;
}

[dir="rtl"] .top-bar .col-md-6:first-child {
    justify-content: flex-end;
}

[dir="rtl"] .top-bar .col-md-6:last-child {
    justify-content: flex-start;
}

/* Ensure equal spacing for both directions */
.top-bar .col-md-6:first-child {
    justify-content: flex-start;
}

.top-bar .col-md-6:last-child {
    justify-content: flex-end;
}

/* Animation for Top Bar */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.top-bar {
    animation: slideDown 0.5s ease-out;
}

/* Top Bar Flex Layout */
.top-bar .row.align-items-center {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.top-bar .col-md-6 {
    flex: 0 0 auto;
    width: auto;
    display: flex;
    align-items: center;
}

:root {
    --itcc-yellow: #ffd600;
} 