/* Design System & Variables */
:root {
    /* Color Palette */
    --primary-dark: #1E1B2E;
    --primary-purple: #4d0ba9;
    --primary-light-purple: #7d3ff8;
    --secondary-white: #f4f4f4;
    --secondary-cyan: #00D4FF;
    --accent-lime: #e3f930;

    /* Typography */
    --font-heading: 'Orbitron', sans-serif;
    /* Fallback for Neuropolitical */
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Transitions */
    --transition-speed: 0.3s;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--secondary-white);
    color: var(--primary-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    margin-bottom: var(--spacing-md);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-purple);
    color: var(--accent-lime);
}

.btn-primary:hover {
    background-color: var(--primary-light-purple);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(125, 63, 248, 0.3);
}

.btn-accent {
    background-color: var(--accent-lime);
    color: var(--primary-dark);
}

.btn-accent:hover {
    background-color: #d4e820;
    transform: translateY(-2px);
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

.page-title-section {
    background-color: var(--primary-dark);
    color: white;
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.page-title-section h1 {
    color: var(--primary-light-purple);
}

/* Header & Navigation */
header {
    background-color: var(--primary-dark);
    color: white;
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-links a {
    color: white;
    font-weight: 500;
}

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

/* Ensure button in nav has correct text color override */
.nav-links .btn {
    color: var(--primary-dark);
}

.nav-links .btn:hover {
    color: var(--primary-dark);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Mobile Menu Active State */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--primary-dark);
    padding: var(--spacing-md);
    border-top: 1px solid #333;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Full Width Hero Slideshow */
.hero-container {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
    background-color: var(--primary-dark);
}

.hero-slideshow {
    display: none;
    /* Ensure slideshow is hidden/removed */
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    /* Dark overlay for text readability */
}

.hero-text-box {
    max-width: 600px;
    color: white;
}

.hero-text-box h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-text-box p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    color: #f0f0f0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, var(--secondary-white) 0%, #e0e0e0 100%);
    min-height: 80vh;
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    padding-right: var(--spacing-lg);
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(to right, var(--primary-purple), var(--primary-light-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    color: #555;
}

.hero-image {
    flex: 1;
    position: relative;
    z-index: 1;
    /* Remove transform effects for slider stability */
}

/* Image Comparison Slider */
.img-comp-container {
    position: relative;
    height: 400px;
    /* Adjust based on image aspect ratio */
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.img-comp-img {
    position: absolute;
    width: auto;
    height: auto;
    overflow: hidden;
}

.img-comp-img img {
    display: block;
    vertical-align: middle;
    width: 100%;
    /* Ensure images scale */
    height: 100%;
    object-fit: cover;
}

.img-comp-slider {
    position: absolute;
    z-index: 20;
    /* Increased z-index */
    cursor: ew-resize;
    width: 40px;
    height: 40px;
    background-color: var(--accent-lime);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    touch-action: none;
    /* Prevent scrolling while dragging */
}

.img-comp-slider::before {
    content: '<>';
    color: var(--primary-dark);
    font-weight: bold;
    font-family: monospace;
}

/* Features/Services Preview */
.services-preview {
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-purple);
}

/* Expertise Grid (Homepage) */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

@media (max-width: 1024px) {
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .expertise-grid {
        grid-template-columns: 1fr;
    }
}

/* Homepage Service Panels */
.expertise-grid .service-panel {
    display: block;
    /* Override display: none from tabs */
    height: 100%;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.expertise-grid .service-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-top-color: var(--secondary-cyan);
}

/* Services Tabs */
.services-tabs-container {
    width: 100%;
}

.services-tabs {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.tab-btn {
    background-color: transparent;
    border: 2px solid var(--primary-purple);
    color: var(--primary-purple);
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.tab-btn:hover {
    background-color: rgba(77, 11, 169, 0.1);
    transform: translateY(-2px);
}

.tab-btn.active {
    background-color: var(--primary-purple);
    color: var(--accent-lime);
    box-shadow: 0 4px 10px rgba(77, 11, 169, 0.3);
}

.service-panel {
    display: none;
    background: var(--secondary-white);
    padding: var(--spacing-lg);
    border-radius: 8px;
    border-top: 4px solid var(--primary-purple);
    animation: fadeIn 0.5s ease;
}

.service-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-panel h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid #eee;
    padding-bottom: var(--spacing-sm);
    color: var(--primary-purple);
}

.service-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

@media (max-width: 768px) {
    .service-content {
        grid-template-columns: 1fr;
        /* Stack columns on mobile */
    }
}

/* About Section */
.about {
    background-color: var(--primary-dark);
    color: white;
}

.about h2 {
    color: var(--secondary-cyan);
}

.about p {
    color: #ccc;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

/* Testimonials */
.testimonials {
    background-color: var(--secondary-white);
    text-align: center;
}

.testimonial-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 0 auto;
    font-style: italic;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-light-purple));
    color: white;
    text-align: center;
}

.cta-section h2 {
    color: var(--accent-lime);
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: #888;
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-top: 1px solid #333;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: var(--spacing-lg);
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: var(--spacing-lg);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        /* Hidden by default on mobile */
    }

    .hamburger {
        display: flex;
        /* Show hamburger on mobile */
    }
}