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

:root {
    --primary-color: #4F46E5;
    /* Indigo 600 */
    --primary-dark: #4338CA;
    /* Indigo 700 */
    --secondary-color: #FF17A6;
    /* Logo Pink */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Dark Mode */
[data-theme="dark"] {
    --primary-color: #818CF8;
    /* Indigo 400 */
    --primary-dark: #6366F1;
    /* Indigo 500 */
    --secondary-color: #FF17A6;
    /* Logo Pink */
    --text-dark: #f9fafb;
    --text-light: #d1d5db;
    --bg-light: #1f2937;
    --white: #111827;
    --border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

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);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header and Navigation */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
    display: inline-block;
}

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

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background: var(--white);
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.cta-button.secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    margin-left: 1rem;
}

.cta-button.secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Section Styles */
section {
    margin-bottom: 4rem;
}

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

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: -2rem auto 3rem;
}

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

/* Cards */
.feature-card,
.service-card,
.team-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover,
.service-card:hover,
.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon,
.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card h3,
.service-card h3,
.team-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-dark);
}

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

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.submit-button {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-button:hover {
    background: var(--primary-dark);
}

/* Footer */
footer {
    background: var(--text-dark);
    color: #ffffff;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ffffff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    text-align: center;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        display: grid;
        grid-template-columns: 1fr auto auto;
        gap: 0.5rem;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        grid-column: 1 / -1;
    }

    .nav-links.active {
        left: 0;
    }

    .theme-toggle {
        padding: 0.5rem;
        border: none;
        font-size: 1.5rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

    .cta-button.secondary {
        margin-left: 0;
        margin-top: 1rem;
        display: block;
    }

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

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Background Pattern */
.bg-pattern-onion {
    background-image: url('onion-pattern.svg');
    background-size: 100px 100px;
    background-repeat: repeat;
    position: relative;
}

.bg-pattern-onion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
    z-index: 0;
    pointer-events: none;
}

[data-theme="dark"] .bg-pattern-onion::before {
    background: linear-gradient(to bottom, rgba(31, 41, 55, 0.95), rgba(31, 41, 55, 0.8));
}

.bg-pattern-onion>* {
    position: relative;
    z-index: 1;
}

/* Hero Pattern Variation */
.bg-pattern-onion-hero {
    background-image: url('onion-pattern.svg');
    background-size: 300px 300px;
    /* Larger pattern */
    background-repeat: repeat;
    position: relative;
}

.bg-pattern-onion-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.85) 0%, rgba(255, 23, 166, 0.85) 100%);
    /* Reduced opacity */
    z-index: 0;
    pointer-events: none;
}

.bg-pattern-onion-hero>* {
    position: relative;
    z-index: 1;
}

/* Footer Pattern Variation */
.bg-pattern-onion-footer {
    background-image: url('onion-pattern.svg');
    background-size: 150px 150px;
    background-repeat: repeat;
    position: relative;
}

.bg-pattern-onion-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(31, 41, 55, 0.97);
    /* Dark overlay for footer */
    z-index: 0;
    pointer-events: none;
}

.bg-pattern-onion-footer>* {
    position: relative;
    z-index: 1;
}