/* Custom CSS for YG Food Trade Website */

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-link::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[dir="rtl"] .animate-fade-in-left {
    animation: fadeInRight 0.6s ease-out;
}

[dir="rtl"] .animate-fade-in-right {
    animation: fadeInLeft 0.6s ease-out;
}

/* Language Switcher */
.lang-switcher {
    background: linear-gradient(135deg, #FF6B35 0%, #1E3A8A 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-switcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.lang-switcher i {
    font-size: 16px;
}

/* RTL specific adjustments */
[dir="rtl"] .lang-switcher {
    flex-direction: row-reverse;
}

[dir="rtl"] .lang-switcher i {
    margin-left: 0;
    margin-right: 8px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* Hover effects */
.brand-card {
    transition: all 0.3s ease;
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #E55A2B 0%, #E57A3A 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.3);
}

/* Hero section enhancements */
.hero-section {
    background: linear-gradient(135deg, #FF6B35 0%, #1E3A8A 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

/* Navigation enhancements */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #FF6B35;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Stats counter animation */
.stat-number {
    transition: all 0.3s ease;
}

.stat-number:hover {
    transform: scale(1.1);
    color: #FF6B35;
}

/* Form enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.2);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Logo carousel animation */
.animate-scroll {
    animation: scroll 30s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.animate-scroll:hover {
    animation-play-state: paused;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .brand-card {
        margin-bottom: 1rem;
    }
    
    .animate-scroll {
        animation-duration: 20s;
    }
    
    .lang-switcher {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #FF6B35;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E55A2B;
}

/* Print styles */
@media print {
    .nav, .footer, .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
} 