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

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #06b6d4;
    --secondary-light: #22d3ee;
    --accent-color: #8b5cf6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-accent: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-color: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #93c5fd;
    --secondary-color: #22d3ee;
    --secondary-light: #67e8f9;
    --accent-color: #a78bfa;
    --text-dark: #f9fafb;
    --text-light: #d1d5db;
    --text-lighter: #9ca3af;
    --bg-light: #111827;
    --bg-white: #1f2937;
    --border-color: #374151;
    --success-color: #34d399;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Header Styles */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

body.dark-mode .header {
    background-color: rgba(31, 41, 55, 0.95);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo .logo-text {
    font-size: 1.75rem;
    color: var(--primary-color);
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

.nav a:hover {
    color: var(--primary-color);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle:hover {
        transform: scale(1.05);
    }
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    display: block;
    line-height: 1;
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    color: white;
    padding: 8rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('background.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.3;
    mix-blend-mode: overlay;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--bg-white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out 0.4s both;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--gradient-primary);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    color: white;
}

body.dark-mode .cta-button {
    background: var(--gradient-primary);
    color: white;
}

body.dark-mode .cta-button:hover {
    background: var(--bg-white);
    color: var(--primary-color);
}

/* Services Section */
.services {
    padding: 6rem 0;
    background-color: var(--bg-light);
    transition: background-color 0.3s ease;
}

.section-title {
    text-align: center;
    font-size: 2.75rem;
    margin-bottom: 3.5rem;
    color: var(--text-dark);
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

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

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.service-list {
    list-style: none;
    padding-left: 0;
}

.service-list li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.service-list li::before {
    content: "✓";
    color: var(--success-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: var(--bg-white);
    transition: background-color 0.3s ease;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature:hover {
    background-color: var(--bg-light);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    font-weight: bold;
}

.feature h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.feature p {
    color: var(--text-light);
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="2" cy="2" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.5;
}

.contact .section-title {
    color: white;
}

.contact .section-title::after {
    background: white;
}

.contact-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contact-intro {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.contact-location {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.95;
    font-weight: 600;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-method {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.contact-method:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-method h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.contact-method p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.contact-link {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    font-size: 1.1rem;
    transition: opacity 0.3s ease;
    display: inline-block;
}

.contact-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
    transition: background-color 0.3s ease;
}

body.dark-mode .footer {
    background-color: #0f172a;
}

.footer p {
    opacity: 0.8;
}

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

/* Smooth transitions for all interactive elements */
a, button {
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.service-card, .feature, .contact-method {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Accessibility: Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .contact-method {
        backdrop-filter: none;
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    .service-icon {
        animation: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding: 5rem 0;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .contact-methods {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .service-card {
        padding: 1.5rem;
    }
}
