/**
 * Custom CSS for QH Company Web
 * Additional styles for language switcher and animations
 */

/* ========================================
   LANGUAGE SWITCHER
   ======================================== */

.lang-flag {
    font-size: 1.3rem;
    line-height: 1;
    vertical-align: middle;
}

.lang-name {
    font-size: 0.9rem;
    font-weight: 500;
}

#languageDropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

#languageDropdown:hover {
    /*background-color: rgba(255, 255, 255, 0.1);*/
}

.dropdown-menu {
    min-width: 180px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    padding: 0.5rem 0;
}

.dropdown-menu .dropdown-item {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.dropdown-menu .dropdown-item.active {
    background-color: var(--primary-color, #1a4d7a);
    color: white;
    font-weight: 500;
}

.dropdown-menu .dropdown-item:hover:not(.active) {
    background-color: rgba(26, 77, 122, 0.08);
    color: var(--primary-color, #1a4d7a);
}

/* Mobile responsive */
@media (max-width: 991px) {
    .lang-name {
        display: inline !important;
    }
    
    #languageDropdown {
        padding: 0.4rem 0.8rem;
    }
}

/* ========================================
   TRANSLATION LOADING INDICATOR
   ======================================== */

#translation-loading {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   COUNTER ANIMATION
   ======================================== */

.stat-number {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ========================================
   FADE IN ANIMATION
   ======================================== */

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   NAVBAR ENHANCEMENTS
   ======================================== */

.navbar {
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ========================================
   BUTTON HOVER EFFECTS
   ======================================== */

.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* ========================================
   CARD HOVER EFFECTS
   ======================================== */

.product-card,
.blog-card {
    transition: all 0.3s ease;
}

.product-card:hover,
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ========================================
   SMOOTH SCROLL
   ======================================== */

html {
    scroll-behavior: smooth;
}

/* ========================================
   LOADING SPINNER (Optional)
   ======================================== */

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

