/* ============================================
   HEADER - STANDALONE STYLES
   Clean CSS for navigation
   ============================================ */

/* ========== NAV CONTAINER ========== */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    -webkit-backface-visibility: hidden;
}

/* Scroll shadow - JS applies 'scrolled' to nav element */
.nav-container nav.scrolled,
.nav-container.scrolled,
.scrolled .nav-container {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ========== NAV ========== */
.nav-container nav {
    background: transparent;
    max-width: 100%;
    transition: box-shadow 0.3s ease;
}

.nav-container nav ul {
    margin-bottom: 0;
}

/* ========== NAV BAR ========== */
.nav-container .nav-bar {
    background: transparent;
    border-bottom: 1px solid #e5e7eb;
    line-height: normal;
    height: auto;
    min-height: 70px;
    overflow: visible;
    box-shadow: none;
    width: 100%;
}

.nav-container .nav-bar .module,
.nav-container .nav-bar .module-group {
    height: auto;
}

.nav-container .nav-bar a {
    display: inline-block;
    height: auto;
}

/* ========== CONTAINER ========== */
.nav-container .nav-bar > .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* ========== HEADER WRAPPER ========== */
.nav-container .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    flex-direction: row;
    width: 100%;
}

/* ========== HEADER GROUP (Logo + Mobile Toggle) ========== */
.nav-container .header-group {
    display: flex;
    align-items: center;
    height: 70px;
    padding: 0;
    position: relative;
    flex-shrink: 0;
}

/* ========== LOGO ========== */
.nav-container .header-logo {
    display: inline-flex;
    align-items: center;
    height: 50px;
    width: auto;
    margin-right: 0;
}

.nav-container .header-logo img {
    height: 45px;
    width: auto;
    max-height: 45px;
}

/* ========== MODULE ========== */
.nav-container .module {
    display: inline-block;
    padding: 0;
}

.nav-container .module-group {
    display: inline-block;
}

/* ========== MENU LIST WRAPPER ========== */
.nav-container .module-group.header-menu-list {
    display: none;
    padding: 0;
    margin: 0;
    height: auto;
}

/* ========== MENU ========== */
.nav-container .menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: auto;
    width: auto;
    font-family: 'Manrope', 'Open Sans', sans-serif;
}

.nav-container .menu > li {
    position: relative;
    margin: 0;
    padding: 0;
    float: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-container .menu > li > a {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    font-family: 'Manrope', 'Open Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s ease;
    height: auto;
    line-height: 1.4;
    white-space: nowrap;
}

.nav-container .menu > li > a:hover {
    text-decoration: none;
    opacity: 1;
}

/* Phone number styling */
.nav-container .menu > li.phonenumber > a,
.nav-container .menu > li.phonenumber > a.phonenumber {
    color: #3b82f6;
    font-weight: 800;
    transition: all 0.3s ease;
}

.nav-container .menu > li.phonenumber > a:hover {
    color: #1e40af;
    transform: scale(1.05);
}

/* ========== DROPDOWN ARROW ========== */
.nav-container .menu > li.has-dropdown {
    padding-right: 0;
}

.nav-container .menu > li.has-dropdown > a {
    padding-right: 24px;
    cursor: default;
}

.nav-container .menu > li.has-dropdown::after {
    content: "\e64b";
    font-family: 'themify';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #64748b;
    transition: transform 0.3s ease, color 0.3s ease;
    pointer-events: none;
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
}

.nav-container .menu > li.has-dropdown:hover::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Also rotate when toggle-sub is active (for mobile and accessibility) */
.nav-container .menu > li.has-dropdown.toggle-sub::after {
    transform: translateY(-50%) rotate(180deg);
}

/* ========== DROPDOWN MENU (MEGA MENU) ========== */
.nav-container .menu > li > ul,
.nav-container .menu > li > ul.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    margin-top: 0;
    min-width: auto;
    width: auto;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    z-index: 100;
    display: flex;
    line-height: normal;
    pointer-events: none;
}

/* Bridge element to prevent hover gap */
.nav-container .menu > li.has-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.nav-container .menu > li:hover > ul,
.nav-container .menu > li:hover > ul.mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Dropdown columns */
.nav-container .mega-menu > li {
    width: auto;
    min-width: 180px;
    padding: 0 15px;
    display: block;
    overflow: visible;
    border-right: 1px solid #f1f5f9;
}

.nav-container .mega-menu > li:last-child {
    border-right: none;
}

/* Dropdown inner lists */
.nav-container .mega-menu > li > ul {
    position: relative;
    left: auto;
    top: auto;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: block;
    list-style-type: none;
}

/* Dropdown titles */
.nav-container .mega-menu .title {
    display: block;
    font-family: 'Manrope', 'Open Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    padding: 8px 12px;
    margin-bottom: 5px;
    text-decoration: none;
}

/* Dropdown links */
.nav-container .mega-menu ul li a {
    display: block;
    font-family: 'Manrope', 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    height: auto;
    line-height: 1.4;
}

.nav-container .mega-menu ul li a:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.08));
    color: #3b82f6;
    transform: translateX(4px);
    text-decoration: none;
}

/* ========== MOBILE TOGGLE ========== */
.nav-container .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    border: none;
    background: transparent;
    margin-left: auto;
    position: relative;
    padding: 0;
}

.nav-container .mobile-toggle i {
    font-size: 24px;
    color: #1e293b;
    position: static;
    transform: none;
    line-height: 1;
}

.nav-container .mobile-toggle.active i::before {
    content: "\e646"; /* ti-close */
}

/* ========== NAV OPEN STATE ========== */
.nav-container .nav-bar.nav-open {
    max-height: 10000px;
    height: auto;
}

/* ============================================
   DESKTOP STYLES (1024px and up)
   ============================================ */
@media (min-width: 1024px) {
    .nav-container .header {
        flex-direction: row;
    }
    
    .nav-container .header-group {
        flex-shrink: 0;
        width: auto;
    }
    
    .nav-container .mobile-toggle {
        display: none;
    }
    
    .nav-container .module-group.header-menu-list {
        display: flex;
        align-items: center;
        margin-left: auto;
        position: static;
        background: transparent;
        width: auto;
        max-height: none;
        overflow: visible;
    }
    
    .nav-container .menu {
        flex-direction: row;
        align-items: center;
    }
    
    .nav-container .menu > li {
        border: none;
    }
    
    /* Underline animation on hover */
    .nav-container .menu > li > a {
        position: relative;
    }
    
    .nav-container .menu > li > a::after {
        content: '';
        position: absolute;
        bottom: 5px;
        left: 18px;
        right: 18px;
        height: 2px;
        background: linear-gradient(90deg, #3b82f6, #8b5cf6);
        transform: scaleX(0);
        transition: transform 0.3s ease;
        border-radius: 1px;
    }
    
    .nav-container .menu > li:hover > a::after,
    .nav-container .menu > li > a:hover::after {
        transform: scaleX(1);
    }
    
    /* Don't show underline on phone number */
    .nav-container .menu > li.phonenumber > a::after {
        display: none;
    }
}

/* ============================================
   MOBILE STYLES (below 1024px)
   ============================================ */
@media (max-width: 1023px) {
    .nav-container .nav-bar > .container {
        padding: 0 15px;
    }
    
    .nav-container .mega-menu ul li a {
        white-space: normal;
    }
    
    .nav-container .header {
        flex-wrap: wrap;
        height: auto;
        min-height: 70px;
    }
    
    .nav-container .header-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-container .mobile-toggle {
        display: flex;
    }
    
    /* Menu list - hidden by default */
    .nav-container .module-group.header-menu-list {
        display: none;
        width: 100%;
        position: static;
        background: white;
        max-height: none;
        overflow: visible;
        padding: 0;
        margin: 0;
        border-top: 1px solid #e5e7eb;
    }
    
    /* Menu list - open state */
    .nav-container .nav-bar.nav-open .module-group.header-menu-list {
        display: block;
    }
    
    .nav-container .menu {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
        height: auto;
    }
    
    .nav-container .menu > li {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        border-bottom: 1px solid #f1f5f9;
        float: none;
        display: block;
    }
    
    .nav-container .menu > li:last-child {
        border-bottom: none;
    }
    
    .nav-container .menu > li > a {
        padding: 15px 20px;
        width: 100%;
        justify-content: flex-start;
        display: block;
        height: auto;
        line-height: 24px;
    }
    
    /* Disable hover color change on mobile */
    .nav-container .menu > li > a:hover,
    .nav-container .menu > li > a:focus,
    .nav-container .menu > li > a:active {
        color: #1e293b;
    }
    
    .nav-container .menu > li.phonenumber > a:hover,
    .nav-container .menu > li.phonenumber > a:focus {
        color: #3b82f6;
    }
    
    /* Dropdown arrow on mobile - fixed position based on link height (padding 15px + line-height 24px = 54px, center = 27px) */
    .nav-container .menu > li.has-dropdown::after {
        display: block;
        right: 20px;
        top: 27px;
        transform: none;
        font-size: 12px;
        z-index: 10;
        pointer-events: none;
        color: #64748b;
    }
    
    /* Override hover state on mobile */
    .nav-container .menu > li.has-dropdown:hover::after {
        transform: none;
        color: #64748b;
    }
    
    .nav-container .menu > li.has-dropdown.toggle-sub::after {
        transform: rotate(180deg);
    }
    
    /* Hide bridge element on mobile */
    .nav-container .menu > li.has-dropdown::before {
        display: none;
    }
    
    .nav-container .menu > li.has-dropdown {
        padding-right: 0;
    }
    
    /* Make the dropdown link clickable area */
    .nav-container .menu > li.has-dropdown > a {
        cursor: pointer;
    }
    
    /* Dropdown hidden by default on mobile */
    .nav-container .menu > li > ul,
    .nav-container .menu > li > ul.mega-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: #f8fafc;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
        pointer-events: auto;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    }
    
    /* Dropdown open state on mobile */
    .nav-container .menu > li.toggle-sub > ul,
    .nav-container .menu > li.toggle-sub > ul.mega-menu {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        padding: 10px 0;
    }
    
    .nav-container .mega-menu > li {
        width: 100%;
        padding: 0;
        border-right: none;
        border-bottom: none;
        display: block;
    }
    
    .nav-container .mega-menu > li > ul {
        padding: 0;
    }
    
    .nav-container .mega-menu .title {
        padding: 10px 30px;
        color: #64748b;
        font-size: 10px;
        margin-bottom: 0;
        background: #f1f5f9;
    }
    
    .nav-container .mega-menu ul li a {
        padding: 12px 30px;
        border-radius: 0;
        font-size: 15px;
    }
    
    .nav-container .mega-menu ul li a:hover {
        transform: none;
        background: #e2e8f0;
    }
}

/* ============================================
   SMALL MOBILE (below 576px)
   ============================================ */
@media (max-width: 575px) {
    .nav-container .header-logo img {
        height: 40px;
    }
}

/* ============================================
   MAIN CONTAINER SPACING
   ============================================ */
.main-container {
    padding-top: 70px;
    width: 100%;
}
