/* Header Alignment Fixes */

/* Fix main menu area alignment */
.header-layout2 .menu-area .row {
    align-items: center;
    justify-content: space-between;
}

/* Ensure header logo is properly aligned */
.header-layout2 .header-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Fix main menu vertical alignment */
.header-layout2 .main-menu {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-layout2 .main-menu > ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-layout2 .main-menu > ul > li {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-layout2 .main-menu > ul > li > a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 20px 0;
    line-height: 1;
}

/* Fix header button alignment */
.header-layout2 .header-button {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 15px;
}

.header-layout2 .header-button .icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-layout2 .header-button .th-btn {
    display: flex;
    align-items: center;
    margin: 0;
    white-space: nowrap;
}

/* Ensure consistent height for menu area */
.header-layout2 .menu-area {
    min-height: 80px;
}

/* Fix container alignment */
.header-layout2 .menu-area .container {
    height: 100%;
}

.header-layout2 .menu-area .container .row {
    height: 100%;
    min-height: 80px;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
    .header-layout2 .main-menu > ul > li {
        margin: 0 10px;
    }
    
    .header-layout2 .header-button {
        gap: 10px;
    }
}

@media (max-width: 991px) {
    .header-layout2 .menu-area {
        min-height: 70px;
    }
    
    .header-layout2 .menu-area .container .row {
        min-height: 70px;
    }
}

/* Fix logo positioning */
.header-layout2 .header-logo img {
    max-height: 50px;
    width: auto;
}

/* Ensure proper vertical centering for all elements */
.header-layout2 .col-auto {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Additional fixes for menu alignment and single line display */
.th-header .menu-area {
    padding: 0;
}

.th-header .menu-area .container {
    max-width: 100%;
    padding: 0 15px;
}

.th-header .menu-area .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin: 0;
}

.th-header .main-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.th-header .main-menu > ul {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
    white-space: nowrap;
}

.th-header .main-menu > ul > li {
    display: inline-flex;
    align-items: center;
    margin: 0 8px;
    position: relative;
}

.th-header .main-menu > ul > li > a {
    display: flex;
    align-items: center;
    padding: 25px 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #0d0e0f;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.th-header .main-menu > ul > li > a:hover {
    color: #04CE78;
}

.th-header .header-button {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.th-header .header-logo {
    flex-shrink: 0;
}

/* Responsive adjustments for better menu display */
@media (max-width: 1400px) {
    .th-header .main-menu > ul > li {
        margin: 0 6px;
    }
    
    .th-header .main-menu > ul > li > a {
        font-size: 13px;
        padding: 20px 0;
    }
}

@media (max-width: 1200px) {
    .th-header .main-menu > ul > li {
        margin: 0 4px;
    }
    
    .th-header .main-menu > ul > li > a {
        font-size: 12px;
        padding: 18px 0;
    }
}

/* Ensure submenu positioning */
.th-header .main-menu ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 15px rgba(1, 15, 28, 0.06);
    border-radius: 0;
    min-width: 230px;
    padding: 18px 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
}

.th-header .main-menu > ul > li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.th-header .main-menu ul.sub-menu li {
    display: block;
    margin: 0;
    padding: 5px 0;
}

.th-header .main-menu ul.sub-menu li a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: #0d0e0f;
    text-transform: capitalize;
    font-weight: 500;
    white-space: normal;
}

.th-header .main-menu ul.sub-menu li a:hover {
    color: #04CE78;
    padding-left: 10px;
}

/* Force single line layout for all header layouts */
.th-header .menu-area .container .row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
}

.th-header .col-auto:nth-child(2) {
    flex: 1;
    display: flex;
    justify-content: center;
}

.th-header .main-menu.d-none.d-lg-inline-block {
    display: flex !important;
    width: 100%;
    justify-content: center;
}

/* Ensure menu items don't wrap */
.th-header .main-menu > ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
}

.th-header .main-menu > ul > li {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Adjust spacing for better fit */
@media (min-width: 1200px) {
    .th-header .main-menu > ul > li {
        margin: 0 10px;
    }
}

@media (min-width: 1400px) {
    .th-header .main-menu > ul > li {
        margin: 0 15px;
    }
}

@media (min-width: 1600px) {
    .th-header .main-menu > ul > li {
        margin: 0 20px;
    }
}

/* Ensure header button area doesn't interfere */
.th-header .header-button {
    flex-shrink: 0 !important;
    margin-left: auto;
}

/* Fix for specific header layout if needed */
.header-layout2 .main-menu > ul > li,
.header-layout1 .main-menu > ul > li,
.header-layout3 .main-menu > ul > li {
    display: inline-flex !important;
    align-items: center !important;
}

/* Prevent menu from breaking on smaller screens */
@media (max-width: 1199px) {
    .th-header .main-menu > ul > li > a {
        font-size: 12px !important;
        padding: 15px 0 !important;
    }
    
    .th-header .main-menu > ul > li {
        margin: 0 3px !important;
    }
}