:root {
    --ai-bg-dark: #0a0e17;
    --ai-bg-card: rgba(255, 255, 255, 0.05);
    --ai-primary: #6366f1;
    --ai-secondary: #a855f7;
    --ai-accent: #06b6d4;
    --ai-text-main: #f8fafc;
    --ai-text-muted: #94a3b8;
    --ai-gradient-main: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
    --ai-gradient-accent: linear-gradient(135deg, var(--ai-secondary), var(--ai-accent));
    --ai-glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --ai-font-family: 'Inter', sans-serif;
}

body.ai-dark-theme {
    background-color: var(--ai-bg-dark);
    color: var(--ai-text-main);
    font-family: var(--ai-font-family);
    overflow-x: hidden;
}

/* Typography Overrides */
.ai-dark-theme h1,
.ai-dark-theme h2,
.ai-dark-theme h3,
.ai-dark-theme h4,
.ai-dark-theme h5,
.ai-dark-theme h6 {
    color: var(--ai-text-main);
}

.ai-dark-theme p {
    color: var(--ai-text-muted);
}

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

/* Glassmorphism Cards */
.glass-card {
    background: var(--ai-bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--ai-glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Buttons */
.ai-button {
    background: var(--ai-gradient-main);
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    text-decoration: none;
    display: inline-block;
}

.ai-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
    color: white;
}

.ai-button-outline {
    background: transparent;
    border: 1px solid var(--ai-secondary);
    color: var(--ai-secondary);
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.ai-button-outline:hover {
    background: var(--ai-secondary);
    color: white;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

/* Navbar */
.ai-dark-theme .header.header-color-dark {
    background: #000000 !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-dark-theme .nav-link {
    color: var(--ai-text-main) !important;
}

.ai-dark-theme .nav-link:hover {
    color: var(--ai-accent) !important;
}

/* Hero Section */
.main-content-wrapper {
    position: relative;
    overflow: hidden;
}

.ai-hero-overlay {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.2), transparent 50%),
        radial-gradient(circle at center left, rgba(168, 85, 247, 0.15), transparent 50%),
        radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.15), transparent 50%);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Fade out the gradient before it hits the footer */
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

/* Feature Icons */
.ai-icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: var(--ai-accent);
    font-size: 1.5rem;
}

/* Owl Carousel Dots */
.ai-dark-theme .owl-theme .owl-dots .owl-dot span {
    background: rgba(255, 255, 255, 0.2) !important;
}

.ai-dark-theme .owl-theme .owl-dots .owl-dot.active span {
    background: var(--ai-accent) !important;
}

/* Footer */
.ai-dark-theme footer {
    background: #000000 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-dark-theme footer .bg-dark {
    background: #000000 !important;
}

.ai-dark-theme footer h3,
.ai-dark-theme footer h6 {
    color: var(--ai-text-main) !important;
}

.ai-dark-theme footer a {
    color: var(--ai-text-muted) !important;
}

.ai-dark-theme footer a:hover {
    color: var(--ai-accent) !important;
}

/* Client Logos - Gray by default, White on hover */
.client-box a img {
    opacity: 0.5;
    transition: all 0.3s ease;
    filter: brightness(0) invert(1);
    /* Makes logo pure white */
}

.client-box a:hover img {
    opacity: 1;
    filter: brightness(0) invert(1);
    /* Keeps it white but higher opacity = brighter */
}

/* Specific Section Overrides */
.ai-dark-theme .bg-white {
    background-color: transparent !important;
}

.ai-dark-theme .section-2xl {
    padding-top: 180px;
    padding-bottom: 120px;
}

/* ---- Hero Text Carousel: Fixed height so both slides match ---- */
.hero-text-carousel {
    min-height: 340px; /* Tall enough for Slide 1 (Strategy+Execution) at desktop font size */
}

/* Visibility for Hero Carousel dots */
.ai-dark-theme .hero-text-carousel .owl-dots .owl-dot span {
    background: rgba(168, 85, 247, 0.4) !important; /* Shade of purple for inactive dots */
    opacity: 1;
}

.ai-dark-theme .hero-text-carousel .owl-dots .owl-dot:hover span {
    background: rgba(168, 85, 247, 0.8) !important;
}

.ai-dark-theme .hero-text-carousel .owl-dots .owl-dot.active span {
    background: var(--ai-secondary) !important; /* Solid purple for active dot */
}

.hero-text-carousel .owl-stage-outer,
.hero-text-carousel .owl-stage,
.hero-text-carousel .owl-item {
    height: 100%;
}

.hero-slide {
    min-height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-bottom: 30px; /* room for dots below */
}

.hero-slide .ai-button {
    align-self: flex-start; /* prevent button from stretching full width in flex column */
}

@media (max-width: 991.98px) {
    .hero-text-carousel {
        min-height: 320px;
    }
    .hero-slide {
        min-height: 320px;
    }
}

@media (max-width: 575.98px) {
    .hero-text-carousel {
        min-height: 380px; /* On small screens the h1 wraps more, needs more height */
    }
    .hero-slide {
        min-height: 380px;
    }
}

/* Hero Animation */
.hero-canvas-container {
    position: relative;
    border-radius: 20px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.05), transparent 70%);
    overflow: hidden;
    margin-bottom: 20px;
}

/* Gradient Swoosh Divider - hide the default white pseudo-element when using inline SVG */
.section-divider-curve-bottom.gradient-swoosh:before {
    display: none !important;
}

.gradient-swoosh-svg {
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 110%;
    height: 60px;
    z-index: 1;
}

@media (max-width: 991.98px) {
    .gradient-swoosh-svg {
        height: 50px;
    }
}

#ai-hero-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Mobile Menu Overrides (Dark Theme)
   ========================================================================== */
@media (max-width: 991.98px) {
    .ai-dark-theme .header.header-color-black .header-menu,
    .ai-dark-theme .header .header-menu {
        background-color: #000000;
    }
    
    .ai-dark-theme .header .header-menu .nav .nav-item .nav-link,
    .ai-dark-theme .header .header-menu .nav .nav-item .nav-dropdown-toggle {
        color: var(--ai-text-main);
    }
    
    .ai-dark-theme .header .header-menu .nav .nav-item .nav-link:hover,
    .ai-dark-theme .header .header-menu .nav .nav-item .nav-link.active,
    .ai-dark-theme .header .header-menu .nav .nav-item .nav-dropdown-toggle:hover {
        color: var(--ai-accent);
    }
    
    .ai-dark-theme .header .header-menu .nav .nav-item .nav-dropdown {
        background-color: #000000;
    }
    
    .ai-dark-theme .header .header-menu .nav .nav-item .nav-dropdown-toggle.active {
        color: var(--ai-accent);
    }

    .ai-dark-theme .header .header-menu .nav .nav-item .nav-dropdown .nav-dropdown-item .nav-dropdown-link {
        color: var(--ai-text-main);
    }

    .ai-dark-theme .header .header-menu .nav .nav-item .nav-dropdown .nav-dropdown-item .nav-dropdown-link:hover,
    .ai-dark-theme .header .header-menu .nav .nav-item .nav-dropdown .nav-dropdown-item .nav-dropdown-link.active {
        color: var(--ai-accent);
        background-color: rgba(255, 255, 255, 0.05);
    }
}

/* ==========================================================================
   Light Theme Support
   ========================================================================== */

body.ai-light-theme {
    background-color: #f8fafc;
    color: #0f172a;
    font-family: var(--ai-font-family);
}

.ai-light-theme h1,
.ai-light-theme h2,
.ai-light-theme h3,
.ai-light-theme h4,
.ai-light-theme h5,
.ai-light-theme h6 {
    color: #0f172a;
}

.ai-light-theme p {
    color: #475569;
}

.ai-light-theme .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.ai-light-theme .glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

.ai-light-theme .header.header-color-light {
    background: #000000 !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-light-theme .header.header-color-light .nav-link {
    color: #ffffff !important;
}

.ai-light-theme .header.header-color-light .nav-link:hover {
    color: var(--ai-accent) !important;
}

.ai-light-theme .header.header-color-light .header-menu-extra i,
.ai-light-theme .header.header-color-light .header-toggle span {
    color: #ffffff !important;
}

.ai-light-theme .header.header-color-light .header-toggle span::before,
.ai-light-theme .header.header-color-light .header-toggle span::after {
    background-color: #ffffff !important;
}

.ai-light-theme .header.header-color-light .nav-dropdown {
    background-color: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-light-theme .header.header-color-light .nav-dropdown-link {
    color: #ffffff !important;
}

.ai-light-theme .header.header-color-light .nav-dropdown-link:hover {
    color: var(--ai-accent) !important;
}

.ai-light-theme .nav-link {
    color: #0f172a !important;
}

.ai-light-theme .nav-link:hover {
    color: var(--ai-primary) !important;
}

.ai-light-theme .ai-hero-overlay {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 50%),
        radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.1), transparent 50%);
}

.ai-light-theme .ai-icon-box {
    background: rgba(99, 102, 241, 0.1);
    color: var(--ai-primary);
}

.ai-light-theme footer {
    background: #f1f5f9 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.ai-light-theme footer h3,
.ai-light-theme footer h6 {
    color: #0f172a !important;
}

.ai-light-theme footer a {
    color: #64748b !important;
}

.ai-light-theme footer a:hover {
    color: var(--ai-primary) !important;
}

.ai-light-theme .client-box a img {
    opacity: 0.6;
    filter: grayscale(1);
    /* Logo visibility in light mode */
}

.ai-light-theme .client-box a:hover img {
    opacity: 1;
    filter: none;
    /* Show original colors on hover in light mode */
}

.ai-light-theme .hero-canvas-container {
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.03), transparent 70%);
}

.ai-light-theme .border-white-10 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}