/**
 * Header V2 Styles - Center-Aligned Logo with Split Navigation
 * Logo in center, 2 nav items left, 2 nav items right
 */

/* ==========================
   TOP BAR
   ========================== */

.headerTop {
    background: var(--header-top-bar-color, var(--color-primary)) !important;
    padding: 0px 0px !important;
    transition: background 0.3s ease;
}

.headerTop .top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.headerTop .top li {
    margin: 0;
}

.headerTop .top li a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.headerTop .top li a:hover {
    opacity: 0.8;
}

.headerTop .top li a i {
    margin-right: 5px;
}

/* ==========================
   MAIN HEADER
   ========================== */

.main-header {
    background: var(--header-background, #ffffff) !important;
    padding: 11px 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 75px;
}

/* ==========================
   CENTER LOGO
   ========================== */

.logo-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.logo-center:hover {
    transform: translateX(-50%) scale(1.05);
}

.logo-center img {
    max-height: 75px;
    height: auto;
    width: auto;
}

/* ==========================
   LEFT NAVIGATION
   ========================== */

.nav-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.nav-left ul {
    display: flex;
    gap: 35px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-left li {
    margin: 0;
}

.nav-left li a {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    color: black;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
    display: inline-block;
}

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

.nav-left li a:hover {
    color: var(--color-primary);
}

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

/* ==========================
   RIGHT NAVIGATION
   ========================== */

.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-right ul {
    display: flex;
    gap: 35px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-right li {
    margin: 0;
    position: relative;
}

.nav-right li a {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    color: black;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
    display: inline-block;
}

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

.nav-right li a:hover {
    color: var(--color-primary);
}

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

/* ==========================
   DROPDOWN MENU
   ========================== */

.nav-right li.dropdown {
    position: relative;
}

.nav-right .dropPanel {
    position: absolute;
    top: 100%;
    left: 0;
    background: white !important;
    min-width: 220px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
    margin: 0;
    margin-top: 10px;
    z-index: 100;
}

.nav-right li.dropdown:hover .dropPanel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-right .dropPanel li {
    margin: 0;
}

.nav-right .dropPanel li a {
    padding: 10px 20px;
    display: block;
    font-size: 14px;
    white-space: nowrap;
    color: var(--color-text) !important;
}

.nav-right .dropPanel li a::after {
    display: none;
}

.nav-right .dropPanel li a:hover {
    background: rgba(255, 136, 26, 0.05);
    color: var(--color-primary) !important;
}

.nav-right .dropPanel li a i {
    color: var(--color-primary);
}

.nav-right .dropPanel li a i {
    margin-right: 8px;
    font-size: 12px;
}

/* ==========================
   MOBILE MENU BUTTON
   ========================== */

.menuBtn {
    display: none;
    font-size: 24px;
    color: #000000 !important;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    text-decoration: none;
    z-index: 1001;
}

.menuBtn:hover {
    opacity: 0.7;
}

.menuBtn i {
    color: #000000 !important;
}

/* Mobile Menu Panel */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: white;
    z-index: 10000;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

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

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-menu-close {
    font-size: 24px;
    color: var(--color-text);
    cursor: pointer;
    padding: 5px;
    text-decoration: none;
}

.mobile-menu-nav {
    padding: 20px 0;
}

.mobile-menu-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block !important;
    width: 100%;
}

.mobile-menu-nav > ul > li {
    border-bottom: 1px solid #f0f0f0;
    display: block !important;
    width: 100% !important;
    float: none !important;
}

.mobile-menu-nav > ul > li > a {
    display: block;
    padding: 15px 20px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.mobile-menu-nav > ul > li > a:hover {
    background: rgba(255, 136, 26, 0.05);
    color: var(--color-primary);
}

.mobile-menu-nav > ul > li > a i {
    float: right;
    margin-top: 3px;
    transition: transform 0.3s ease;
}

.mobile-dropdown.active > a i {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
}

.mobile-dropdown.active .mobile-submenu {
    max-height: 200px;
}

.mobile-submenu li a {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #666;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
}

.mobile-submenu li a:hover {
    background: rgba(255, 136, 26, 0.08);
    color: var(--color-primary);
}

.mobile-submenu li a i {
    color: var(--color-primary);
    margin-right: 8px;
}

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

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

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* ==========================
   RESPONSIVE STYLES
   ========================== */

@media (max-width: 991px) {
    /* Top Bar */
    .headerTop {
        padding: 8px 0 !important;
    }

    .headerTop .top {
        font-size: 13px;
    }

    /* Reset logo to static position */
    .logo-center {
        position: static;
        transform: none;
        order: 1;
        flex: 1;
    }

    .logo-center:hover {
        transform: scale(1.05);
    }

    .logo-center img {
        max-height: 55px;
    }

    /* Hide desktop navigation */
    .nav-left,
    .nav-right {
        display: none;
    }

    /* Show mobile menu button */
    .menuBtn {
        display: block;
        order: 2;
    }

    /* Adjust header layout */
    .header-layout {
        justify-content: space-between;
        min-height: 55px;
    }

    .main-header {
        padding: 12px 0;
    }
}

@media (max-width: 768px) {
    /* Hide top bar on small screens */
    .headerTop {
        padding: 6px 0 !important;
    }

    .headerTop .top {
        font-size: 12px;
        gap: 15px;
    }

    .headerTop .top li a i {
        font-size: 12px;
    }

    .logo-center img {
        max-height: 50px;
    }

    .main-header {
        padding: 10px 0;
    }

    .header-layout {
        min-height: 50px;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    .headerTop {
        display: none;
    }

    .logo-center img {
        max-height: 45px;
    }

    .main-header {
        padding: 10px 0;
    }

    .menuBtn {
        font-size: 22px;
    }
}

@media (max-width: 375px) {
    /* Very small devices */
    .logo-center img {
        max-height: 40px;
    }

    .main-header {
        padding: 8px 0;
    }

    .header-layout {
        min-height: 45px;
    }
}
