/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header Structure */
.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    top: 0;
    z-index: 9999;
    transition: box-shadow 0.3s ease;
}

/* Add shadow when scrolled */
.main-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Top Bar - Logo and Actions */
.top-bar {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.top-bar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.top-right-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.top-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
    white-space: nowrap;
}

.btn-primary {
    background: #1B3764;
    color: #fff;
}

.btn-primary:hover {
    background: #132849;
}

.btn-secondary {
    background: transparent;
    color: #1B3764;
    border: 2px solid #1B3764;
}

.btn-secondary:hover {
    background: #1B3764;
    color: #fff;
}

/* Navigation Bar */
.nav-bar {
    background: #fff;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logos in Navigation Bar */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 80px;
    width: auto;
}

.logo-left {
    order: 1;
}

.logo-left img {
    height: 80px;
}

.logo-right {
    order: 3;
}

.logo-right img {
    height: 40px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
    background: transparent;
    outline: none;
    box-shadow: none;
}

.mobile-menu-toggle:hover span {
    background: #333;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: #333;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 0;
}

/* Arial-style X icon when menu is open */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    width: 28px;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    width: 28px;
}

/* Main Navigation */
.main-nav {
    flex: 1;
    order: 2;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 20px 0;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #1B3764;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -30px;
    transform: none;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    min-width: 220px;
    border-radius: 8px;
    padding: 10px 0;
    margin-top: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

/* Desktop: show dropdown on hover (JS also adds .active on click) */
@media (min-width: 993px) {
    .has-dropdown:hover .dropdown-menu,
    .has-dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
    }
}

.dropdown-menu li {
    padding: 0;
    position: relative;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: #555;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background: #f8f9fa;
    color: #1B3764;
    padding-left: 25px;
}

/* Sub-navigation for Services */
.has-sub {
    position: relative;
}

.has-sub > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.arrow {
    margin-left: 10px;
    font-size: 16px;
    transition: transform 0.3s;
}

.sub-dropdown {
    position: absolute;
    top: 0;
    left: 0;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    min-width: 220px;
    border-radius: 8px;
    padding: 10px 0;
    z-index: 9999;
}

/* Desktop: position sub-dropdown flush next to parent item */
@media (min-width: 993px) {
    .sub-dropdown {
        top: 0;
        left: 100%;
        margin-left: -10px;
        right: auto;
    }

    .has-sub:hover .sub-dropdown,
    .has-sub.active .sub-dropdown {
        opacity: 1;
        visibility: visible;
    }
}

.sub-dropdown li a {
    padding: 12px 20px;
    color: #555;
    font-size: 14px;
}

.sub-dropdown li a:hover {
    background: #f8f9fa;
    color: #1B3764;
    padding-left: 25px;
}

/* Mobile Actions (hidden on desktop) */
.mobile-actions {
    display: none;
}

/* Mobile menu header (hidden on desktop) */
.mobile-menu-header {
    display: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
        z-index: 2001;
        order: 3;
    }

    /* Keep toggle button visible and in fixed position when menu is open */
    .mobile-menu-toggle.active {
        position: fixed;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 4px;
        padding: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    /* Hide right logo on mobile */
    .logo-right {
        display: none;
    }

    /* Adjust left logo */
    .logo-left {
        order: 1;
    }

    .logo-left img {
        height: 60px;
    }

    /* Hide top actions on mobile */
    .top-actions {
        display: none;
    }

    .btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #fff;
        padding: 0;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s;
        order: 2;
    }
    
    .main-nav.active {
        transform: translateX(0);
    }

    /* Mobile menu header with logo */
    .mobile-menu-header {
        display: none;
    }

    .main-nav.active .mobile-menu-header {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 80px;
        background: #fff;
        border-bottom: 2px solid #e5e5e5;
        z-index: 2000;
        padding: 0 20px;
    }

    .mobile-menu-logo {
        display: flex;
        align-items: center;
        height: 100%;
    }

    .mobile-menu-logo img {
        height: 50px;
        width: auto;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 100px 0 20px 0;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid #eee;
        padding: 0 20px;
    }
    
    .nav-link {
        padding: 15px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #333;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        min-width: auto;
        max-width: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out, opacity 0.3s;
        opacity: 0;
        visibility: visible;
        transform: none;
        left: auto;
        display: flex;
        flex-direction: column;
    }
    
    /* Mobile: never open dropdowns on hover, only on click via .active class */
    .has-dropdown:hover .dropdown-menu,
    .has-sub:hover .sub-dropdown {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
    }

    .has-dropdown.active .dropdown-menu {
        max-height: 2000px;
        opacity: 1;
        visibility: visible;
        padding: 5px 0 10px 0;
    }

    .dropdown-menu li a {
        padding: 10px 0;
        color: #333;
        font-size: 14px;
        white-space: normal;
    }

    .dropdown-menu li a:hover {
        padding-left: 5px;
        background: transparent;
        color: #1B3764;
    }

    /* Sub-navigation in mobile */
    .sub-dropdown {
        position: static !important;
        left: 0 !important;
        top: auto !important;
        transform: none !important;
        min-width: 0 !important;
        width: 100% !important;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: visible !important;
        transition: max-height 0.5s ease-in-out, opacity 0.3s;
        background: #f8f9fa;
        margin: 0;
        display: block !important;
    }

    .has-sub.active .sub-dropdown {
        max-height: 1000px;
        opacity: 1;
        visibility: visible !important;
        padding: 5px 0 10px 0;
        margin-top: 5px;
    }

    .arrow {
        display: inline-block;
        transition: transform 0.3s;
        font-weight: bold;
        font-size: 18px;
    }

    .has-sub.active .arrow {
        transform: rotate(90deg);
    }

    .has-sub > a,
    .has-sub > .sub-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: 600;
        color: #333;
    }

    .sub-dropdown li a {
        padding: 8px 0 8px 15px;
        font-size: 13px;
        color: #333 !important;
        font-weight: normal;
        display: block;
    }

    .sub-dropdown li a:hover {
        color: #1B3764;
        background: transparent;
    }

    /* Show mobile actions */
    .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 0 20px 30px 20px;
        padding-top: 20px;
        border-top: 2px solid #e5e5e5;
    }

    .btn-mobile {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .top-bar-container {
        padding: 6px 15px;
    }

    .logo-left img {
        height: 60px;
    }

    .logo-right img {
        height: 40px;
    }

    .top-actions {
        gap: 8px;
    }

    .btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .logo-left img {
        height: 50px;
    }

    .logo-right img {
        height: 35px;
    }

    .btn {
        padding: 4px 8px;
        font-size: 10px;
    }
}


/* =============================================
   Footer Fix - Force footer to full height on mobile
   Overrides Elementor theme builder fixed height
   ============================================= */
.elementor-theme-builder-content-area {
    height: auto !important;
}
/* =============================================
   Body offset for fixed header
   ============================================= */
body {
    padding-top: 130px;
}

@media (max-width: 992px) {
    body {
        padding-top: 90px;
    }
}

