/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Header Styles */
.site-header {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-image {
    height: 42px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s;
    display: block;
    border-radius: 8px;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: #667eea;
    background: transparent;
}

/* Mega Menu */
.has-mega-menu {
    position: static;
}

.mega-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-20px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
    border-top: 1px solid #e2e8f0;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    display: none;
}

.has-mega-menu:hover .mega-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
    display: block;
}

.mega-menu-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.menu-item:hover {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-color: #e2e8f0;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.08);
}

.menu-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.menu-icon svg {
    width: 22px;
    height: 22px;
}

.menu-text {
    flex: 1;
    min-width: 0;
}

.menu-title {
    display: block;
    color: #1a202c;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.3;
}

.menu-item:hover .menu-title {
    color: #667eea;
}

.menu-desc {
    color: #718096;
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Wide Mega Menu for Hosting */
.mega-menu-wide {
    max-width: 100%;
}

.mega-menu-content-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 2.5rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

.mega-menu-category {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #667eea;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    padding: 0 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.menu-icon-small {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}

.menu-icon-small svg {
    width: 18px;
    height: 18px;
}

.menu-title-small {
    display: block;
    color: #1a202c;
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.1rem;
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.menu-item:hover .menu-title-small {
    color: #667eea;
}

.menu-desc-small {
    color: #718096;
    font-size: 0.7rem;
    line-height: 1.2;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Services Mega Menu - Horizontal Layout */
.mega-menu-services {
    max-width: 100%;
}

.mega-menu-content-services {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 2.5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.5rem;
    border-radius: 0;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.service-item:hover {
    background: transparent !important;
    border: none !important;
    transform: translateY(-3px);
    box-shadow: none !important;
}

.service-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.service-icon svg {
    width: 24px;
    height: 24px;
}

.service-text {
    flex: 1;
    min-width: 0;
}

.service-title {
    display: block;
    color: #1a202c;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.service-item:hover .service-title {
    color: #667eea;
}

.service-desc {
    color: #718096;
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-toggle-btn {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    cursor: pointer;
    padding: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 8px;
    width: 40px;
    height: 40px;
}

.search-toggle-btn:hover {
    color: #667eea;
    background: #ffffff;
    border-color: #667eea;
    transform: translateY(-1px);
}

.cta-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

/* Search Bar */
.search-bar {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.search-bar.active {
    max-height: 90px;
}

.search-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-bar form {
    flex: 1;
    display: flex;
    gap: 0.75rem;
    max-width: 600px;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #ffffff;
}

.search-bar input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-bar button[type="submit"] {
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.search-bar button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-close {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-size: 1.5rem;
    color: #4a5568;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 8px;
    line-height: 1;
}

.search-close:hover {
    color: #667eea;
    border-color: #667eea;
    transform: rotate(90deg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
}

.mobile-menu-toggle button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle button span {
    display: block;
    width: 28px;
    height: 3px;
    background: #2d3748;
    transition: all 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle button.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle button.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle button.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 0.5rem;
    }
    
    .mega-menu-content {
        padding: 2rem 1.5rem;
    }
    
    .mega-menu-content-wide {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    
    .mega-menu-content-services {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 992px) {
    .header-container {
        padding: 0.75rem 1rem;
    }
    
    .site-header {
        position: sticky;
        top: 0;
    }
    
    .main-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow-y: auto;
        transition: max-height 0.3s ease;
        z-index: 9998;
    }
    
    .main-nav.active {
        max-height: calc(100vh - 60px);
        padding: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .nav-menu > li > a {
        padding: 1rem;
    }
    
    .has-mega-menu {
        position: relative;
    }
    
    .mega-menu,
    .mega-menu-wide,
    .mega-menu-services {
        position: static;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-top: none;
        display: block;
    }
    
    .has-mega-menu.active .mega-menu,
    .has-mega-menu.active .mega-menu-wide,
    .has-mega-menu.active .mega-menu-services {
        max-height: 3000px;
    }
    
    .mega-menu-content {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .mega-menu-content-wide {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    .mega-menu-content-services {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .menu-item {
        padding: 0.75rem;
    }
    
    .menu-icon {
        width: 40px;
        height: 40px;
    }
    
    .menu-icon-small {
        width: 34px;
        height: 34px;
    }
    
    .category-title {
        font-size: 0.75rem;
        padding: 0.5rem 0.5rem 0.25rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
        padding-top: 1rem;
        border-top: 1px solid #e2e8f0;
    }
    
    .cta-button {
        flex: 1;
        text-align: center;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .search-bar-container {
        padding: 1rem;
    }
    
    .search-bar form {
        flex-direction: column;
        max-width: 100%;
    }
    
    .search-bar button[type="submit"] {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-image {
        height: 35px;
    }
    
    .menu-title {
        font-size: 0.9rem;
    }
    
    .menu-desc {
        font-size: 0.8rem;
    }
    
    .menu-title-small {
        font-size: 0.75rem;
    }
    
    .menu-desc-small {
        font-size: 0.65rem;
    }
}
