/* Theme Variables */
:root {
    /* Common variables */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 0; /* Sharp edges for all elements */
    --font-primary: 'Space Grotesk', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Dark Theme (Default) */
.theme-dark {
    /* Colors */
    --primary-color: #3a86ff;
    --secondary-color: #00b4d8;
    --tertiary-color: #8338ec;
    --neon-green: #06d6a0;
    --neon-red: #ef476f;
    
    /* Backgrounds */
    --background: #0f172a;
    --surface: #131e2f; /* Darker with more blue for better text contrast */
    --surface-alt: #1f2937; /* Darker with better contrast */
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    
    /* Gradients */
    --gradient-primary: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(120deg, var(--tertiary-color), var(--primary-color));
    --gradient-brain: linear-gradient(120deg, var(--neon-green), var(--secondary-color), var(--tertiary-color));
}

/* Light Theme */
.theme-light {
    /* Colors */
    --primary-color: #2563eb;
    --secondary-color: #0891b2;
    --tertiary-color: #7c3aed;
    --neon-green: #059669;
    --neon-red: #dc2626;
    
    /* Backgrounds */
    --background: #f8fafc;
    --surface: #ffffff; /* Pure white for cleaner look and better text contrast */
    --surface-alt: #f0f7ff; /* Very light blue tint for better text pop */
    
    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-tertiary: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(120deg, var(--tertiary-color), var(--primary-color));
    --gradient-brain: linear-gradient(120deg, var(--neon-green), var(--secondary-color), var(--tertiary-color));
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--surface-alt);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999; /* Extremely high z-index to ensure it's above everything */
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: var(--transition);
    border-radius: 0; /* Explicitly set to 0 for rectangular shape */
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .theme-toggle {
        width: 60px;
        height: 60px;
        bottom: 25px;
        right: 25px;
        font-size: 1.6rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        opacity: 1;
        animation: pulse 2s infinite; /* Add subtle animation to draw attention */
    }
    
    /* Increase tap target size */
    .theme-toggle::before {
        content: '';
        position: absolute;
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
        z-index: -1;
    }
}

/* Subtle pulse animation for the theme toggle button */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(58, 134, 255, 0.5);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
}

/* Active state for the theme toggle button */
.theme-active {
    transform: scale(1.05);
}

/* Animations for theme transition */
body {
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Adjust button styles for both themes */
.btn {
    border-radius: 0 !important; /* Force rectangular buttons */
}

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

.btn.secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-primary);
}

/* Adjust card styles for both themes */
.service-card,
.approach-step,
.case-study {
    border-radius: 0 !important; /* Force rectangular cards */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Adjust form elements for both themes */
input, select, textarea {
    border-radius: 0 !important; /* Force rectangular form elements */
}

/* Adjust carousel navigation for both themes */
.carousel-prev, .carousel-next {
    border-radius: 0 !important; /* Force rectangular navigation buttons */
}

/* Adjust step number for both themes */
.step-number {
    border-radius: 0 !important; /* Force rectangular step numbers */
}
