:root {
    /* Modern Palette */
    --primary: #0f172a; /* Slate 900 - Deep, rich background */
    --primary-light: #1e293b; /* Slate 800 */
    --primary-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    
    --accent: #3b82f6; /* Blue 500 - Vibrant Tech Blue */
    --accent-dark: #2563eb;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --accent-glow: 0 0 20px rgba(59, 130, 246, 0.5);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-body: #ffffff;
    --bg-light: #f8fafc; /* Slate 50 */
    --bg-surface: #ffffff;
    
    --text-main: #1e293b;
    --text-light: #64748b; /* Slate 500 */
    --text-white: #ffffff;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 { font-size: 4rem; font-weight: 800; }
h2 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.75rem; }

p { color: var(--text-light); margin-bottom: 1rem; font-size: 1.05rem; }

a { text-decoration: none; color: inherit; transition: var(--transition); }

/* Utility */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding { padding: 60px 0; } /* Reduced from 100px */
.text-center { text-align: center; }

/* Modern Gradient Text */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Reveal Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-3px);
}

/* Header & Nav */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    height: 80px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-links { display: flex; gap: 40px; }

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
    font-family: var(--font-heading);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--accent-gradient);
    transition: width 0.3s;
    border-radius: 2px;
}

.nav-links a:hover::after { width: 100%; }

/* Mobile Menu */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.8) 100%), url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2070&auto=format&fit=crop'); /* Temporary placeholder until local image is fixed */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* Hero Particles/Decoration */
.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 40%),
                radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.1), transparent 40%);
    pointer-events: none;
}

.hero-content {
    width: 100%;
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    color: #cbd5e1; /* Slate 300 */
    font-size: 1.25rem;
    margin: 0 auto 3rem;
    max-width: 700px;
    line-height: 1.7;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

/* Hover Gradient Border Effect */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: #eff6ff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: var(--transition);
}

.service-icon i {
    font-size: 1.5rem;
    color: var(--accent);
}

.service-card:hover .service-icon {
    background: var(--accent-gradient);
    transform: rotate(3deg);
}

.service-card:hover .service-icon i {
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Projects Section */
.projects-header {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 20px;
}

.projects-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 4px;
    background: var(--accent-gradient);
    border-radius: 4px;
}

.project-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px; /* Reduced from 50px */
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border: 1px solid #e2e8f0;
    background: white;
    color: var(--text-light);
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #f1f5f9;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    height: 250px;
    background: #f1f5f9;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.project-image span {
    font-weight: 600;
    color: var(--text-light);
    z-index: 2;
    padding: 0 20px;
    text-align: center;
    position: relative;
}

/* Image overlay effect */
.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-image::after {
    opacity: 1;
}

.project-content { padding: 24px; }

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-tags span {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Clients & Partners (Modern Scroll) */
.clients-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding: 30px 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    justify-content: flex-start;
}

/* Auto-scroll animation container */
.scroll-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 20px 0; /* Reduced from 40px */
}

.scroll-track {
    display: inline-flex;
    gap: 40px;
    animation: scroll 30s linear infinite;
}

/* Pause animation on hover */
.scroll-container:hover .scroll-track {
    animation-play-state: paused;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Move half width since we duplicate content */
}

/* Ensure items are centered if they don't overflow */
@media (min-width: 1024px) {
    .clients-wrapper {
        justify-content: center;
        mask-image: none;
    }
}

.client-item {
    flex: 0 0 auto;
    width: 180px;
    text-align: center;
    transition: var(--transition);
}

/* Remove hover transform on item to avoid jitter during scroll, 
   or keep it if using the static grid layout */
.client-item:hover { transform: translateY(-5px); }

.client-logo-box {
    width: 100%;
    height: 140px; /* Larger */
    background: white;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 25px;
    position: relative;
    overflow: hidden;
}

/* Glow effect on hover */
.client-logo-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: var(--transition);
}

.client-logo-box:hover {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border-color: transparent;
    transform: translateY(-5px) scale(1.02);
    background: white; /* Ensure background stays white */
}

/* Add a colored border bottom on hover */
.client-logo-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.client-logo-box:hover::after {
    transform: scaleX(1);
}

.client-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* filter: grayscale(100%); */ /* Removed grayscale */
    opacity: 1; /* Changed from 0.5 */
    transition: all 0.4s ease;
    transform: scale(0.95); /* Slight scale down to allow pop */
}

.client-logo-box:hover img {
    /* filter: grayscale(0%); */ /* No change needed as it's already color */
    opacity: 1;
    transform: scale(1.05); /* Pop up on hover */
}

/* Contact Section */
.contact-section-bg {
    background: var(--bg-light);
    padding: 60px 0; /* Reduced from 100px */
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.contact-info {
    background: var(--primary);
    color: white;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

/* Decorative circle in contact info */
.contact-info::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.contact-info h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.info-item i {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: var(--accent);
}

.info-item h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.contact-form {
    padding: 60px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px; /* Added gap between fields */
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    background: #f8fafc;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Footer */
footer {
    background: var(--primary);
    color: #94a3b8;
    padding: 80px 0 30px;
    margin-top: 0; /* Ensure no gap if coming after contact */
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-family: var(--font-heading);
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li { margin-bottom: 12px; }

.footer-col ul li a {
    color: #94a3b8;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-gradient);
    transform: translateY(-3px);
}

.copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* Modals */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(15, 23, 42, 0.8); /* Dark slate overlay */
    backdrop-filter: blur(8px);
    overflow: auto; 
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    border: none;
    width: 90%; 
    max-width: 600px;
    border-radius: var(--radius-lg);
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s;
}

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

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    font-size: 1.2rem;
    line-height: 1;
}

.close-modal:hover {
    background: var(--danger);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active { display: flex; }
    
    .contact-grid { grid-template-columns: 1fr; }
    .contact-info, .contact-form { padding: 40px; }
    
    .hero h1 { font-size: 2.5rem; }
    
    /* Footer Fix for Mobile */
    .footer-grid {
        grid-template-columns: 1fr; /* Stack columns on mobile */
        gap: 30px;
    }
}