header{
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    height: 100px;
    z-index: 9999;
    display: flex;
    /* align-content: center; */
    width: 100%;
    display: block;
    background-color: aliceblue;
}
header.page-scroll{
    /* top: 50px; */
}
header.page-scroll{
    background-color: #fff !important;
}
header.page-scroll .logo-img{
    height: 50px;
    transition: 0.3s;
}
header .container{
    /* margin-top: 10px !important; */
    max-width: 1600px;
    margin: auto;
    overflow: visible;
}
header .menu-inner{
    position: relative;
    max-width: 97%;
}
header .logo{
    position: absolute;
    left: 20px;
    top: 30px;
}
header .menu-icon{
    width: 35px;
    height: 35px;
    background-image: url('/wp-content/themes/four-c-consulting/assets/images/menu-closed.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    right: 20px;
    top: 40px;
    opacity: 1;
    transition: 0.3s;
}
header .menu-icon:hover{
    cursor: pointer;
}
header .logo-img{
    height: 150px;
    transition: 0.3s;
}
header .logo-img:focus,
header .logo-img:focus-visible,
header .logo a:focus,
header .logo a:focus-visible{
    outline: none;
}
header .wp-block-navigation.main-menu {
    position: absolute;
    top: 100%;
    right: 0px;
    bottom: 0;
    background-color: var(--navy);
    display: flex;
    flex-direction: column;
    /* justify-content: center;
    align-items: center; */
    width: 400px;


    /* Slide out to the right (off screen) */
    transform: translateX(100%);
    /* opacity: 0; */
    opacity: 1;

    /* transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out; */
    z-index: 1001;
    transition: 0.5s !important;
    margin-right: -100%;
}
header .main-menu.open{
    right: -40px;
    top: 0px;
}
header .main-menu .nav-outer{
    display: none;
}
header .main-menu.open .nav-outer{
    display: block;
    padding-top: 90px;
}
header .main-menu.open {

    transform: translateX(0);
    opacity: 1;
    z-index: 1001;
    background-color: var(--navy);
    height: 100vh;
    margin-right: 0px;
    transition: 0.5s;
}



header .menu-inner.open .menu-icon{
    opacity: 0;
    transition: 0.3s;
}
header .close-icon{
    position: absolute;
    top: 50px;
    right: 60px;
    width: 30px;
    height: 30px;
    opacity: 0;
    transition: .2s;
    background-image: url('/wp-content/themes/four-c-consulting/assets/images/menu-open.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    
}
header .close-icon:hover{
    cursor: pointer;
    transform: rotate(360deg);
    color: var(--titanBlue);
    transition: .2s;
}
header .menu-inner.open .close-icon{
    opacity: 1;
    transition: 2.5s;
}
header .menu-inner.open .close-icon{
    z-index: 10000;
}
header .header .menu-icon{
    z-index: 10;
}

header .main-menu li{
    flex-basis: 100%;
    justify-content: center;
    margin-bottom: 10px;
}
header .main-menu li a:focus,
header .main-menu li a:focus-visible{
    outline: unset;
}

header .search-icon{
    width: 35px;
    height: 35px;
    background-image: url('/wp-content/themes/four-c-consulting/assets/images/search-icon.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    right: 100px;
    top: 40px;
    position: absolute;
    right: 0px;
    top: 0px;
}
header .search-inner form input.search-submit{
    background-image: url('/wp-content/themes/four-c-consulting/assets/images/search-icon.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 35px;
    height: 35px;
    background-color: transparent;
    border: unset;
    position: absolute;
    right: 0px;
    z-index: 100;
}
header .search-bar{
    position: absolute;
    right: 100px;
    top: 40px;
    max-width: 250px;
    width: 100%;
    display: flex;
    justify-content: right;
    height: 50px;
}
header .search-bar .search-inner{
    position: relative;
}
header .search-field{
    position: absolute;
    right: 60px;
    background: transparent;
    border: unset;
    border-bottom: 1px solid #000;
    height: 50px;
    color: #000;
    top: -7px;
}
header .search-inner form input.search-submit:focus,
header .search-inner form input.search-submit:focus-visible,
header .search-field:focus,
header .search-field:focus{
    outline: unset;
}

header .search-inner form input.search-submit{
    display: none;
}
header .search-bar.active .search-inner form input.search-submit{
    display: block;
    transition: 0.5s;
}
header .search-field{
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
header .search-bar{
    overflow: hidden;
    transition: 0.3s;
}
header .search-bar.active{
    overflow: visible;
    transition: 0.3s;
}
header .search-bar.active .search-field{
    transform: translateY(0%);
    opacity: 1;
}
.search-bar input[type="search"]::-webkit-search-cancel-button {
    filter: invert(1); /* Inverts the color (white on dark backgrounds) */
    cursor: pointer;
}
header .services-link{
    color: var(--blue);
    position: relative;
}
header .sectors-link{
    color: var(--green);
    position: relative;
}
header .services-link:hover,
header .sectors-link:hover{
    cursor: pointer;
}

header .services-link::after,
header .sectors-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    height: 4px;
    width: 0; /* Start from 0 width */
    background: linear-gradient(37deg, rgb(0,209,135) 17%, rgba(0,72,255,0.75) 100%, rgb(0,73,255) 100%);
    transition: width 0.3s ease-in-out;
}

header .services-link:hover::after,
header .sectors-link:hover::after {
    width: 100%; /* Animate to full width on hover */
}
header .main-links{
    position: absolute;
    right: 150px;
    top: 28px;
    transition: 0.3s;
    display: flex;
    gap: 20px;
    height: 60px;
    display: flex;
    align-items: center;
    z-index: 10;
    width: 200px;
    justify-content: center;
}
header .main-links.active{
    right: 350px;
    transition: 0.3s;
}

.search-bar input[type="search"]::-webkit-input-placeholder {
    color: #000;
  }
  
.search-bar input[type="search"]::-moz-placeholder {
    color: #000;
  }
  
.search-bar input[type="search"]:-ms-input-placeholder {
    color: #000;
  }
  
.search-bar input[type="search"]::placeholder {
    color: #000;
  }


.search-bar .main-links{
    position: absolute;
    right: 70px;
    top: 5px;
    display: flex;
    gap: 20px;
    transition: 0.5s;
}
.search-bar.active .main-links{
    right: 270px;
}
/* Editor styling  */
.editor-visual-editor .menu-outer a{
    color: #000;
}

/* Closing animation state */
header .main-menu.closing {
    transform: translateX(100vw); /* Use viewport width to slide completely off screen */
    opacity: 1;
    background-color: var(--navy);
    height: 100vh;
    margin-right: 0px;
    transition: transform 0.5s ease-in-out;
    right: 0; /* Ensure it starts from the right edge */
}

/* Ensure the menu inner close icon fades out during closing */
header .menu-inner .close-icon {
    transition: opacity 0.3s ease-in-out;
}

header .menu-inner:not(.open) .close-icon {
    opacity: 0;
}

/* Mobile Styles */



/* Update these existing CSS rules to fix the close icon */

/* Change from header .close-icon to target the correct location */
header .nav-outer .close-icon{
    position: absolute;
    top: 100px;
    right: 90px;
    width: 30px;
    height: 30px;
    opacity: 0;
    transition: .2s;
    background-image: url('/wp-content/themes/four-c-consulting/assets/images/menu-open.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

header .nav-outer .close-icon:hover{
    cursor: pointer;
    transform: rotate(360deg);
    color: var(--titanBlue);
    transition: .2s;
}

/* Update the open state selectors */
header .main-menu.open .nav-outer .close-icon{
    opacity: 1;
    transition: 2.5s;
    z-index: 10000;
}

/* Alternative approach - keep existing structure but fix the positioning */
header .close-icon{
    position: fixed; /* Change from absolute to fixed */
    top: 50px;
    right: 60px;
    width: 30px;
    height: 30px;
    opacity: 0;
    transition: .2s;
    background-image: url('/wp-content/themes/four-c-consulting/assets/images/menu-open.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 10001; /* Ensure it's above everything */
}

header .close-icon:hover{
    cursor: pointer;
    transform: rotate(360deg);
    color: var(--titanBlue);
    transition: .2s;
}

header .main-menu.open .close-icon{
    opacity: 1;
    transition: 2.5s;
}

/* Remove conflicting rules */
header .menu-inner.open .close-icon{
    opacity: 1;
    transition: 2.5s;
}

header .menu-inner.open .close-icon{
    z-index: 10000;
}

@media screen and (max-width: 800px){
    header .search-bar{
        right: 70px;
    }
    header .logo{
        top: 40px;
        width: 50px;
        height: 50px;
        display: flex;
    }
    header.page-scroll .logo{
        display: block;
        top: 30px;
    }
    .search-bar .main-links{
        display: none;
    }
    header .main-links{
        display: none;
    }
    header .logo-img{
        max-width: 100%;
        height: auto;
    }
}
@media (max-width: 768px) {
    .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background: #444;
        width: 100%;
        padding: 10px;
    }

    .main-nav.open {
        display: flex;
    }

    .hamburger-menu {
        display: block;
    }
    header .main-menu.open{
        /* right: 0px; */
    }
    header .close-icon{
        /* right: 20px; */
    }
    header .main-menu{
        width: 80%;
    }
}

@media screen and (max-width: 400px){
    header .menu-outer{
        padding-left: 20px;
    }
}

