/* Design System 2.0 - CliqAtlas */
:root {
    /* Core Brand Colors - Enhanced for depth */
    --royal-indigo: #4B3F72;
    --royal-indigo-light: #6B5F92;
    --royal-indigo-dark: #2B1F52;
    --sky-azure: #4DA1FF;
    --sky-azure-light: #7DB8FF;
    --sky-azure-dark: #2D81DF;
    --sahara-sand: #D6BA8C;
    --sahara-sand-light: #E6CAAC;
    --sahara-sand-dark: #B69A6C;
    --deep-charcoal: #1F1F1F;
    --ivory-white: #FDFDFD;
    
    /* Semantic Colors */
    --primary: var(--royal-indigo);
    --secondary: var(--sky-azure);
    --accent: var(--sahara-sand);
    --background: var(--ivory-white);
    --surface: #FFFFFF;
    --text-primary: var(--deep-charcoal);
    --text-secondary: #4F4F4F;
    --text-tertiary: #717171;
    
    /* Typography */
    --font-primary: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'DM Serif Display', Georgia, serif;
    --font-mono: 'SF Mono', SFMono-Regular, ui-monospace, monospace;
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Elevation/Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --background: var(--deep-charcoal);
    --surface: #2A2A2A;
    --text-primary: var(--ivory-white);
    --text-secondary: #E0E0E0;
    --text-tertiary: #A0A0A0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Base Styles */
body {
    font-family: var(--font-primary);
    background-color: var(--background);
    color: var(--text-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale */
h1, .h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; }
h2, .h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.2; }
h3, .h3 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.3; }
h4, .h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.4; }

/* Navigation */
.navbar {
    background-color: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--text-primary), 0.1);
    padding: var(--space-md) 0;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-primary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.navbar-nav .nav-link:hover {
    color: var(--secondary);
    background-color: rgba(var(--secondary), 0.1);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: var(--space-3xl) 0;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: 
        linear-gradient(45deg, var(--royal-indigo), var(--sky-azure)),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M50 50v-10h-5v10H35v5h10v10h5V55h10v-5H50zM35 35V25h-5v10H20v5h10v10h5V40h10v-5H35z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
    animation: patternFloat 20s linear infinite;
}

@keyframes patternFloat {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Service Cards */
.service-card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--royal-indigo-light), var(--sky-azure-light));
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 0;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-card:hover::before {
    opacity: 0.05;
}

.service-card i {
    font-size: 2.5rem;
    background: linear-gradient(45deg, var(--royal-indigo), var(--sky-azure));
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
}

/* Buttons */
.btn {
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-xl);
    font-weight: 500;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--royal-indigo), var(--sky-azure));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn-primary {
    background: linear-gradient(45deg, var(--royal-indigo), var(--sky-azure));
    border: none;
    color: var(--ivory-white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(77, 161, 255, 0.3);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--royal-indigo);
    color: var(--royal-indigo);
}

.btn-outline-primary:hover {
    background: var(--royal-indigo);
    color: var(--ivory-white);
}

/* Form Elements */
.form-control {
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border: 1px solid rgba(var(--text-primary), 0.1);
    background-color: var(--surface);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(var(--secondary), 0.25);
    border-color: var(--secondary);
}

/* Loading Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid var(--secondary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Footer */
.footer {
    background-color: var(--surface);
    padding: var(--space-2xl) 0;
    border-top: 1px solid rgba(var(--text-primary), 0.1);
}

.social-links a {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-left: var(--space-md);
    transition: all var(--transition-base);
    opacity: 0.8;
}

.social-links a:hover {
    color: var(--secondary);
    opacity: 1;
    transform: translateY(-2px);
}

/* Page Header Styles */
.page-header {
    background: linear-gradient(135deg, var(--royal-indigo), var(--sky-azure));
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

/* Project Cards */
.project-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Blog Cards */
.blog-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Performance Optimizations */
.lazy-load {
    opacity: 0;
    transition: opacity var(--transition-base);
}

.lazy-load.loaded {
    opacity: 1;
}

/* Reduce HTTP requests */
.icon-sprite {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJMMTMuMDkgOC4yNkwyMCA5TDEzLjA5IDE1Ljc0TDEyIDIyTDEwLjkxIDE1Ljc0TDQgOUwxMC45MSA4LjI2TDEyIDJaIiBmaWxsPSJjdXJyZW50Q29sb3IiLz4KPC9zdmc+');
    background-repeat: no-repeat;
    background-size: contain;
}

/* Error page styles */
.error-404 {
    padding: var(--space-3xl) 0;
}

.error-404 .display-1 {
    font-size: clamp(4rem, 10vw, 8rem);
    background: linear-gradient(45deg, var(--royal-indigo), var(--sky-azure));
    -webkit-background-clip: text;
    color: transparent;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .social-links {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

.img-responsive {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Preload critical resources */
.preload-font {
    font-display: swap;
}adow: var(--shadow-xl);
}

/* Messages Container */
.messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.messages-container .alert {
    margin-bottom: 10px;
    box-shadow: var(--shadow-lg);
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid rgba(var(--text-primary), 0.2);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Pagination */
.pagination .page-link {
    border-radius: var(--radius-md);
    margin: 0 2px;
    border: 1px solid rgba(var(--text-primary), 0.1);
    color: var(--text-primary);
}

.pagination .page-item.active .page-link {
    background: var(--secondary);
    border-color: var(--secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: var(--space-sm) 0;
    }
    
    .hero-section {
        text-align: center;
        padding: var(--space-2xl) 0;
    }
    
    .service-card {
        margin-bottom: var(--space-md);
    }
    
    .cta-buttons .btn {
        width: 100%;
        margin-bottom: var(--space-sm);
    }
    
    .messages-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .page-header {
        padding: var(--space-xl) 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(45deg, var(--royal-indigo), var(--sky-azure));
    -webkit-background-clip: text;
    color: transparent;
}

/* Conversion-Focused Elements */
.trust-badge .badge {
    font-size: 0.9rem;
    border-radius: var(--radius-full);
    animation: fadeInUp 0.6s ease-out;
}

.value-props {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(77, 161, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(77, 161, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(77, 161, 255, 0); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-card {
    position: absolute;
    animation: float 3s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.social-proof {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.client-logos .badge {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    transform: translateY(100px);
    transition: transform 0.3s ease;
}

.sticky-cta.show {
    transform: translateY(0);
}

/* Urgency Elements */
.urgency-banner {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    padding: 8px 0;
    text-align: center;
    font-size: 0.9rem;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Enhanced Service Cards */
.service-card-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.service-card-enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.service-card-enhanced:hover::after {
    left: 100%;
}

/* Testimonial Carousel */
.testimonial-carousel {
    position: relative;
    overflow: hidden;
}

.testimonial-slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.testimonial-slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Progress Indicators */
.progress-indicator {
    height: 4px;
    background: var(--sky-azure);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Testimonials Section */
.testimonials-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.testimonial-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    height: 100%;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--sky-azure);
    opacity: 0.3;
    font-family: Georgia, serif;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.quote-icon {
    font-size: 2rem;
    color: var(--sky-azure);
    opacity: 0.7;
    margin-bottom: var(--space-md);
}

/* Trust Indicators */
.trust-indicators {
    margin-top: var(--space-2xl);
}

.trust-item {
    padding: var(--space-lg);
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.trust-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Final CTA Section */
.final-cta-section {
    background: var(--background);
}

.cta-card {
    background: linear-gradient(135deg, var(--royal-indigo), var(--sky-azure));
    position: relative;
    overflow: hidden;
}

.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
    animation: patternFloat 20s linear infinite;
}

.urgency-element {
    animation: pulse 2s infinite;
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .floating-elements {
        display: none;
    }
    
    .sticky-cta {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .value-props {
        font-size: 0.9rem;
    }
    
    .social-proof {
        justify-content: center;
        text-align: center;
    }
    
    .testimonial-card {
        margin-bottom: var(--space-lg);
    }
    
    .cta-card {
        padding: var(--space-xl) var(--space-lg) !important;
    }
    
    .trust-indicators .row {
        gap: var(--space-sm);
    }
}



.bg-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--sky-azure);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .theme-toggle {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}