:root {
    /* Color Palette - Modern & Professional */
    --primary-color: #4f46e5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    /* Indigo 700 */
    --secondary-color: #64748b;
    /* Slate 500 */
    --background-color: #f3f4f6;
    /* Gray 100 */
    --surface-color: #ffffff;
    --text-color: #1f2937;
    /* Gray 800 */
    --text-muted: #6b7280;
    /* Gray 500 */
    --border-color: #e5e7eb;
    /* Gray 200 */

    /* Dark Mode Colors */
    --dark-bg: #111827;
    --dark-surface: #1f2937;
    --dark-text: #f9fafb;
    --dark-text-muted: #9ca3af;
    --dark-border: #374151;

    /* Status Colors */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Spacing & Radius */
    --radius: 0.5rem;
    --header-height: 70px;
}

/* Dark Mode Overrides */
body.dark-mode {
    --background-color: var(--dark-bg);
    --surface-color: var(--dark-surface);
    --text-color: var(--dark-text);
    --text-muted: var(--dark-text-muted);
    --border-color: var(--dark-border);
}

body.dark-mode .card,
body.dark-mode .main-header {
    background-color: var(--dark-surface);
    border-color: var(--dark-border);
}

body.dark-mode .section[style*="background-color: #f9fafb"] {
    background-color: #1a202c !important;
    /* Slightly lighter than main dark bg */
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, color 0.3s;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    margin-right: 1rem;
    border-radius: 50%;
    transition: color 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 900;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-5px);
}

/* Testimonials Section */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    position: relative;
    transition: transform 0.2s;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-stars {
    color: var(--warning-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    background-color: #e0e7ff;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
}

.author-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.author-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.main-header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.btn-login {
    background-color: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-login:hover {
    background-color: var(--primary-hover);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
}

.btn-white {
    background-color: white;
    color: var(--primary-color);
}

.btn-white:hover {
    background-color: #f9fafb;
    transform: translateY(-2px);
}

.btn-outline-white {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-outline-white:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Services Section */
.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--surface-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 64px;
    height: 64px;
    background-color: #e0e7ff;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-link:hover {
    gap: 0.5rem;
}

/* Footer */
.main-footer {
    background-color: #111827;
    /* Gray 900 */
    color: #9ca3af;
    /* Gray 400 */
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    transition: color 0.2s;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Mobile Menu Button - Hidden on Desktop */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        height: auto;
        padding: 1rem 0;
        position: relative;
        /* Ensure z-index works */
    }

    .main-header .container {
        flex-direction: row;
        /* Keep Row for Header Top Bar */
        flex-wrap: wrap;
        /* Allow menu to break to next line */
        justify-content: space-between;
        align-items: center;
    }

    /* Hide Nav by default on mobile */
    .main-nav {
        display: none;
        width: 100%;
        order: 3;
        /* Move to bottom of flex container */
        background-color: var(--surface-color);
        padding: 1rem 0;
        border-top: 1px solid var(--border-color);
        margin-top: 1rem;
    }

    .main-nav.active {
        display: block;
        animation: slideDown 0.3s ease-out forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        align-items: center;
    }

    .main-nav ul li {
        width: 100%;
        text-align: center;
    }

    .main-nav a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav a:hover {
        background-color: var(--background-color);
    }

    .mobile-menu-btn {
        display: block;
        order: 2;
        /* Place after logo */
    }

    /* Adjust layout for mobile */
    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title h2 {
        font-size: 1.75rem;
    }

    .card {
        padding: 1.5rem;
    }

    .footer-grid {
        gap: 2rem;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.modal-icon.success {
    background-color: #d1fae5;
    color: var(--success-color);
}

.modal-icon.error {
    background-color: #fee2e2;
    color: var(--danger-color);
}

.modal h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.modal p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.btn-modal {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-modal:hover {
    background-color: var(--primary-hover);
}