/* تصميم العلامة التجارية واللوجو */
.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    flex-direction: row;
}

/* ضمان أن اللوجو يأتي أولاً في جميع اللغات */
.brand-logo {
    order: 1;
}

.brand-text {
    order: 2;
}

.brand-logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    width: 70px;
    height: 70px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.logo-image:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-text .logo {
    font-size: 20px;
    font-weight: 700;
    color: #1a365d;
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.2;
}

.brand-text .tagline {
    font-size: 12px;
    color: #4a5568;
    font-weight: 500;
    line-height: 1.3;
    opacity: 0.9;
}

/* تأثيرات تفاعلية */
.brand:hover .logo-image {
    transform: scale(1.05);
}

.brand:hover .brand-text .logo {
    color: #2b77e6;
}

.brand:hover .brand-text .tagline {
    opacity: 1;
}

/* تجاوبية للشاشات الصغيرة */
@media (max-width: 768px) {
    .brand {
        gap: 10px;
    }
    
    .logo-image {
        width: 60px;
        height: 60px;
    }
    
    .brand-text .logo {
        font-size: 18px;
    }
    
    .brand-text .tagline {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .brand {
        gap: 8px;
    }
    
    .logo-image {
        width: 55px;
        height: 55px;
    }
    
    .brand-text .logo {
        font-size: 16px;
    }
    
    .brand-text .tagline {
        font-size: 10px;
    }
}

/* تحسينات للغات RTL */
[dir="rtl"] .brand {
    flex-direction: row;
}

[dir="rtl"] .brand-text {
    text-align: right;
}

/* تحسينات للغات LTR */
[dir="ltr"] .brand {
    flex-direction: row;
}

[dir="ltr"] .brand-text {
    text-align: left;
}

/* تأثيرات إضافية للوجو */
.logo-image {
    position: relative;
}

.logo-image::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(43, 119, 230, 0.1), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.brand:hover .logo-image::before {
    opacity: 1;
}

/* تحسينات للطباعة */
@media print {
    .brand {
        gap: 10px;
    }
    
    .logo-image {
        width: 30px;
        height: 30px;
        filter: none;
    }
    
    .brand-text .logo {
        color: #000;
        font-size: 16px;
    }
    
    .brand-text .tagline {
        color: #666;
        font-size: 10px;
    }
}

/* تأثيرات الحركة المتقدمة */
@keyframes logoRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes logoRotateFast {
    0% {
        transform: scale(1.1) rotate(0deg);
    }
    100% {
        transform: scale(1.1) rotate(360deg);
    }
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    }
    50% {
        filter: drop-shadow(0 4px 16px rgba(43, 119, 230, 0.3));
    }
}

.brand.animate .logo-image {
    animation: logoGlow 3s ease-in-out infinite;
}

/* تحسينات الأداء */
.logo-image {
    will-change: transform, filter;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* احترام تفضيلات المستخدم لتقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .logo-image {
        animation: none;
    }
    
    .logo-image:hover {
        animation: none;
        transform: scale(1.1);
    }
}

/* تأثيرات للوضع المظلم (إذا تم تطبيقه لاحقاً) */
@media (prefers-color-scheme: dark) {
    .brand-text .logo {
        color: #e2e8f0;
    }
    
    .brand-text .tagline {
        color: #a0aec0;
    }
    
    .brand:hover .brand-text .logo {
        color: #63b3ed;
    }
}