:root {
    --primary: #1a1f71;
    --accent: #6a0dad;
    --secondary: #b0b0b0;
    --highlight: #2ecc71;
    --dark-bg: #0f1120;
    --card-bg: #161a36;
    --white: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --background: #0f1120;
    --card-background: #161a36;
}

[data-theme="light"] {
    --primary: #1a1f71;
    --accent: #6a0dad;
    --secondary: #7b7b7b;
    --highlight: #2ecc71;
    --background: #f8f9fa;
    --card-background: #ffffff;
    --text-primary: #1a1f71;
    --text-secondary: #4a4a4a;
    --dark-bg: #f8f9fa;
    --card-bg: #ffffff;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: rgba(15, 17, 32, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(106, 13, 173, 0.2);
}

[data-theme="light"] header {
    background-color: rgba(248, 249, 250, 0.95);
    border-bottom: 1px solid rgba(26, 31, 113, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--highlight);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--highlight));
    transition: width 0.3s ease;
}

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

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-left: 20px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(30deg);
    color: var(--accent);
}

.cta-button {
    padding: 10px 25px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(106, 13, 173, 0.4);
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary) 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .hero {
    background: linear-gradient(135deg, #e8ecff 0%, var(--primary) 100%);
}

.hero-content {
    max-width: 650px;
    z-index: 2;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    background: linear-gradient(135deg, var(--highlight) 0%, #25a25a 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255,255,255,0.2), rgba(255,255,255,0));
    transform: rotate(30deg);
    transition: all 0.5s ease;
}

.btn:hover::after {
    transform: rotate(30deg) translate(10%, 10%);
}

/* Stats Section */
.stats {
    background: linear-gradient(to right, var(--primary), var(--accent));
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--white) 0%, var(--highlight) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-text {
    color: var(--white);
    font-size: 1.1rem;
}

/* Animated nodes background */
.nodes-background {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    opacity: 0.6;
}

.node {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 3s infinite;
}

.node:nth-child(1) {
    top: 20%;
    left: 10%;
    background-color: var(--accent);
    animation-delay: 0s;
}

.node:nth-child(2) {
    top: 60%;
    left: 15%;
    background-color: var(--highlight);
    animation-delay: 0.5s;
}

.node:nth-child(3) {
    top: 40%;
    left: 25%;
    background-color: var(--primary);
    animation-delay: 1s;
}

.node:nth-child(4) {
    top: 70%;
    left: 35%;
    background-color: var(--accent);
    animation-delay: 1.5s;
}

.node:nth-child(5) {
    top: 30%;
    left: 45%;
    background-color: var(--highlight);
    animation-delay: 2s;
}

.node:nth-child(6) {
    top: 65%;
    left: 60%;
    background-color: var(--primary);
    animation-delay: 2.5s;
}

.node:nth-child(7) {
    top: 25%;
    left: 75%;
    background-color: var(--accent);
    animation-delay: 3s;
}

.connecting-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform-origin: left;
    animation: flow 8s infinite linear;
    opacity: 0.5;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.7; }
    50% { transform: scale(1.4); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.7; }
}

@keyframes flow {
    0% { transform: scaleX(0); opacity: 0; }
    50% { transform: scaleX(1); opacity: 0.5; }
    100% { transform: scaleX(0); opacity: 0; transform-origin: right; }
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.8rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* About Us */
.about {
    background-color: var(--background);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Services */
.services {
    background: linear-gradient(to bottom, var(--dark-bg) 0%, var(--primary) 100%);
}

[data-theme="light"] .services {
    background: linear-gradient(to bottom, #e8ecff 0%, var(--primary) 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid rgba(106, 13, 173, 0.1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent), var(--highlight));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(106, 13, 173, 0.25);
}

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

.service-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    color: var(--highlight);
}

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

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Case Studies Section */
.case-studies {
    background-color: var(--background);
}

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

.case-study-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.case-study-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(106, 13, 173, 0.25);
}

.case-study-img {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.case-study-content {
    padding: 25px;
}

.case-study-content h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.case-study-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.case-study-meta {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(106, 13, 173, 0.2);
    padding-top: 15px;
    margin-top: 20px;
}

.case-study-meta div {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.case-study-meta i {
    margin-right: 8px;
    color: var(--accent);
}

/* Why Choose Us */
.why-us {
    background-color: var(--background);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--card-bg);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(106, 13, 173, 0.1);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(106, 13, 173, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.feature h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.feature p {
    color: var(--text-secondary);
}

/* Client Logos */
.clients {
    background: linear-gradient(to right, var(--primary), var(--accent));
    padding: 60px 0;
}

.client-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.client-logo {
    opacity: 0.7;
    transition: all 0.3s ease;
    filter: brightness(0) invert(1);
    max-width: 120px;
}

.client-logo:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Automation Flow */
.automation-flow {
    background: linear-gradient(to bottom, var(--primary) 0%, var(--dark-bg) 100%);
    text-align: center;
}

[data-theme="light"] .automation-flow {
    background: linear-gradient(to bottom, var(--primary) 0%, #e8ecff 100%);
}

.flow-diagram {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    height: 250px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step {
    width: 140px;
    height: 140px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.step::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), var(--accent), var(--highlight));
    border-radius: 50%;
    z-index: -1;
    animation: rotateGradient 3s linear infinite;
}

.step:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(106, 13, 173, 0.3);
}

.step strong {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.step i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--highlight);
}

.connector {
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    position: absolute;
    top: 50%;
    animation: flow 3s infinite ease-in-out;
    opacity: 0.7;
}

@keyframes rotateGradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Testimonials */
.testimonials {
    background-color: var(--background);
}

.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    height: 280px;
}

.testimonial {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.testimonial.active {
    opacity: 1;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 25px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.testimonial-author {
    font-weight: 600;
    color: var(--text-primary);
}

.testimonial-role {
    color: var(--accent);
    font-size: 0.9rem;
}

/* Contact */
.contact {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark-bg) 100%);
}

[data-theme="light"] .contact {
    background: linear-gradient(135deg, var(--primary) 0%, #e8ecff 100%);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: var(--card-bg);
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.contact-email {
    font-size: 1.5rem;
    margin: 30px 0;
    color: var(--text-primary);
}

.email-link {
    color: var(--highlight);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    background: rgba(46, 204, 113, 0.1);
}

.email-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
    background: rgba(46, 204, 113, 0.2);
}

/* Footer */
footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 60px 0 30px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 25px;
}

.footer-logo span {
    color: var(--highlight);
}

.footer-links {
    display: flex;
    list-style: none;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links li {
    margin: 0 15px 10px;
}

.footer-links a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--highlight);
}

.social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--white);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    transform: translateY(-3px);
}

.copyright {
    color: var(--secondary);
    margin-top: 20px;
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(106, 13, 173, 0.4);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .flow-diagram {
        flex-wrap: wrap;
        height: auto;
        justify-content: center;
        gap: 40px;
    }
    
    .connector {
        display: none;
    }
    
    .case-studies-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 20px;
        z-index: 100;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 10px 0;
    }
    
    .hamburger {
        display: block;
        color: var(--text-primary);
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 140px 0 80px;
    }
    
    .hero h1 {
        font-size: 2.3rem;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .services-grid,
    .features,
    .case-studies-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-slider {
        height: 350px;
    }
    
    .contact-content {
        padding: 30px;
    }
    
    .step {
        width: 120px;
        height: 120px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .client-logos {
        gap: 20px;
    }
    
    .client-logo {
        max-width: 80px;
    }
    
    .contact-email {
        font-size: 1.2rem;
    }
}