/**
 * Company Logo Styles - شركة ركن امجاد
 * Professional logo display and animations
 */

/* ==========================================
   LOADING SCREEN LOGO
   ========================================== */

#spinner .company-logo {
    width: 220px;
    max-width: 80vw;
    height: auto;
    margin-bottom: 2rem;
    animation: logoFadeIn 0.8s ease-in-out, logoPulse 2s ease-in-out infinite;
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes logoPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.05);
    }
}

/* Loading text */
#spinner .loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000000;
    margin-top: 1rem;
    font-family: 'Cairo', 'Roboto', sans-serif;
    letter-spacing: 1px;
}

/* Loading spinner wrapper */
#spinner .logo-spinner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   NAVBAR LOGO
   ========================================== */

.navbar-brand .logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand .logo-icon {
    width: 45px;
    height: 45px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .logo-icon {
    transform: scale(1.1) rotate(5deg);
}

.navbar-brand .logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.navbar-brand .logo-text .main-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #000000;
    margin: 0;
    letter-spacing: 1px;
    font-family: 'Cairo', 'Roboto', sans-serif;
}

.navbar-brand .logo-text .sub-title {
    font-size: 0.65rem;
    font-weight: 500;
    color: #D4AF37;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.navbar-brand:hover .logo-text .main-title {
    color: #D4AF37;
    transition: color 0.3s ease;
}

.navbar-brand:hover .logo-text .sub-title {
    color: #000000;
    transition: color 0.3s ease;
}

/* Full logo for larger screens */
.navbar-brand .logo-full {
    height: 60px;
    width: auto;
    max-width: 250px;
    transition: all 0.3s ease;
}

.navbar-brand:hover .logo-full {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* ==========================================
   FOOTER LOGO
   ========================================== */

.footer .footer-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.footer .footer-logo:hover {
    filter: brightness(0) invert(1) drop-shadow(0 0 10px #D4AF37);
    transition: filter 0.3s ease;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Mobile devices */
@media (max-width: 991.98px) {
    .navbar-brand .logo-full {
        height: 45px;
        max-width: 180px;
    }
    
    .navbar-brand .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .navbar-brand .logo-text .main-title {
        font-size: 1.2rem;
    }
    
    .navbar-brand .logo-text .sub-title {
        font-size: 0.55rem;
    }
    
    #spinner .company-logo {
        width: 160px;
    }
}

/* Small mobile */
@media (max-width: 575.98px) {
    .navbar-brand .logo-full {
        height: 40px;
        max-width: 150px;
    }
    
    .navbar-brand .logo-icon {
        width: 30px;
        height: 30px;
    }
    
    .navbar-brand .logo-text .main-title {
        font-size: 1rem;
    }
    
    .navbar-brand .logo-text .sub-title {
        font-size: 0.5rem;
    }
    
    #spinner .company-logo {
        width: 130px;
    }
    
    #spinner .loading-text {
        font-size: 1rem;
    }
}

/* ==========================================
   LOGO LOADING ANIMATION
   ========================================== */

.logo-loading {
    position: relative;
    display: inline-block;
}

.logo-loading::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #D4AF37, #b8941f);
    animation: loadingBar 2s ease-in-out infinite;
}

@keyframes loadingBar {
    0%, 100% {
        width: 0;
        opacity: 0;
    }
    50% {
        width: 100%;
        opacity: 1;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    #spinner {
        display: none !important;
    }
    
    .navbar-brand .logo-full,
    .navbar-brand .logo-icon {
        filter: grayscale(100%);
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.navbar-brand:focus .logo-icon,
.navbar-brand:focus .logo-full {
    outline: 3px solid #D4AF37;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    #spinner .company-logo,
    .navbar-brand .logo-icon,
    .navbar-brand .logo-full {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================
   DARK MODE SUPPORT
   ========================================== */

@media (prefers-color-scheme: dark) {
    .navbar-brand .logo-text .main-title {
        color: #FFFFFF;
    }
    
    #spinner {
        background-color: #1a1a1a !important;
    }
    
    #spinner .loading-text {
        color: #FFFFFF;
    }
}
