/**
 * CHK CSS Logo - Modern Animated Logo
 * แทนที่ไฟล์ GIF เพื่อเพิ่ม Performance
 */

/* CHK Logo Container */
.chk-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Arial Black', 'Helvetica', sans-serif;
    font-weight: 900;
    font-size: 2.2rem;
    text-decoration: none;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    min-width: 120px;
    height: 50px;
}

.chk-logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

/* CHK Text */
.chk-text {
    position: relative;
    z-index: 2;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
    animation: textGlow 3s ease-in-out infinite alternate;
}

/* Individual Letters Animation */
.chk-letter {
    display: inline-block;
    transition: all 0.3s ease;
    animation: letterFloat 2s ease-in-out infinite;
}

.chk-letter:nth-child(1) {
    animation-delay: 0s;
    color: #ffffff;
}

.chk-letter:nth-child(2) {
    animation-delay: 0.2s;
    color: #f0f8ff;
}

.chk-letter:nth-child(3) {
    animation-delay: 0.4s;
    color: #e6f3ff;
}

/* Hover Effects for Letters */
.chk-logo:hover .chk-letter:nth-child(1) {
    transform: scale(1.1) rotate(-5deg);
    color: #ffeb3b;
}

.chk-logo:hover .chk-letter:nth-child(2) {
    transform: scale(1.15) rotate(0deg);
    color: #ff9800;
}

.chk-logo:hover .chk-letter:nth-child(3) {
    transform: scale(1.1) rotate(5deg);
    color: #f44336;
}

/* Background Animation */
.chk-logo::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 ease;
    z-index: 1;
}

.chk-logo:hover::before {
    left: 100%;
}

/* Pulse Animation */
.chk-logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: 1;
}

.chk-logo:hover::after {
    width: 120%;
    height: 120%;
}

/* Keyframe Animations */
@keyframes textGlow {
    0% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    100% {
        text-shadow: 
            0 2px 4px rgba(0, 0, 0, 0.2),
            0 0 10px rgba(255, 255, 255, 0.3),
            0 0 20px rgba(255, 255, 255, 0.2);
    }
}

@keyframes letterFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .chk-logo {
        font-size: 1.8rem;
        min-width: 100px;
        height: 45px;
        padding: 0.4rem 0.8rem;
    }
    
    .chk-text {
        letter-spacing: 1.5px;
    }
}

@media (max-width: 480px) {
    .chk-logo {
        font-size: 1.5rem;
        min-width: 85px;
        height: 40px;
        padding: 0.3rem 0.6rem;
    }
    
    .chk-text {
        letter-spacing: 1px;
    }
}

/* Alternative Logo Styles */
.chk-logo.style-minimal {
    background: transparent;
    border: 2px solid #667eea;
    box-shadow: none;
}

.chk-logo.style-minimal .chk-text {
    color: #667eea;
    text-shadow: none;
}

.chk-logo.style-minimal:hover {
    background: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.chk-logo.style-minimal:hover .chk-text {
    color: white;
}

/* Dark Theme Support */
.chk-logo.dark-theme {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.chk-logo.dark-theme:hover {
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.4);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .chk-logo {
        background: #000;
        border: 2px solid #fff;
    }
    
    .chk-text {
        color: #fff;
        text-shadow: none;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .chk-logo,
    .chk-letter,
    .chk-logo::before,
    .chk-logo::after {
        animation: none;
        transition: none;
    }
    
    .chk-logo:hover {
        transform: none;
    }
    
    .chk-logo:hover .chk-letter {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .chk-logo {
        background: none !important;
        box-shadow: none !important;
        border: 2px solid #000 !important;
    }
    
    .chk-text {
        color: #000 !important;
        text-shadow: none !important;
    }
}

/* Loading State */
.chk-logo.loading {
    pointer-events: none;
    opacity: 0.7;
}

.chk-logo.loading .chk-text {
    animation: loadingPulse 1s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Focus States for Accessibility */
.chk-logo:focus {
    outline: 3px solid #ffeb3b;
    outline-offset: 2px;
}

.chk-logo:focus .chk-text {
    color: #ffeb3b;
}

/* Additional Animation Variants */
.chk-logo.animate-bounce:hover .chk-letter {
    animation: letterBounce 0.6s ease;
}

@keyframes letterBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.chk-logo.animate-shake:hover {
    animation: logoShake 0.5s ease;
}

@keyframes logoShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

/* Gradient Text Effect */
.chk-logo.gradient-text .chk-text {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 3D Effect */
.chk-logo.effect-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.chk-logo.effect-3d:hover {
    transform: rotateY(10deg) rotateX(5deg);
}

.chk-logo.effect-3d .chk-text {
    transform: translateZ(20px);
}

/* Neon Effect */
.chk-logo.neon-effect {
    background: #000;
    border: 2px solid #00ffff;
    box-shadow: 
        0 0 10px #00ffff,
        inset 0 0 10px #00ffff;
}

.chk-logo.neon-effect .chk-text {
    color: #00ffff;
    text-shadow: 
        0 0 5px #00ffff,
        0 0 10px #00ffff,
        0 0 15px #00ffff;
    animation: neonFlicker 2s infinite alternate;
}

@keyframes neonFlicker {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}