/* Modern Professional Gaming UI for Tronix */

* {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    letter-spacing: 0.3px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #0a0a0a;
    color: #ffffff;
}

[dir="rtl"] body {
    font-family: 'Cairo', 'Tajawal', 'Rajdhani', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    letter-spacing: 3px;
    line-height: 1.2;
}

/* Modern Background Effects */
.animated-bg {
    background: radial-gradient(ellipse at top, #1a0a0a 0%, #0a0a0a 50%, #000000 100%);
    position: fixed;
    inset: 0;
    z-index: -10;
}

.particles {
    position: fixed;
    inset: 0;
    z-index: -9;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 107, 107, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(107, 107, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(107, 255, 107, 0.08) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.tech-grid {
    position: fixed;
    inset: 0;
    z-index: -8;
    background-image: 
        linear-gradient(rgba(255, 107, 107, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 107, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    animation: gridDrift 30s linear infinite;
}

@keyframes gridDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.scan-lines {
    position: fixed;
    inset: 0;
    z-index: -7;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(255, 107, 107, 0.02) 3px,
        rgba(255, 107, 107, 0.02) 6px
    );
    pointer-events: none;
    animation: scanDrift 10s linear infinite;
}

@keyframes scanDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

/* Modern Navigation */
.glass-nav {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-bottom: 1px solid rgba(255, 107, 107, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 107, 107, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@media (max-width: 768px) {
    .glass-nav {
        padding: 0.75rem 0;
    }
    
    .glass-nav .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.glass-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent,
        rgba(255, 107, 107, 0.6),
        rgba(255, 107, 107, 0.9),
        rgba(255, 107, 107, 0.6),
        transparent
    );
    animation: navLineGlow 3s ease-in-out infinite;
}

@keyframes navLineGlow {
    0%, 100% { opacity: 0.4; transform: scaleX(0.8); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* Navigation Logo - White */
.nav-logo,
.nav-logo-mobile,
.nav-logo-desktop,
nav .logo-container img,
nav img {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

nav .logo-container:hover .nav-logo,
nav .logo-container:hover .nav-logo-mobile,
nav .logo-container:hover .nav-logo-desktop,
nav .logo-container:hover img {
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 107, 107, 0.8));
}

/* Footer Logo - White */
.footer-logo,
footer img[alt*="Logo"],
footer img[alt*="Tronix"] {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.footer-logo:hover,
footer img[alt*="Logo"]:hover,
footer img[alt*="Tronix"]:hover {
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 107, 107, 0.8));
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    text-transform: none;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 10px 16px;
    border-radius: 8px;
    display: inline-block;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: calc(100% - 32px);
    height: 2px;
    background: linear-gradient(90deg, transparent, #FF6B6B, transparent);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.6);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 107, 107, 0.1);
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.4);
}

.nav-link:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-link span:last-child {
    display: none;
}

/* Better nav links container spacing */
nav .flex.items-center.space-x-6 > * + *,
nav .flex.items-center.space-x-8 > * + * {
    margin-left: 1.5rem;
}

@media (min-width: 1280px) {
    nav .flex.items-center.space-x-8 > * + * {
        margin-left: 2rem;
    }
}

/* Hero Section */
.hero-bg {
    background-image: url('images/24052021_ROB_01.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.6) 40%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
}

.logo-hero img {
    filter: drop-shadow(0 0 40px rgba(255, 107, 107, 0.6));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        filter: drop-shadow(0 0 40px rgba(255, 107, 107, 0.6));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 60px rgba(255, 107, 107, 0.9));
        transform: scale(1.05);
    }
}

/* Modern Buttons */
.btn-primary, .btn-secondary {
    position: relative;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%);
    color: white;
    border-color: rgba(255, 107, 107, 0.5);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 30px rgba(255, 107, 107, 0.5),
        0 0 25px rgba(255, 107, 107, 0.4);
    border-color: rgba(255, 107, 107, 0.8);
}

.btn-secondary {
    background: transparent;
    color: #FF6B6B;
    border: 2px solid #FF6B6B;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #FF6B6B, #FF5252);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-secondary:hover::before {
    width: 100%;
}

.btn-secondary:hover {
    color: white;
    transform: translateY(-4px);
    box-shadow: 
        0 8px 30px rgba(255, 107, 107, 0.5),
        0 0 25px rgba(255, 107, 107, 0.4);
    text-shadow: none;
    border-color: rgba(255, 107, 107, 0.8);
}

/* Modern Section Titles */
.section-title-modern {
    text-shadow: 
        0 0 30px rgba(255, 107, 107, 0.6),
        0 0 60px rgba(255, 107, 107, 0.4),
        0 0 90px rgba(255, 107, 107, 0.2);
    letter-spacing: 6px;
    position: relative;
    display: inline-block;
    line-height: 1.1;
}

.section-title-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -60px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FF6B6B);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.8);
    transform: translateY(-50%);
}

.section-title-modern::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -60px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #FF6B6B, transparent);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.8);
    transform: translateY(-50%);
}

.section-title {
    text-shadow: 
        0 0 20px rgba(255, 107, 107, 0.5),
        0 0 40px rgba(255, 107, 107, 0.3);
    letter-spacing: 4px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #FF6B6B, transparent);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
    border-radius: 2px;
}

/* Modern Glass Cards */
.glass-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.1), transparent);
    transition: left 0.6s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    border-color: rgba(255, 107, 107, 0.5);
    box-shadow: 
        0 12px 48px rgba(255, 107, 107, 0.3),
        0 0 30px rgba(255, 107, 107, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

/* Services Section Background */
#services {
    position: relative;
}

#services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 50%, rgba(255, 107, 107, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(107, 107, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#services > .container {
    position: relative;
    z-index: 1;
}

/* Enhanced Service Cards */
.service-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.02) 50%,
        rgba(255, 107, 107, 0.05) 100%
    );
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 24px;
    padding: 50px 40px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 107, 107, 0.1) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.service-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FF6B6B, #FF5252, #FF6B6B);
    border-radius: 24px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.5s;
    filter: blur(15px);
}

.service-card:hover::after {
    opacity: 0.4;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.03);
    border-color: rgba(255, 107, 107, 0.7);
    box-shadow: 
        0 25px 70px rgba(255, 107, 107, 0.5),
        0 0 50px rgba(255, 107, 107, 0.4),
        0 0 80px rgba(255, 107, 107, 0.2),
        inset 0 0 40px rgba(255, 107, 107, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.04) 50%,
        rgba(255, 107, 107, 0.1) 100%
    );
}

.service-icon {
    font-size: 90px;
    color: #FF6B6B;
    filter: drop-shadow(0 10px 30px rgba(255, 107, 107, 0.6));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 30px;
    display: inline-block;
}

.service-icon i {
    display: inline-block;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(8deg) translateY(-8px);
    filter: drop-shadow(0 20px 40px rgba(255, 107, 107, 0.9));
    color: #FF7F7F;
}

.service-card:hover .service-icon i {
    text-shadow: 
        0 0 20px rgba(255, 107, 107, 0.8),
        0 0 40px rgba(255, 107, 107, 0.6);
}

.service-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.service-card:hover .service-feature-item {
    color: #fff;
    transform: translateX(10px);
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.feature-check {
    color: #FF6B6B;
    font-size: 18px;
    min-width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.6));
    transition: all 0.3s ease;
}

.service-card:hover .feature-check {
    transform: scale(1.2);
    filter: drop-shadow(0 0 12px rgba(255, 107, 107, 0.9));
    color: #FF7F7F;
}

/* Enhanced Client Gallery */
.client-gallery {
    display: flex;
    flex-direction: column;
    gap: 50px;
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 0;
    overflow: hidden;
    position: relative;
}

.client-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(255, 107, 107, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(107, 107, 255, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: galleryGlow 6s ease-in-out infinite;
}

@keyframes galleryGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.client-row-scroll {
    overflow: hidden;
    width: 100%;
    position: relative;
    z-index: 1;
    padding: 20px 0;
}

.client-scroll-content {
    display: flex;
    gap: 30px;
    width: fit-content;
    will-change: transform;
}

.row-scroll-left .client-scroll-content {
    animation: scrollLeft 35s linear infinite;
}

.row-scroll-left:hover .client-scroll-content {
    animation-play-state: paused;
}

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

.row-scroll-right .client-scroll-content {
    animation: scrollRight 35s linear infinite;
}

.row-scroll-right:hover .client-scroll-content {
    animation-play-state: paused;
}

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

.client-image-card {
    position: relative;
    border-radius: 20px;
    overflow: visible;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05), rgba(255, 107, 107, 0.02));
    border: 1px solid rgba(255, 107, 107, 0.15);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
    width: 240px;
    height: auto;
    padding: 20px;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.client-image {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
    background: transparent;
    display: block;
}

.client-image-card:hover .client-image {
    transform: scale(1.12) translateY(-12px);
    filter: drop-shadow(0 20px 50px rgba(255, 107, 107, 0.7));
}

.client-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

.client-image-card:hover .client-overlay {
    opacity: 1;
}

.client-icon {
    font-size: 40px;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.8);
    padding: 18px;
    border-radius: 50%;
    color: #FF6B6B;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.6);
}

.client-icon i {
    filter: drop-shadow(0 0 15px rgba(255, 107, 107, 0.8));
}

.client-image-card:hover .client-icon {
    transform: scale(1) rotate(360deg);
    color: #FF7F7F;
}

.client-image-card:hover {
    transform: translateY(-18px) scale(1.06);
    border-color: rgba(255, 107, 107, 0.5);
    box-shadow: 
        0 20px 50px rgba(255, 107, 107, 0.4),
        0 0 40px rgba(255, 107, 107, 0.3),
        inset 0 0 20px rgba(255, 107, 107, 0.1);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.12), rgba(255, 107, 107, 0.06));
}

/* Brands Scrolling Container */
.brands-scroll-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
    overflow: hidden;
}

.brand-row-scroll {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 15px 0;
}

.brand-scroll-content {
    display: flex;
    gap: 40px;
    width: fit-content;
    will-change: transform;
}

.row-scroll-left .brand-scroll-content {
    animation: brandScrollLeft 40s linear infinite;
}

.row-scroll-left:hover .brand-scroll-content {
    animation-play-state: paused;
}

.row-scroll-right .brand-scroll-content {
    animation: brandScrollRight 40s linear infinite;
}

.row-scroll-right:hover .brand-scroll-content {
    animation-play-state: paused;
}

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

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

.brand-logo-item {
    background: transparent;
    border: none;
    padding: 20px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    height: 80px;
    flex-shrink: 0;
    position: relative;
}

.brand-logo-item .brand-logo-img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.brand-logo-item .brand-logo-img:not([src]),
.brand-logo-item .brand-logo-img[src=""] {
    opacity: 0;
}

@media (max-width: 768px) {
    .brand-logo-item {
        min-width: 120px;
        height: 60px;
        padding: 15px 20px;
    }
    
    .brand-logo-item .brand-logo-img {
        max-height: 45px;
        max-width: 100px;
    }
    
    .brand-scroll-content {
        gap: 30px;
    }
    
    .brands-scroll-container {
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .brand-logo-item {
        min-width: 100px;
        height: 50px;
        padding: 10px 15px;
    }
    
    .brand-logo-item .brand-logo-img {
        max-height: 35px;
        max-width: 80px;
    }
    
    .brand-scroll-content {
        gap: 25px;
    }
}

.brand-logo-item:hover {
    transform: scale(1.1);
}

/* Legacy support */
.brands-container {
    display: none;
}

.brand-logo-3d {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 20px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    min-height: auto;
}

.brand-logo-img {
    max-width: 100%;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.brand-logo-item .brand-logo-img {
    max-height: 60px;
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
    display: block;
}

.brand-text-fallback {
    font-weight: 700;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: none;
    text-align: center;
    line-height: 1.2;
}

.brand-logo-3d:hover .brand-text-fallback {
    color: #FF6B6B;
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.8);
}

.brand-logo-3d::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.brand-logo-3d:hover::before {
    opacity: 1;
}

.brand-logo-3d:hover {
    transform: translateY(-12px) rotateX(5deg) rotateY(5deg) scale(1.1);
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 
        0 25px 60px rgba(255, 107, 107, 0.5),
        0 0 60px rgba(255, 107, 107, 0.4),
        inset 0 0 40px rgba(255, 107, 107, 0.15);
    background: linear-gradient(135deg, 
        rgba(255, 107, 107, 0.15) 0%,
        rgba(255, 107, 107, 0.08) 100%
    );
}

.brand-logo-item:hover .brand-logo-img {
    filter: brightness(0) invert(1) drop-shadow(0 0 15px rgba(255, 107, 107, 0.8));
    transform: scale(1.1);
}

.brand-logo-item .brand-text-fallback {
    color: white;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.brand-logo-item:hover .brand-text-fallback {
    color: #FF6B6B;
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.8);
}

/* Social Icons */
.social-icon-3d {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 107, 107, 0.08));
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.social-icon-3d::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.social-icon-3d:hover::before {
    width: 120px;
    height: 120px;
}

.social-icon-3d:hover {
    transform: translateY(-6px) rotate(5deg) scale(1.1);
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 
        0 10px 35px rgba(255, 107, 107, 0.5),
        0 0 25px rgba(255, 107, 107, 0.4);
    color: #FF6B6B;
}

/* Contact Items */
.contact-item {
    text-decoration: none;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item:hover {
    transform: translateX(8px);
    color: #FF6B6B;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FF6B6B, #FF5252);
    border-radius: 6px;
    border: 2px solid #0a0a0a;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FF7F7F, #FF6B6B);
}

/* Text Selection */
::selection {
    background-color: rgba(255, 107, 107, 0.3);
    color: white;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .brand-logo-3d:hover,
    .client-image-card:hover,
    .service-card:hover {
        transform: none;
    }
    
    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.95);
    }
    
    .lang-btn:active {
        transform: scale(0.9);
    }
}

/* Improved Focus States for Accessibility */
*:focus-visible {
    outline: 2px solid #FF6B6B;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth Transitions for RTL/LTR Switch */
html[dir] * {
    transition: direction 0.3s ease;
}

/* Container Responsive Padding */
@media (max-width: 640px) {
    section {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Additional Responsive Fixes */
@media (max-width: 375px) {
    .brands-container {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 8px;
    }
    
    .brand-logo-3d {
        padding: 15px 8px;
        font-size: 9px;
    }
    
    .service-card {
        padding: 20px 12px;
    }
    
    .section-title-modern {
        font-size: 1.75rem;
    }
}

/* Fix for RTL responsive */
[dir="rtl"] .service-card:hover .service-feature-item {
    transform: translateX(-10px);
}

[dir="rtl"] .brands-container {
    direction: ltr; /* Keep brands in LTR for consistency */
}

/* Ensure brands scroll container maintains LTR for scrolling */
[dir="rtl"] .brands-scroll-container,
[dir="rtl"] .brand-row-scroll,
[dir="rtl"] .brand-scroll-content {
    direction: ltr; /* Keep scrolling in LTR for consistency */
}

[dir="rtl"] .client-gallery {
    direction: ltr; /* Keep client gallery in LTR for consistency */
}

[dir="rtl"] .client-scroll-content {
    direction: ltr;
}

[dir="rtl"] .grid {
    direction: rtl;
}

[dir="rtl"] .grid > * {
    direction: rtl;
}

/* Prevent horizontal scroll */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .text-center {
    text-align: center;
}

[dir="rtl"] .container {
    direction: rtl;
}

[dir="rtl"] .flex {
    flex-direction: row-reverse;
}

[dir="rtl"] .flex.flex-col {
    flex-direction: column;
}

[dir="rtl"] .flex.flex-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .space-x-2 > * + * {
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="rtl"] .space-x-3 > * + * {
    margin-right: 0.75rem;
    margin-left: 0;
}

[dir="rtl"] .space-x-4 > * + * {
    margin-right: 1rem;
    margin-left: 0;
}

[dir="rtl"] .space-x-6 > * + * {
    margin-right: 1.5rem;
    margin-left: 0;
}

[dir="rtl"] .space-x-8 > * + * {
    margin-right: 2rem;
    margin-left: 0;
}

[dir="rtl"] .ml-2,
[dir="rtl"] .ml-4 {
    margin-left: 0;
}

[dir="rtl"] .mr-2,
[dir="rtl"] .mr-4 {
    margin-right: 0;
}

[dir="rtl"] .mx-auto {
    margin-left: auto;
    margin-right: auto;
}

[dir="rtl"] .nav-link span:last-child {
    left: auto;
    right: 0;
}

[dir="rtl"] .nav-link:hover span:last-child {
    left: auto;
    right: 0;
    width: 100% !important;
}

/* Navigation RTL Support - Main container */
[dir="rtl"] nav > .container > .flex.items-center.justify-between {
    flex-direction: row-reverse;
}

/* Logo container should not reverse */
[dir="rtl"] nav .flex.items-center.space-x-2:first-child,
[dir="rtl"] nav .flex.items-center.space-x-3:first-child {
    flex-direction: row;
}

[dir="rtl"] nav .flex.items-center.space-x-6,
[dir="rtl"] nav .flex.items-center.space-x-8 {
    flex-direction: row-reverse;
}

/* Navigation spacing in RTL */
[dir="rtl"] nav .space-x-1 > * + * {
    margin-right: 0.25rem;
    margin-left: 0;
}

[dir="rtl"] nav .space-x-2 > * + * {
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="rtl"] nav .space-x-3 > * + * {
    margin-right: 0.75rem;
    margin-left: 0;
}

[dir="rtl"] nav .space-x-4 > * + * {
    margin-right: 1rem;
    margin-left: 0;
}

[dir="rtl"] nav .space-x-6 > * + * {
    margin-right: 1.5rem;
    margin-left: 0;
}

[dir="rtl"] nav .space-x-8 > * + * {
    margin-right: 2rem;
    margin-left: 0;
}

/* Mobile menu RTL */
[dir="rtl"] #mobile-menu {
    text-align: right;
}

[dir="rtl"] #mobile-menu a {
    text-align: right;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

/* Nav flex containers - be specific to avoid conflicts */
[dir="rtl"] nav > .container > .flex.items-center.justify-between {
    flex-direction: row-reverse;
}

[dir="rtl"] nav .flex.items-center.space-x-6,
[dir="rtl"] nav .flex.items-center.space-x-8 {
    flex-direction: row-reverse;
}

[dir="rtl"] nav .flex.items-center.space-x-2,
[dir="rtl"] nav .flex.items-center.space-x-4 {
    flex-direction: row-reverse;
}

[dir="rtl"] .contact-item:hover {
    transform: translateX(-8px);
}

/* Footer RTL Support */
[dir="rtl"] footer .grid {
    direction: rtl;
}

[dir="rtl"] footer .grid > div {
    text-align: center;
}

[dir="rtl"] footer .flex.items-center.space-x-2,
[dir="rtl"] footer .flex.items-center.space-x-3 {
    flex-direction: row-reverse;
}

[dir="rtl"] footer .space-x-2 > * + * {
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="rtl"] footer .space-x-3 > * + * {
    margin-right: 0.75rem;
    margin-left: 0;
}

[dir="rtl"] footer .space-x-4 > * + * {
    margin-right: 1rem;
    margin-left: 0;
}

[dir="rtl"] footer .flex.space-x-3,
[dir="rtl"] footer .flex.space-x-4 {
    flex-direction: row-reverse;
    justify-content: center;
}

[dir="rtl"] footer .text-center {
    text-align: center;
}

[dir="rtl"] footer h3 {
    text-align: center;
}

[dir="rtl"] footer p {
    text-align: center;
}

[dir="rtl"] footer .contact-item {
    flex-direction: row-reverse;
    justify-content: center;
}

[dir="rtl"] footer .contact-item svg {
    order: 2;
}

[dir="rtl"] footer .contact-item span {
    order: 1;
}

/* Ensure footer logo is properly aligned */
[dir="rtl"] footer .flex.items-center {
    justify-content: center;
}

/* Social icons in footer RTL */
[dir="rtl"] footer .social-icon-3d {
    margin-left: 0;
    margin-right: 0;
}

/* Footer responsive improvements */
@media (max-width: 768px) {
    [dir="rtl"] footer h3,
    [dir="rtl"] footer p {
        text-align: center;
    }
    
    [dir="rtl"] footer .contact-item {
        justify-content: center;
    }
}

/* Language switcher RTL */
[dir="rtl"] .language-switcher {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] nav .language-switcher {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] nav .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] nav .ml-4,
[dir="rtl"] nav .xl\:ml-4 {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] .flex.items-center.space-x-3 {
    flex-direction: row-reverse;
}

[dir="rtl"] .flex.items-center.space-x-8 {
    flex-direction: row-reverse;
}

[dir="rtl"] .flex.space-x-4 {
    flex-direction: row-reverse;
}

[dir="rtl"] .flex.space-x-6 {
    flex-direction: row-reverse;
}

[dir="rtl"] .justify-between {
    flex-direction: row-reverse;
}

[dir="rtl"] .justify-center {
    flex-direction: row;
}

[dir="rtl"] .justify-start {
    flex-direction: row-reverse;
}

[dir="rtl"] .justify-end {
    flex-direction: row;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
    font-family: 'Cairo', 'Tajawal', 'Orbitron', sans-serif;
    letter-spacing: 0;
}

[dir="rtl"] .section-title,
[dir="rtl"] .section-title-modern {
    letter-spacing: 0;
}

[dir="rtl"] .btn-primary,
[dir="rtl"] .btn-secondary {
    letter-spacing: 0;
    font-family: 'Cairo', 'Tajawal', 'Orbitron', sans-serif;
}

/* Fix hero buttons container in RTL */
[dir="rtl"] .hero-bg .flex.flex-col.sm\:flex-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-bg .flex.flex-col {
    flex-direction: column;
}

/* Fix button animations in RTL */
[dir="rtl"] .btn-primary::before {
    left: auto;
    right: -100%;
}

[dir="rtl"] .btn-primary:hover::before {
    right: 100%;
    left: auto;
}

[dir="rtl"] .btn-secondary::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .nav-link {
    letter-spacing: 0;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

[dir="rtl"] .section-title-modern::before,
[dir="rtl"] .section-title-modern::before {
    left: auto;
    right: -60px;
}

[dir="rtl"] .section-title-modern::after {
    right: auto;
    left: -60px;
}

/* Fix section titles order in RTL */
[dir="rtl"] .section-title-modern,
[dir="rtl"] .section-title,
[dir="rtl"] h3.text-3xl,
[dir="rtl"] h3.text-4xl,
[dir="rtl"] h3.text-5xl {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.25em;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
    font-family: 'Cairo', 'Tajawal', 'Orbitron', sans-serif;
    letter-spacing: 0;
}

[dir="rtl"] .section-title,
[dir="rtl"] .section-title-modern {
    letter-spacing: 0;
}

[dir="rtl"] .btn-primary,
[dir="rtl"] .btn-secondary {
    letter-spacing: 0;
    font-family: 'Cairo', 'Tajawal', 'Orbitron', sans-serif;
}

[dir="rtl"] .nav-link {
    letter-spacing: 0;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 107, 0.2);
    backdrop-filter: blur(10px);
}

.lang-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-weight: 600;
    min-width: 44px;
    text-align: center;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.lang-btn::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;
}

.lang-btn:hover::before {
    left: 100%;
}

.lang-btn.active {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.lang-btn:not(.active) {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.lang-btn:not(.active):hover {
    background: rgba(255, 107, 107, 0.15);
    color: #FF6B6B;
    border-color: rgba(255, 107, 107, 0.5);
    transform: translateY(-2px);
}

/* Enhanced Responsive Design */
@media (max-width: 1536px) {
    .container {
        max-width: 1280px;
    }
}

@media (max-width: 1280px) {
    .container {
        max-width: 1024px;
    }
    
    .section-title-modern {
        font-size: 4.5rem;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 768px;
    }
    
    .section-title-modern {
        font-size: 4rem;
    }
    
    .service-card {
        padding: 40px 30px;
    }
    
    .brand-logo-3d {
        padding: 35px 25px;
    }
    
    .brands-container {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .section-title-modern {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .service-card {
        padding: 35px 25px;
    }
    
    .service-icon {
        font-size: 60px;
    }
    
    .service-icon-wrapper {
        margin-bottom: 1.5rem;
    }
    
    .client-image-card {
        width: 160px;
        height: 160px;
    }
    
    .client-icon {
        font-size: 32px;
        width: 60px;
        height: 60px;
        padding: 14px;
    }
    
    .brand-logo-3d {
        padding: 25px 15px;
        font-size: 12px;
    }
    
    .brand-logo-img {
        max-height: 35px;
    }
    
    .brands-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 15px;
    }
    
    .glass-card {
        padding: 2rem 1.5rem;
    }
    
    .logo-hero img {
        height: 8rem;
    }
    
    nav .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .language-switcher {
        margin-left: 0.5rem;
    }
    
    [dir="rtl"] .language-switcher {
        margin-right: 0.5rem;
        margin-left: 0;
    }
    
    /* Mobile Menu Improvements */
    #mobile-menu {
        padding: 1rem 0;
        border-top: 1px solid rgba(255, 107, 107, 0.2);
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(20px);
        border-radius: 0 0 12px 12px;
        margin-top: 0.5rem;
    }
    
    #mobile-menu a {
        padding: 0.875rem 1.25rem;
        display: block;
        border-radius: 8px;
        margin: 0.375rem 0.5rem;
        transition: all 0.3s ease;
        color: rgba(255, 255, 255, 0.85);
        font-weight: 500;
        transition: all 0.3s ease;
    }
    
    #mobile-menu a:hover {
        background: rgba(255, 107, 107, 0.15);
        color: #FF6B6B;
        transform: translateX(4px);
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
    }
    
    [dir="rtl"] #mobile-menu a:hover {
        transform: translateX(-4px);
    }
    
    /* Touch-friendly buttons */
    .btn-primary,
    .btn-secondary {
        min-height: 44px;
        min-width: 120px;
    }
    
    .lang-btn {
        min-height: 36px;
        min-width: 40px;
    }
}

@media (max-width: 640px) {
    .section-title-modern {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .service-icon {
        font-size: 50px;
    }
    
    .service-feature-item {
        font-size: 0.9rem;
        gap: 10px;
    }
    
    .feature-check {
        font-size: 16px;
        min-width: 20px;
    }
    
    .client-image-card {
        width: 140px;
        height: 140px;
    }
    
    .brand-logo-3d {
        padding: 20px 12px;
        font-size: 11px;
    }
    
    .brand-logo-img {
        max-height: 30px;
    }
    
    .brands-container {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 12px;
    }
    
    .glass-card {
        padding: 1.5rem 1rem;
    }
    
    .glass-card p {
        font-size: 1rem;
    }
    
    .logo-hero img {
        height: 6rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 24px;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .hero-bg p {
        font-size: 1.25rem;
    }
    
    footer .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .nav-link {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .section-title-modern {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 25px 15px;
    }
    
    .service-card h3 {
        font-size: 1.5rem;
    }
    
    .service-card p {
        font-size: 0.95rem;
    }
    
    .service-icon {
        font-size: 45px;
    }
    
    .service-feature-item {
        font-size: 0.85rem;
        gap: 8px;
    }
    
    .client-image-card {
        width: 120px;
        height: 120px;
    }
    
    .brand-logo-3d {
        padding: 18px 10px;
        font-size: 10px;
    }
    
    .brand-logo-img {
        max-height: 25px;
    }
    
    .brands-container {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .logo-hero img {
        height: 5rem;
    }
    
    nav img {
        height: 2rem;
    }
    
    .language-switcher {
        gap: 0.25rem;
    }
    
    .lang-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        min-width: 35px;
    }
    
    .glass-card {
        padding: 1.25rem 0.875rem;
    }
    
    .glass-card p {
        font-size: 0.95rem;
    }
    
    footer h3 {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}
