/* CSS Custom Properties for Theme */
:root {
    --color-primary: #0EA5E9;
    --color-dark: #0B1220;
    --color-accent: #22C55E;
    
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, Arial, sans-serif;
    --border-radius: 1rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}

/* Light Mode Theme Variables */
:root[data-theme="light"] {
    --color-neutral-light: #F1F5F9;
    --color-neutral-dark: #0F172A;
    --color-text-light: #64748B;
    --color-text-dark: #1E293B;
    --color-white: #FFFFFF;
    --color-gray-50: #F8FAFC;
    --color-gray-100: #F1F5F9;
    --color-gray-200: #E2E8F0;
    --color-gray-300: #CBD5E1;
    --color-gray-600: #475569;
    --color-gray-800: #1E293B;
    --color-gray-900: #0F172A;
}

/* Dark Mode Theme Variables (Default) */
:root,
:root[data-theme="dark"] {
    --color-neutral-light: #0F172A;
    --color-neutral-dark: #F1F5F9;
    --color-text-light: #94A3B8;
    --color-text-dark: #E2E8F0;
    --color-white: #1E293B;
    --color-gray-50: #0F172A;
    --color-gray-100: #1E293B;
    --color-gray-200: #334155;
    --color-gray-300: #475569;
    --color-gray-600: #94A3B8;
    --color-gray-800: #E2E8F0;
    --color-gray-900: #F1F5F9;
}

/* Auto Dark Mode (only applies if no manual theme is set) */
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        --color-neutral-light: #F1F5F9;
        --color-neutral-dark: #0F172A;
        --color-text-light: #64748B;
        --color-text-dark: #1E293B;
        --color-white: #FFFFFF;
        --color-gray-50: #F8FAFC;
        --color-gray-100: #F1F5F9;
        --color-gray-200: #E2E8F0;
        --color-gray-300: #CBD5E1;
        --color-gray-600: #475569;
        --color-gray-800: #1E293B;
        --color-gray-900: #0F172A;
    }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-neutral-light);
    overflow-x: hidden;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    transition: var(--transition);
}

.skip-link:focus {
    top: 6px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-gray-200);
    z-index: 100;
    transition: var(--transition);
}

@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(15, 23, 42, 0.95);
        border-bottom-color: var(--color-gray-300);
    }
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo-img {
    height: 60px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #FFFFFF;
    font-weight: 700;
    transition: var(--transition);
    position: relative;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

[data-theme="dark"] .nav-links a {
    color: #E2E8F0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.nav-links a:hover,
.nav-links a:focus {
    opacity: 1;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-primary);
}

/* Navigation Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.25rem;
    cursor: pointer;
    color: #FFFFFF;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .theme-toggle {
    color: #E2E8F0;
}

.theme-toggle:hover,
.theme-toggle:focus {
    background: var(--color-gray-100);
    transform: scale(1.1);
}

.theme-icon {
    transition: var(--transition);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
    cursor: pointer;
    color: #FFFFFF;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .menu-toggle {
    color: #E2E8F0;
}

.menu-toggle:hover,
.menu-toggle:focus {
    background: var(--color-gray-100);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-controls {
        gap: 0.5rem;
    }

    .theme-toggle {
        font-size: 1.125rem;
        padding: 0.375rem;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-white);
        flex-direction: column;
        padding: 1rem 2rem;
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

/* Main Content */
.main {
    min-height: 100vh;
}

.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-text-dark);
}

.section-subtitle {
    font-size: 1.25rem;
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    text-align: center;
    padding: 8rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

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

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--color-white);
    color: var(--color-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--color-gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: white;
    color: var(--color-primary);
    transform: translateY(-2px);
}

.btn-large {
    font-size: 1.125rem;
    padding: 1.25rem 2.5rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

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

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Cards */
.card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--color-gray-200);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 3rem;
    height: 3rem;
    background: var(--color-primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: white;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text-dark);
}

.card p {
    color: var(--color-text-light);
    line-height: 1.6;
}

/* Process Steps */
.process-step {
    text-align: center;
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 1.5rem;
    right: -1rem;
    width: 2rem;
    height: 2px;
    background: var(--color-primary);
}

.process-step:last-child::after {
    display: none;
}

@media (max-width: 768px) {
    .process-step::after {
        display: none;
    }
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 1rem;
}

/* Testimonials */
/* Temporarily hidden */
#testimonials {
    display: none;
}

.testimonial {
    text-align: center;
    padding: 2rem;
}

.testimonial-quote {
    font-size: 1.25rem;
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--color-text-dark);
}

.testimonial-author {
    color: var(--color-text-light);
    font-weight: 500;
}

/* CTA Section */
.cta-section {
    background: var(--color-gray-50);
    margin-top: 4rem;
}

.cta-content {
    text-align: center;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-dark);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--color-white);
    color: var(--color-text-dark);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Contact Info */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-item {
    text-align: center;
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.25rem;
}

.contact-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
}

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

.contact-item a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover,
.contact-item a:focus {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--color-dark);
    color: white;
    text-align: center;
    padding: 3rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-gray-600);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-links a:focus {
    color: white;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

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

/* Print Styles */
@media print {
    .header,
    .back-to-top,
    .hero-cta {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* RTL Support */
[dir="rtl"] .nav-links {
    gap: 2rem;
}

[dir="rtl"] .process-step::after {
    right: auto;
    left: -1rem;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #0066CC;
        --color-accent: #008800;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .section {
        padding: 3rem 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero {
        padding: 6rem 1rem;
    }
    
    .nav {
        padding: 1rem;
    }
    
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

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