/* 
 * Logo Integration Styles
 * Ensures proper logo display across all devices and contexts
 */

/* Navbar Logo Styles */
.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--brand-white) !important;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: var(--brand-secondary-light) !important;
    text-decoration: none;
}

.brand-logo {
    height: 50px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.navbar-brand:hover .brand-logo {
    transform: scale(1.05);
}

/* Logo variations for different contexts */
.brand-logo-small {
    height: 30px;
    width: auto;
}

.brand-logo-medium {
    height: 50px;
    width: auto;
}

.brand-logo-large {
    height: 80px;
    width: auto;
    max-width: 300px;
}

.brand-logo-hero {
    height: 120px;
    width: auto;
    max-width: 400px;
}

/* Footer logo styles */
.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
    opacity: 0.9;
}

/* Loading placeholder for logo */
.logo-placeholder {
    background: linear-gradient(90deg, var(--brand-gray-200) 25%, var(--brand-gray-100) 50%, var(--brand-gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    .brand-logo {
        height: 42px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .brand-logo-hero {
        height: 80px;
        max-width: 250px;
    }
}

@media (max-width: 576px) {
    .brand-logo {
        height: 36px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .brand-logo-hero {
        height: 60px;
        max-width: 200px;
    }
}

/* Logo with text alignment */
.logo-with-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-title {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--brand-primary);
}

.logo-subtitle {
    font-weight: 400;
    font-size: 0.8em;
    color: var(--brand-gray-600);
    margin-top: -2px;
}

/* Dark theme logo adjustments */
.navbar-dark .logo-title {
    color: var(--brand-white);
}

.navbar-dark .logo-subtitle {
    color: var(--brand-gray-300);
}

/* Logo hover effects */
.logo-hover-effect {
    position: relative;
    overflow: hidden;
}

.logo-hover-effect::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;
}

.logo-hover-effect:hover::before {
    left: 100%;
}

/* Print styles */
@media print {
    .brand-logo {
        height: 30px;
        filter: grayscale(100%);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .brand-logo {
        filter: contrast(1.2);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .brand-logo,
    .navbar-brand,
    .logo-hover-effect::before {
        transition: none;
    }
    
    .navbar-brand:hover .brand-logo {
        transform: none;
    }
}

/* Logo loading states */
.logo-loading {
    opacity: 0.5;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.5; }
    to { opacity: 0.8; }
}

/* Logo error state */
.logo-error {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-gray-200);
    color: var(--brand-gray-600);
    border-radius: 4px;
    font-size: 0.8rem;
    padding: 0.5rem;
}

.logo-error::before {
    content: "📖";
    margin-right: 0.25rem;
}