/**
 * CJ Technical Training Logo Styles
 * Responsive logo implementation for all screen sizes
 */

/* Logo Container */
.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

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

/* Main Logo JPEG */
.cj-logo {
    width: 100%;
    height: auto;
    max-width: 300px;
    min-width: 200px;
    transition: all 0.3s ease;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Mobile Logo JPEG */
.cj-logo-mobile {
    width: 100%;
    height: auto;
    max-width: 200px;
    min-width: 150px;
    transition: all 0.3s ease;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Favicon */
.cj-favicon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Logo Text Styling */
.logo-text {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    color: #1e40af;
    transition: color 0.3s ease;
}

.logo-text:hover {
    color: #3b82f6;
}

/* Responsive Logo Sizing */

/* Extra Large Screens (1200px and up) */
@media (min-width: 1200px) {
    .cj-logo {
        max-width: 350px;
        min-width: 280px;
    }
    
    .logo-container {
        gap: 1rem;
    }
}

/* Large Screens (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .cj-logo {
        max-width: 280px;
        min-width: 220px;
    }
    
    .logo-container {
        gap: 0.75rem;
    }
}

/* Medium Screens (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .cj-logo {
        max-width: 250px;
        min-width: 200px;
    }
    
    .logo-container {
        gap: 0.5rem;
    }
}

/* Small Screens (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .cj-logo-mobile {
        max-width: 180px;
        min-width: 150px;
    }
    
    .logo-container {
        gap: 0.5rem;
    }
}

/* Extra Small Screens (below 576px) */
@media (max-width: 575px) {
    .cj-logo-mobile {
        max-width: 150px;
        min-width: 120px;
    }
    
    .logo-container {
        gap: 0.25rem;
    }
}

/* Logo in Header */
.header-logo {
    display: flex;
    align-items: center;
}

.header-logo .cj-logo {
    max-width: 150px;
    min-width: 120px;
    height: auto;
    object-fit: contain;
}

.header-logo .cj-logo-mobile {
    max-width: 120px;
    min-width: 100px;
    height: auto;
    object-fit: contain;
}

/* Logo in Footer */
.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo .cj-logo {
    max-width: 120px;
    min-width: 100px;
    height: auto;
    object-fit: contain;
}

.footer-logo .cj-logo-mobile {
    max-width: 100px;
    min-width: 80px;
    height: auto;
    object-fit: contain;
}

/* Logo in Hero Section */
.hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-logo .cj-logo {
    max-width: 200px;
    min-width: 150px;
    height: 120px;
}

.hero-logo .cj-logo-mobile {
    max-width: 150px;
    min-width: 120px;
    height: 90px;
}

/* Logo Animation */
@keyframes logoPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.logo-container.animated:hover .cj-logo,
.logo-container.animated:hover .cj-logo-mobile {
    animation: logoPulse 0.6s ease-in-out;
}

/* Logo with Text */
.logo-with-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.logo-with-text .logo-svg {
    max-width: 60px;
    height: 60px;
}

.logo-with-text .logo-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
}

.logo-with-text .logo-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.2;
}

/* Print Styles */
@media print {
    .cj-logo,
    .cj-logo-mobile {
        max-width: 200px;
        height: auto;
    }
    
    .logo-container {
        break-inside: avoid;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .cj-logo,
    .cj-logo-mobile {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: auto;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .logo-text {
        color: #60a5fa;
    }
    
    .logo-text:hover {
        color: #93c5fd;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .logo-container {
        transition: none;
    }
    
    .logo-container:hover {
        transform: none;
    }
    
    .logo-container.animated:hover .cj-logo,
    .logo-container.animated:hover .cj-logo-mobile {
        animation: none;
    }
}

/* JPEG Specific Optimizations */
.cj-logo,
.cj-logo-mobile {
    /* Ensure proper JPEG rendering */
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    
    /* Prevent pixelation on scaling */
    -ms-interpolation-mode: bicubic;
    
    /* Smooth scaling */
    transform: translateZ(0);
    backface-visibility: hidden;
}
