/* ============================================
   Multi-Language Support Section - TILTED MARQUEE (ALL SAME DIRECTION)
   Zencia.AI Theme
   ============================================ */

.languages-marquee-section {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #0f1419 0%, #082928 100%);
    position: relative;
    overflow: hidden;
}

/* SVG Background Layer */
.languages-marquee-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110%;
    height: 100%;
    background-image: url('https://cdn.jsdelivr.net/gh/tech-zencia/website-images@main/language-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    filter: brightness(0.8);
    animation: svgFloat 20s ease-in-out infinite;
    z-index: 1;
}

@keyframes svgFloat {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.08) rotate(2deg);
    }
}

/* Overlay Gradient */
.languages-marquee-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 2;
    pointer-events: none;
}

.languages-container {
    position: relative;
    z-index: 3;
}

/* Container 1: Title Container */
.title-container {
    text-align: center;
    padding: 0 20px;
    margin-bottom: 60px;
}

.languages-title {
    font-size: 56px;
    font-weight: 700;
    color: #FFFFFF;
    text-align: center;
    letter-spacing: -1.5px;
    line-height: 1.2;
    transition: color var(--transition-medium);
}

/* Container 2: Marquee Container - WITH TILT */
.marquee-container {
    margin-bottom: 80px;
    position: relative;
    width: 100%;
    perspective: 1000px;
}

/* Marquee Wrapper - TILTED (ALL SAME DIRECTION) */
.languages-marquee {
    position: relative;
    width: 120vw; /* Wider to account for tilt */
    left: 50%;
    margin-left: -60vw; /* Center the wider container */
    margin-bottom: 20px;
    height: 80px;
    overflow: visible;
    display: flex;
    align-items: center;
    
    /* ALL ROWS TILTED IN SAME DIRECTION */
    transform: rotate(-2deg);
    transform-origin: center center;
}

/* Mask for fade effect - adjusted for tilt */
.languages-marquee::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    background: linear-gradient(
        to right,
        #000000 0%,
        transparent 8%,
        transparent 92%,
        #000000 100%
    );
}

/* Languages Track */
.languages-track {
    display: flex;
    gap: 20px;
    position: absolute;
    white-space: nowrap;
    will-change: transform;
}

/* Different animation speeds for each row */
.languages-marquee:nth-child(1) .languages-track {
    animation: scroll-left 60s linear infinite;
}

.languages-marquee:nth-child(2) .languages-track {
    animation: scroll-right 65s linear infinite;
}

.languages-marquee:nth-child(3) .languages-track {
    animation: scroll-left 70s linear infinite;
}

/* Smooth infinite scroll animations */
@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-right {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0%);
    }
}

.languages-track:hover {
    animation-play-state: paused;
}

/* Language Badge */
.language-badge {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 180px;
}

.language-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 217, 213, 0.15), rgba(0, 139, 139, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.language-badge:hover::before {
    opacity: 1;
}

.language-badge:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 217, 213, 0.5);
    box-shadow: 0 10px 30px rgba(0, 217, 213, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .language-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .language-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 217, 213, 0.6);
    box-shadow: 0 15px 40px rgba(0, 217, 213, 0.4);
}

.language-flag {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.language-badge:hover .language-flag {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 
        0 4px 16px rgba(0, 217, 213, 0.4),
        0 0 20px rgba(0, 217, 213, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1) saturate(1.2);
}

.language-name {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    transition: color var(--transition-medium);
    position: relative;
    z-index: 1;
}

/* Container 3: Content Container (if needed) */
.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

.languages-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.languages-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.languages-preview {
    position: sticky;
    top: 100px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .languages-marquee-section {
        padding: 100px 0 60px;
    }

    .title-container {
        margin-bottom: 50px;
    }

    .languages-title {
        font-size: 48px;
    }

    .marquee-container {
        margin-bottom: 60px;
    }

    .languages-marquee {
        margin-bottom: 16px;
        height: 70px;
        width: 130vw;
        margin-left: -65vw;
    }

    .languages-track {
        gap: 16px;
    }

    .language-badge {
        padding: 14px 20px;
        min-width: 160px;
    }

    .language-flag {
        width: 28px;
        height: 28px;
    }

    .language-name {
        font-size: 14px;
    }
    
    .content-container {
        padding: 0 30px;
    }
    
    .languages-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .languages-preview {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .languages-marquee-section {
        padding: 80px 0 50px;
    }

    .title-container {
        margin-bottom: 40px;
    }

    .languages-title {
        font-size: 32px;
        line-height: 1.3;
        letter-spacing: -0.5px;
        padding: 0 30px;
    }
    
    .languages-title br {
        display: inline;
    }

    .marquee-container {
        margin-bottom: 50px;
    }
    
    .languages-marquee {
        margin-bottom: 12px;
        height: 65px;
        /* Reduce tilt slightly on mobile, but keep same direction */
        transform: rotate(-1.5deg);
    }

    .languages-track {
        gap: 12px;
    }

    .language-badge {
        padding: 12px 18px;
        border-radius: 10px;
        min-width: 140px;
    }

    .language-flag {
        width: 26px;
        height: 26px;
    }

    .language-name {
        font-size: 13px;
    }
    
    .content-container {
        padding: 0 20px;
    }
    
    .languages-grid {
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .languages-marquee-section {
        padding: 60px 0 40px;
    }

    .languages-title {
        font-size: 24px;
        line-height: 1.4;
        letter-spacing: 0;
        margin-bottom: 40px;
        padding: 0 20px;
    }

    .languages-marquee {
        height: 60px;
        /* Minimal tilt on small screens, but keep same direction */
        transform: rotate(-1deg);
    }

    .languages-track {
        gap: 10px;
    }

    .language-badge {
        padding: 10px 16px;
        min-width: 130px;
    }

    .language-flag {
        width: 24px;
        height: 24px;
    }

    .language-name {
        font-size: 12px;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .languages-track {
        animation: none;
    }
    
    .languages-marquee {
        transform: rotate(0deg) !important;
    }
}
