/* Custom CSS for Cleanly Website */

/* Font Configuration */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Loading Screen Animation */
#loading-screen {
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Header Scroll Effect */
#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Navigation Link Animations */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #3B82F6;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Navigation Link Active State */
.nav-link.active {
    color: #3B82F6;
    font-weight: 600;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
    }
}

/* Button Animations */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

button.bg-blue-500 {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
    background-size: 200% 100%;
    transition: all 0.3s ease;
}

button.bg-blue-500:hover {
    background-position: right center;
    box-shadow: 0 8px 20px -5px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px) scale(1.02);
}

/* Hero Section Enhancements */
.hero-bg {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23e2e8f0" fill-opacity="0.1"><circle cx="30" cy="30" r="2"/></g></svg>') repeat;
    opacity: 0.5;
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Testimonial Cards */
.testimonial-card {
    transition: all 0.3s ease;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Demo Badge Animation */
.demo-badge {
    animation: pulse-glow-badge 3s ease-in-out infinite, float 3s ease-in-out infinite;
    max-width: calc(100vw - 2rem);
}

/* Mobile Menu Animation */
#mobile-menu.scale-y-100 {
    transform: scaleY(1);
}

#mobile-menu.scale-y-0 {
    transform: scaleY(0);
}

#mobile-menu.opacity-100 {
    opacity: 1;
}

#mobile-menu.opacity-0 {
    opacity: 0;
}

@keyframes pulse-glow-badge {
    0%, 100% {
        box-shadow: 0 0 20px rgba(147, 51, 234, 0.5), 0 0 40px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(147, 51, 234, 0.7), 0 0 60px rgba(59, 130, 246, 0.5);
    }
}

/* Back Button Animation */
.back-button {
    animation: bounce-gentle 2s ease-in-out infinite;
}

@keyframes bounce-gentle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.back-button:hover {
    animation: none;
}

/* Service Card Enhanced Animations */
.service-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Testimonial Card Slide Animation */
.testimonial-card {
    animation: slideInFromBottom 0.8s ease-out;
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section Parallax Effect */
.hero-bg {
    animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    }
    50% {
        background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    }
}

/* Button Hover Glow */
button, a[class*="button"] {
    transition: all 0.3s ease;
}

button:hover, a[class*="button"]:hover {
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* Pricing Cards */
.pricing-card {
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Button Enhancements */
.btn-primary {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    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 ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Form Enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.2);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #3B82F6, #10B981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Dividers */
.section-divider {
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #3B82F6, #10B981);
    border-radius: 2px;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.show {
    max-height: 400px;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #10B981);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Utility Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .service-card {
        margin-bottom: 1rem;
    }
    
    .testimonial-card {
        margin-bottom: 1rem;
    }
    
    .pricing-card {
        margin-bottom: 2rem;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #0f172a;
        color: #f1f5f9;
    }
    
    .dark-mode .service-card {
        background-color: #1e293b;
        border-color: #334155;
    }
    
    .dark-mode .testimonial-card {
        background-color: #1e293b;
        border-color: #334155;
    }
    
    .dark-mode .pricing-card {
        background-color: #1e293b;
        border-color: #334155;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .service-card,
    .testimonial-card,
    .pricing-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .service-card,
    .testimonial-card,
    .pricing-card {
        border: 2px solid #000;
    }
    
    button {
        border: 2px solid #000;
    }
}

/* Custom Properties for Theme Consistency */
:root {
    --primary-color: #3B82F6;
    --secondary-color: #10B981;
    --accent-color: #6EE7B7;
    --neutral-color: #F8FAFC;
    --text-color: #1E293B;
    --border-color: #E2E8F0;
    
    --shadow-sm: 0 1px 2px 0 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);
    
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
}

/* Performance Optimizations */
.service-card,
.testimonial-card,
.pricing-card {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

