/* Global CSS Variables */
:root {
    --primary-color: #0f172a;
    --secondary-color: #3b82f6;
    --accent-color: #10b981;
    --text-color: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --background-light: #f8fafc;
    --background-dark: #0f172a;
    --background-white: #ffffff;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-light: rgba(15, 23, 42, 0.05);
    --shadow-medium: rgba(15, 23, 42, 0.1);
    --shadow-heavy: rgba(15, 23, 42, 0.15);
    --gradient-primary: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-bright: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    overflow-x: hidden;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.011em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 4rem;
    color: var(--text-color);
    letter-spacing: -0.025em;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

/* Professional Typography Classes */
.text-lg { font-size: 1.125rem; line-height: 1.75; }
.text-xl { font-size: 1.25rem; line-height: 1.75; }
.text-2xl { font-size: 1.5rem; line-height: 1.6; }
.text-3xl { font-size: 1.875rem; line-height: 1.5; }
.text-4xl { font-size: 2.25rem; line-height: 1.4; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }

/* Section Dividers */
.section-divider {
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
    margin: 4rem 0;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced Container with subtle borders */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
}

/* Colorful accent elements */
.accent-dot {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: inline-block;
    margin: 0 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.accent-line {
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 1px;
    margin: 1rem 0;
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.hero-content,
.about-content,
.services-grid,
.contact-content {
    animation: fadeInUp 0.8s ease-out;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.75rem;
    }
}

/* Image Optimization and Quality - Anti-Pixelation */
img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
    image-rendering: -moz-crisp-edges;
    image-rendering: -o-crisp-edges;
    image-rendering: pixelated;
    image-rendering: auto;
    object-fit: cover;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.gallery-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
    image-rendering: high-quality !important;
    image-rendering: auto !important;
}



.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* Ensure high-quality image rendering for all formats */
img[src*=".jpg"], img[src*=".jpeg"], img[src*=".png"], img[src*=".avif"], img[src*=".webp"], img[src*=".svg"] {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
    image-rendering: -moz-crisp-edges;
    image-rendering: -o-crisp-edges;
    image-rendering: auto;
}

/* Prevent pixelation on high-DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        image-rendering: high-quality;
        image-rendering: auto;
    }
}

/* Force high quality for specific image classes */
.gallery-image,
.service-image,
.hero-image,
.about-image img,
.contact-image {
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
    image-rendering: high-quality !important;
    image-rendering: auto !important;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
    transition: all 0.3s ease;
}

/* Prevent pixelation during hover and animations */
.gallery-image:hover,
.service-image:hover,
.hero-image:hover,
.about-image img:hover,
.contact-image:hover {
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
    image-rendering: high-quality !important;
    image-rendering: auto !important;
    transform: translateZ(0) scale(1.05);
}
