/* General Styles */
* {
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    padding-top: 160px; /* Space for fixed topbar (40px) + header (~120px) */
}

.font-cairo {
    font-family: 'Cairo', sans-serif;
}

/* Header Styles */
.sticky-header {
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background-color: rgb(255, 255, 255);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.sticky-header.scrolled {
    background-color: rgb(255, 255, 255);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-img {
    height: 80px;
    width: auto;
    transition: all 0.3s ease;
    filter: brightness(1.1) contrast(1.1);
    transform-origin: center;
    display: block;
    margin: auto 0;
}

.logo-img.logo-scrolled {
    height: 60px;
}

/* Navigation alignment fix */
.sticky-header nav {
    min-height: 80px;
    align-items: center !important;
}

.sticky-header.scrolled nav {
    min-height: 60px;
}

/* Navigation Link Styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #8B5CF6;
    transition: all 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

.nav-link.active {
    color: #8B5CF6 !important;
}

.nav-link.active::after {
    width: 100% !important;
    left: 0 !important;
}

/* Hero Section Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 1.5s ease-in-out 0.5s both;
}

/* Clients Carousel */
.clients-carousel-wrapper {
    overflow: hidden;
    padding: 20px 0;
    direction: ltr;
    position: relative;
}

.clients-carousel-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll-seamless 30s linear infinite;
    will-change: transform;
}

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

.clients-carousel-item {
    min-width: 220px;
    width: 220px;
    height: 140px;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(88, 42, 110, 0.08);
    border: 2px solid rgba(88, 42, 110, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.clients-carousel-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 24px rgba(88, 42, 110, 0.15);
    border-color: rgba(228, 35, 123, 0.2);
}

.clients-carousel-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@keyframes scroll-seamless {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-33.333%));
    }
}

/* Footer Social Icons */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
}

/* Typewriter Cursor Blink */
@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

/* Wireframe Animation */
@keyframes floatNode {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(10px, -10px);
    }
    50% {
        transform: translate(-5px, 10px);
    }
    75% {
        transform: translate(5px, 5px);
    }
}

.floating-node {
    animation: floatNode 8s ease-in-out infinite;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .logo-img {
        height: 80px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 140px; /* Reduced spacing for mobile */
    }

    .sticky-header {
        top: 32px;
    }

    .logo-img {
        height: 60px;
    }

    .logo-img.logo-scrolled {
        transform: scale(0.8);
    }
}
