/* ===================================
   E7 TECH - MODERN PROFESSIONAL HEADER
   Fully Responsive with Working Dropdowns
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #0f172a;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===================================
   TOP BAR
   =================================== */
.top-bar {
    background: linear-gradient(135deg, #0a1128, #1a237e);
    color: #ffffff;
    padding: 0.625rem 0;
    font-size: 0.875rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    gap: 1.5rem;
}

.top-bar-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.top-bar-link:hover {
    color: #fbbf24;
}

.top-bar-link i {
    font-size: 0.875rem;
}

.top-bar-right {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    width: 1.875rem;
    height: 1.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #fbbf24;
    color: #0f172a;
    transform: translateY(-0.125rem);
}

/* ===================================
   MAIN HEADER
   =================================== */
.site-header {
    background: #ffffff;
    box-shadow: 0 0.125rem 1.25rem rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 0.25rem 1.875rem rgba(0, 0, 0, 0.15);
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: relative;
    max-width: 87.5rem;
    margin: 0 auto;
    gap: 4rem;
}

/* ===================================
   LOGO
   =================================== */
.site-logo {
    flex-shrink: 0;
    z-index: 1001;
    margin: 0;
    padding: 0;
    display: block;
    text-decoration: none;
}

.site-logo img {
    height: 6rem;
    width: auto;
    display: block;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
}

.site-header.scrolled .site-logo img {
    height: 5rem;
}

/* ===================================
   DESKTOP NAVIGATION
   =================================== */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
    margin-left: 15rem;
}

.nav-link {
    color: #0f172a;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    position: relative;
}

.nav-link:hover {
    background: rgba(26, 35, 126, 0.05);
    color: #1a237e;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.3125rem;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: #1a237e;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.dropdown-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-item.has-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Contact Button */
.btn-contact {
    background: linear-gradient(135deg, #1a237e, #5a3fc0);
    color: #ffffff !important;
    padding: 0.75rem 1.5rem !important;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-contact::after {
    display: none;
}

.btn-contact:hover {
    background: linear-gradient(135deg, #283593, #6a4fd0);
    transform: translateY(-0.125rem);
    box-shadow: 0 0.5rem 1.25rem rgba(26, 35, 126, 0.3);
}

.btn-contact i {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.btn-contact:hover i {
    transform: translateX(0.1875rem);
}

/* ===================================
   DROPDOWN MENUS
   =================================== */
.nav-item {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.625rem);
    left: 0;
    background: #ffffff;
    min-width: 17.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.625rem);
    transition: all 0.3s ease;
    padding: 0.75rem;
    z-index: 100;
}

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

.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(26, 35, 126, 0.05);
}

.dropdown-item i {
    font-size: 1.25rem;
    color: #1a237e;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.dropdown-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dropdown-item-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.9375rem;
}

.dropdown-item-desc {
    font-size: 0.8125rem;
    color: #64748b;
}

.dropdown-item:hover .dropdown-item-title {
    color: #1a237e;
}

/* Mega Menu */
.mega-menu {
    min-width: 26.25rem;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

/* ===================================
   MOBILE TOGGLE
   =================================== */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 0.3125rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.toggle-line {
    width: 1.75rem;
    height: 3px;
    background: #1a237e;
    border-radius: 0.1875rem;
    transition: all 0.3s ease;
}

.mobile-toggle.active .toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(0.5rem, 0.5rem);
}

.mobile-toggle.active .toggle-line:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active .toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(0.4375rem, -0.4375rem);
}

/* ===================================
   MOBILE NAVIGATION
   =================================== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 25rem;
    height: 100vh;
    background: #ffffff;
    box-shadow: -0.25rem 0 1.875rem rgba(0, 0, 0, 0.2);
    z-index: 1002;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #1a237e, #5a3fc0);
}

.mobile-nav-header img {
    height: 3.5rem;
    width: auto;
}

.mobile-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

.mobile-nav-content {
    flex: 1;
    padding: 0.5rem 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 1.25rem;
    color: #0f172a;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-nav-link-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: rgba(26, 35, 126, 0.05);
    color: #1a237e;
    padding-left: 1.75rem;
}

.mobile-nav-link i {
    font-size: 1.25rem;
    width: 1.75rem;
    text-align: center;
    flex-shrink: 0;
}

.mobile-dropdown-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.mobile-nav-item.active .mobile-dropdown-icon {
    transform: rotate(180deg);
}

/* Mobile Dropdown Content */
.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    background: rgba(26, 35, 126, 0.02);
    transition: max-height 0.3s ease;
}

.mobile-nav-item.active .mobile-dropdown-content {
    max-height: 31.25rem;
}

.mobile-dropdown-link {
    display: block;
    padding: 1rem 1.25rem 1rem 4.25rem;
    color: #475569;
    text-decoration: none;
    font-size: 0.9375rem;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-dropdown-link::before {
    content: '›';
    position: absolute;
    left: 3rem;
    color: #fbbf24;
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-dropdown-link:hover {
    background: rgba(26, 35, 126, 0.05);
    color: #1a237e;
    padding-left: 4.75rem;
}

.mobile-dropdown-link:hover::before {
    left: 3.5rem;
}

/* Mobile CTA */
.mobile-nav-cta {
    background: linear-gradient(135deg, #1a237e, #5a3fc0);
    color: #ffffff !important;
    margin: 1rem 1.25rem;
    border-radius: 0.625rem;
    border-bottom: none !important;
    font-weight: 600;
}

.mobile-nav-cta .mobile-nav-link-content {
    justify-content: center;
}

.mobile-nav-cta:hover {
    background: linear-gradient(135deg, #283593, #6a4fd0);
    padding-left: 1.25rem !important;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(26, 35, 126, 0.3);
}

/* Mobile Footer */
.mobile-nav-footer {
    padding: 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.mobile-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

.mobile-contact-info a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: color 0.3s ease;
}

.mobile-contact-info a i {
    width: 1.5rem;
    text-align: center;
    color: #1a237e;
}

.mobile-contact-info a:hover {
    color: #1a237e;
}

.mobile-social {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.mobile-social a {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #1a237e;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.1);
}

.mobile-social a:hover {
    background: #1a237e;
    color: #ffffff;
    transform: translateY(-0.1875rem);
    box-shadow: 0 0.375rem 0.75rem rgba(26, 35, 126, 0.3);
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(0.25rem);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 991px) {
    .top-bar {
        display: none;
    }

    .main-nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }
    
    .header-wrapper {
        padding: 0.5rem 1.5rem;
        gap: 1rem;
    }
    
    .site-logo img {
        height: 4rem;
    }
    
    .site-header.scrolled .site-logo img {
        height: 3.5rem;
    }
}

@media (max-width: 767px) {
    .header-wrapper {
        padding: 0.5rem 1rem;
    }

    .site-logo img {
        height: 3.5rem;
    }

    .site-header.scrolled .site-logo img {
        height: 3rem;
    }

    .mobile-nav {
        max-width: 100%;
        width: 85%;
    }
}

@media (max-width: 575px) {
    .header-wrapper {
        padding: 0.375rem 0.75rem;
    }
    
    .site-logo img {
        height: 3rem;
    }

    .site-header.scrolled .site-logo img {
        height: 2.75rem;
    }

    .mobile-nav-header img {
        height: 2.5rem;
    }
    
    .mobile-nav {
        width: 90%;
    }
}

@media (min-width: 992px) {
    .mobile-nav,
    .mobile-toggle,
    .mobile-overlay {
        display: none !important;
    }
}
