/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    padding: 20px 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 32px;
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.logo img {
    height: 100%;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

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

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

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

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

/* Dropdown Menu */
.nav-links li {
    position: relative;
}

.dropdown {
    position: relative;
}

.dropdown > a {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* Disable underline for dropdown links */
.dropdown > a::after {
    content: '▼';
    font-size: 10px;
    margin-left: 6px;
    position: static;
    width: auto;
    height: auto;
    background: none;
    display: inline-block;
    line-height: 1;
    vertical-align: baseline;
    transition: transform 0.3s;
}

.dropdown > a:hover::after {
    width: auto;
}

.dropdown:hover > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 500px;
    padding: 16px;
    margin-top: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    z-index: 1000;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

/* Single column for Marketplace dropdown */
.dropdown.marketplace-dropdown .dropdown-menu {
    grid-template-columns: 1fr;
    min-width: 240px;
}

/* Single column for Resources dropdown */
.dropdown.resources-dropdown .dropdown-menu {
    grid-template-columns: 1fr;
    min-width: 240px;
}

/* Solutions dropdown: two-column layout (left: Developer Tools, Business Cloud, Wordpress, Privacy | right: Web Hosting, Web Reseller, Ecommerce) */
.dropdown.solutions-dropdown .dropdown-menu {
    grid-template-columns: 1fr 1fr;
    min-width: 480px;
}

.dropdown.solutions-dropdown .solutions-col {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown.solutions-dropdown .solutions-col-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown.solutions-dropdown .solutions-col-list li {
    margin: 0;
}

.dropdown.solutions-dropdown .solutions-col-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 400;
    border-radius: 8px;
}

.dropdown.solutions-dropdown .solutions-col-list a:hover {
    background: rgba(0, 102, 255, 0.05);
    color: var(--primary-blue);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 400;
    border-radius: 8px;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background: rgba(0, 102, 255, 0.05);
    color: var(--primary-blue);
}

.dropdown-menu-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    object-fit: contain;
}

.dropdown-menu a span {
    flex: 1;
}

/* Nested Dropdown (Sub-menu) */
.dropdown-menu li {
    position: relative;
}

.dropdown-menu .sub-dropdown > a::after {
    content: '▶';
    font-size: 10px;
    margin-left: auto;
    position: static;
    width: auto;
    height: auto;
    background: none;
    display: inline-block;
    line-height: 1;
    transition: transform 0.3s;
}

.dropdown-menu .sub-dropdown:hover > a::after {
    transform: translateX(3px);
}

.sub-dropdown-menu {
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 8px 0;
    margin-left: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    list-style: none;
    z-index: 1001;
    max-height: 400px;
    overflow-y: auto;
    display: block;
}

/* 2-column layout for Applications sub-menu */
.sub-dropdown-menu.applications-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 480px;
    gap: 0;
}

.dropdown-menu .sub-dropdown:hover .sub-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.sub-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 400;
    font-size: 14px;
}

.sub-dropdown-menu a::after {
    display: none;
}

.sub-dropdown-menu a:hover {
    background: rgba(0, 102, 255, 0.05);
    color: var(--primary-blue);
}

.sub-dropdown-menu-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links .nav-spacer {
    width: 40px;
}

.nav-login {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    position: relative;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Get Started: in dropdown on mobile only; in header on desktop only */
nav .nav-links li.nav-mobile-cta {
    display: none !important;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    /* Hide Get Started in header on mobile (overrides inline style) */
    nav .nav-right a.btn-primary {
        display: none !important;
    }

    /* Show Get Started inside the slide-out menu on mobile */
    nav .nav-links li.nav-mobile-cta {
        display: block !important;
        border-bottom: none;
        padding: 20px 0 0;
        margin-top: 8px;
    }

    .nav-mobile-cta .nav-mobile-get-started {
        display: block;
        text-align: center;
        padding: 14px 24px;
        width: 100%;
        text-decoration: none;
        box-sizing: border-box;
        color:#fff
    }

    .nav-container {
        position: relative;
    }

    .menu-toggle {
        display: flex;
        order: 3;
    }

    .nav-right {
        order: 2;
        margin-left: auto;
        margin-right: 16px;
    }

    .logo {
        order: 1;
    }

    nav .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 80% !important;
        max-width: 400px !important;
        height: 100vh !important;
        background: white !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 80px 24px 24px !important;
        gap: 0 !important;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15) !important;
        transition: right 0.3s ease !important;
        overflow-y: auto !important;
        z-index: 1001 !important;
        display: flex !important;
    }

    nav .nav-links.active {
        right: 0 !important;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-links > li > a {
        display: block;
        padding: 16px 0;
        width: 100%;
    }

    .nav-links > li > a::after {
        display: none;
    }

    .nav-right {
        gap: 16px;
    }

    .nav-login {
        font-size: 14px;
    }

    .btn-primary {
        padding: 10px 16px;
        font-size: 14px;
    }

    /* Mobile Dropdown */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        min-width: 100%;
        padding: 0;
        margin: 0;
        box-shadow: none;
        background: var(--bg-light);
        border-radius: 0;
        grid-template-columns: 1fr;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown.solutions-dropdown.active .dropdown-menu {
        display: block;
        grid-template-columns: 1fr;
    }

    .dropdown-menu li {
        border-bottom: 1px solid var(--border);
    }

    .dropdown-menu a {
        padding: 12px 16px;
        padding-left: 40px;
    }

    .dropdown > a::after {
        content: '+';
        font-size: 18px;
        margin-left: auto;
    }

    .dropdown.active > a::after {
        content: '−';
    }

    /* Mobile Sub-dropdown */
    .sub-dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: none !important;
        min-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        background: rgba(0, 0, 0, 0.02) !important;
        border-radius: 0 !important;
        grid-template-columns: 1fr !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .sub-dropdown.active .sub-dropdown-menu {
        display: block !important;
    }

    .sub-dropdown-menu.applications-menu {
        grid-template-columns: 1fr !important;
    }

    .sub-dropdown > a::after {
        content: '+' !important;
        font-size: 18px;
        margin-left: auto;
    }

    .sub-dropdown.active > a::after {
        content: '−' !important;
    }

    /* Ensure sub-dropdowns start closed on mobile */
    .sub-dropdown {
        position: relative;
    }

    .sub-dropdown:not(.active) .sub-dropdown-menu {
        display: none !important;
    }

    .sub-dropdown-menu a {
        padding: 10px 16px;
        padding-left: 60px;
    }
}

.btn-primary {
    background: linear-gradient(135deg, #040f3a, #1b49ff);
    color: white;
    padding: 12px 24px;
    border: none;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 102, 255, 0.3);
}

