* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: hsl(0 0% 100%);
    border-bottom: 1px solid hsl(220 13% 91%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px 0 hsl(0 0% 0% / 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

/* Logo/Brand */
.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(222.2 84% 4.9%);
    text-decoration: none;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: hsl(222.2 84% 4.9%);
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: hsl(210 40% 98%);
    color: hsl(222.2 47.4% 11.2%);
}

/* Dropdown Arrow */
.dropdown-arrow {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
}

.nav-item:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: hsl(0 0% 100%);
    border: 1px solid hsl(220 13% 91%);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px hsl(0 0% 0% / 0.1), 0 4px 6px -2px hsl(0 0% 0% / 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    min-width: 400px;
    z-index: 1001;
}

.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-content {
    padding: 1.5rem;
}

.mega-menu-section {
    margin-bottom: 1.5rem;
}

.mega-menu-section:last-child {
    margin-bottom: 0;
}

.mega-menu-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(222.2 47.4% 11.2%);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


.mega-menu-items {
    display: grid;
    gap: 0.5rem;
}

.mega-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: hsl(222.2 84% 4.9%);
    transition: all 0.2s ease;
}

.mega-menu-item:hover {
    background: hsl(210 40% 98%);
}

.mega-menu-icon {
    width: 2rem;
    height: 2rem;
    background: hsl(210 40% 98%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: hsl(221.2 83.2% 53.3%);
}

.mega-menu-item-content {
    flex: 1;
}

.mega-menu-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: hsl(222.2 84% 4.9%);
}

.mega-menu-item-description {
    font-size: 0.875rem;
    color: hsl(215.4 16.3% 46.9%);
    line-height: 1.4;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: hsl(222.2 84% 4.9%);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mega-menu {
        position: fixed;
        top: 4rem;
        left: 0;
        right: 0;
        transform: none;
        min-width: auto;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .nav-item:hover .mega-menu {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .header {
        background: hsl(222.2 84% 4.9%);
        border-bottom-color: hsl(217.2 32.6% 17.5%);
    }

    .brand,
    .nav-link {
        color: hsl(210 40% 98%);
    }

    .nav-link:hover {
        background: hsl(217.2 32.6% 17.5%);
        color: hsl(210 40% 98%);
    }

    .mega-menu {
        background: hsl(222.2 84% 4.9%);
        border-color: hsl(217.2 32.6% 17.5%);
    }

    .mega-menu-title {
        color: hsl(210 40% 98%);
    }

    .mega-menu-item {
        color: hsl(210 40% 98%);
    }

    .mega-menu-item:hover {
        background: hsl(217.2 32.6% 17.5%);
    }

    .mega-menu-icon {
        background: hsl(217.2 32.6% 17.5%);
        color: hsl(217.2 91.2% 59.8%);
    }

    .mega-menu-item-title {
        color: hsl(210 40% 98%);
    }

    .mega-menu-item-description {
        color: hsl(215 20.2% 65.1%);
    }

    .mobile-menu-btn {
        color: hsl(210 40% 98%);
    }
}
