/* Added by Agent for layout fixes */

/* Universal Flex Helper */
.display-flex-center {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end;
    /* Align to right side */
    flex-wrap: nowrap !important;
    /* PREVENT WRAPPING */
}

/* 1. Reset Menu Area Width and Alignment */
.rs-menu-area {
    width: 100%;
    /* Ensure it acts as a flex container */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

/* 2. Fix the Main Menu container */
.rs-menu-area .main-menu {
    /* Reset block width */
    width: auto !important;
    min-width: auto !important;
    flex-shrink: 0;
    /* Prevent shrinking if possible */
    margin-right: 15px;
    /* Spacing between menu and icons */
}

/* 3. Fix the inner RS Menu (the nav element) */
.rs-menu-area .main-menu .rs-menu {
    width: auto !important;
    float: none !important;
    clear: none !important;
    display: block !important;
    /* Or flex, but block inside flex item is fine */
}

/* Remove excessively large right padding that might force wrapping */
.rs-menu.pr-70,
.rs-menu.lg-pr-50,
.rs-menu.md-pr-0 {
    padding-right: 0 !important;
}

/* 4. Fix Icons Container */
.expand-btn-inner.display-flex-center {
    flex-shrink: 0;
    /* Don't shrink icons */
}

/* Search Icon List */
.expand-btn-inner ul {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.expand-btn-inner ul li.sidebarmenu-search {
    list-style: none;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

/* Social Icons */
.toolbar-sl-share ul.social {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
}

.toolbar-sl-share ul.social li {
    margin-left: 10px;
}

.toolbar-sl-share ul.social li:first-child {
    margin-left: 0;
}

/* Icon Colors & Visibility - ensure they stand out against blue header */
.expand-btn-inner .rs-search i,
.toolbar-sl-share ul.social li a {
    color: #ffffff !important;
    /* Make white to contrast with blue header */
    font-size: 16px;
    opacity: 1;
}

/* Hover effects */
.expand-btn-inner .rs-search i:hover,
.toolbar-sl-share ul.social li a:hover {
    color: #000000 !important;
    /* Hover color */
}


/* Sticky Header Adjustments */
/* When sticky, background is usually white, so icons need to be dark */
.menu-area.sticky .expand-btn-inner .rs-search i,
.menu-area.sticky .toolbar-sl-share ul.social li a {
    color: #101010 !important;
}

/* Header Logo Visibility Fix */
.menu-area .logo-part .normal-logo {
    display: flex !important;
}

.menu-area .logo-part .sticky-logo {
    display: none !important;
}

.menu-area.sticky .logo-part .normal-logo {
    display: none !important;
}

.menu-area.sticky .logo-part .sticky-logo {
    display: flex !important;
    color: #101010 !important;
}

/* Ensure logo part is always visible */
.menu-area .logo-part {
    display: block !important;
}

/* Normal state (transparent header) - Initial Load */
.rs-header.header-transparent .menu-area .logo-part .normal-logo {
    display: block !important;
    color: #ffffff !important;
}

.rs-header.header-transparent .menu-area .logo-part .sticky-logo {
    display: none !important;
}

/* Sticky state - On Scroll - TARGETING .menu-area.sticky */
.rs-header .menu-area.sticky .logo-part .normal-logo {
    display: none !important;
}

.rs-header .menu-area.sticky .logo-part .sticky-logo {
    display: block !important;
    color: #101010 !important;
}

/* Ensure container is visible */
.full-width-header .rs-header.style3 .menu-area .logo-part {
    display: block !important;
}


/* Mobile Responsive Adjustments */
@media only screen and (max-width: 991px) {
    .col-lg-3 {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .menu-area .logo-part {
        display: block;
    }

    .logo-part {
        max-width: 80%;
    }
}