/* PNG Logo Optimization and Enhancement */

/* High-DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .company-logo,
    .footer-logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Logo Loading Optimization */
.company-logo,
.footer-logo-img {
    loading: eager; /* Priority loading for logos */
    decoding: sync; /* Synchronous decoding for immediate display */
}

/* Logo Container Enhancements */
.logo {
    position: relative;
    z-index: 10;
}

.logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 68, 68, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    z-index: -1;
}

.logo:hover::after {
    width: 120%;
    height: 120%;
}

/* Footer Logo Container */
.footer-logo {
    position: relative;
    display: inline-block;
}

.footer-logo::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, 
        rgba(255, 68, 68, 0.1) 0%, 
        rgba(37, 99, 235, 0.1) 100%);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-logo:hover::before {
    opacity: 1;
}

/* Logo Animation on Page Load */
@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.company-logo {
    animation: logoEntrance 1s ease-out;
}

.footer-logo-img {
    animation: logoEntrance 1s ease-out 0.5s both;
}

/* Logo Glow Effect */
.logo-glow {
    position: relative;
}

.logo-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, 
        rgba(255, 68, 68, 0.3) 0%, 
        rgba(255, 68, 68, 0.1) 40%, 
        transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { 
        opacity: 0;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* Logo Text Enhancement (if any text elements) */
.logo-text {
    background: linear-gradient(135deg, #ff4444, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Logo Preload Optimization */
.logo-preload {
    position: absolute;
    top: -9999px;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Logo Error Handling */
.company-logo,
.footer-logo-img {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 8px;
}

/* Logo Loading State */
.logo-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: logoLoading 1.5s infinite;
    border-radius: 8px;
}

@keyframes logoLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Logo Focus States for Accessibility */
.logo:focus-within .company-logo {
    outline: 3px solid #fbbf24;
    outline-offset: 4px;
    border-radius: 8px;
}

/* Print Styles for Logo */
@media print {
    .company-logo,
    .footer-logo-img {
        filter: none;
        -webkit-filter: none;
    }
}

/* Logo Retina Display Optimization */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
       only screen and (min-device-pixel-ratio: 1.5),
       only screen and (min-resolution: 144dpi) {
    .company-logo,
    .footer-logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
    }
}

/* Logo Performance Optimization */
.company-logo,
.footer-logo-img {
    will-change: transform, filter;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Logo Container Flexbox Enhancement */
.header-content {
    align-items: center;
    min-height: 70px;
}

.footer-logo {
    text-align: center;
}

@media (max-width: 768px) {
    .footer-logo {
        text-align: center;
        margin-bottom: 1.5rem;
    }
}
