/*** Announcement Bar ***/
.announcement-bar {
    background-color: var(--yellow);
    padding: 0.5rem 2rem;
    display: block;
    max-width: 1440px;
    margin: 0 auto;
    margin-top: 0.25rem;
    border-radius: var(--radius-medium);
}

.announcement-bar.hidden {
    display: none;
}

.announcement-bar-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.announcement-bar-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.announcement-bar-content p.announcement-message {
    margin: 0;
    padding: 0;
    color: var(--blue-navy);
    text-align: center;
}

.announcement-bar-content .announcement-link {
    color: var(--blue-navy);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.announcement-bar-content .announcement-link:hover {
    opacity: 0.7;
}

.announcement-bar-content .announcement-link-full {
    color: var(--blue-navy);
    text-decoration: none;
    transition: opacity 0.2s ease;
    display: block;
}

.announcement-bar-content .announcement-link-full:hover {
    opacity: 0.8;
}

.announcement-bar-content .announcement-link-full p {
    margin: 0;
}

.announcement-close {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
    padding: 0;
    color: var(--blue-navy);
}

.announcement-close:hover {
    opacity: 0.6;
}

.announcement-close svg {
    width: .75rem;
    height: .75rem;
    display: block;
}

/* Mobile responsive */
@media screen and (max-width: 1000px) {
    .announcement-bar {
        padding: 0.5rem 1rem;
    }
}

@media screen and (max-width: 768px) {
    .announcement-bar-container {
        gap: 1rem;
    }
    
    .announcement-bar-content {
        gap: 0.375rem;
        flex-direction: column;
    }
    
    .announcement-close {
        width: .875rem;
        height: .875rem;
    }
    
    .announcement-close svg {
        width: .75rem;
        height: .75rem;
    }
}

/*** Header ***/
.header-wrapper {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 9999;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    padding-top: 2.25rem;
    padding-top: 50px;
    transition: padding-top 0.3s ease;
}

.header-wrapper.is-scrolled {
    padding-top: 0;
}

.logged-in.admin-bar .header-wrapper {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .logged-in.admin-bar .header-wrapper {
        top: 46px;
    }
}

.site-header {
    background-color: var(--green);
    border-radius: var(--radius-medium);
    padding: 1rem 2rem;
    max-width: 1440px;
    margin: 0 auto;
}

header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo */
header .logo {
    width: auto;
    height: 2.5rem;
    display: block;
}

header .logo-wrapper a {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
}

/* Navigation */
header .navigation-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    flex: 1;
}

header nav.main-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
}

header nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
}

header nav ul li {
    position: relative;
}

header nav ul li:hover, header .menu-item .submenu-toggle:hover {
    cursor: pointer;
}

header nav ul a,
header nav ul a.menu-link {
    display: block;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    color: var(--blue-navy);
    text-decoration: none;
}

header nav .menu-item.current-menu-item a, header nav .menu-item a:hover {
    /* color: var(--blue-navy); */
}

header nav .menu-item.current-menu-item a {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.menu-item.current-menu-item a div {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

header nav .menu-item a:hover {
    cursor: pointer;
    opacity: 0.8;
}

/* Header Actions */
header .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: static;
}

header .header-actions-mobile {
    display: none;
    align-items: center;
    gap: 1rem;
}

.globe-button-wrapper {
    position: relative;
}

/* Globe Icon Button */
header .globe-icon-button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--blue-navy);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    position: relative;
}

header .globe-icon-button:hover {
    opacity: 0.9;
}

header .globe-icon-button.active,
header .globe-icon-button[aria-expanded="true"] {
    background-color: var(--white);
    outline: 1px solid var(--blue-navy);
    outline-offset: 4px;
}

header .globe-icon-button svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    fill: var(--white);
}

header .globe-icon-button.active svg path,
header .globe-icon-button[aria-expanded="true"] svg path {
    fill: var(--blue-navy);
}

/* Webship Button */
header .webship-button {
    background-color: var(--blue-navy);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-medium);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

header .webship-button:hover {
    opacity: 0.9;
    color: var(--white);
}

header .webship-button svg {
    height: 1.25rem;
    width: auto;
    display: block;
}

header .webship-button svg path {
    fill: var(--white);
}

/* Responsive Header Styles */
@media screen and (min-width: 1001px) {
    header .header-actions {
        display: flex;
    }
    
    header .header-actions-mobile {
        display: none;
    }
    
    header .menu-toggle {
        display: none;
    }
    
    header .main-menu-wrapper {
        display: block;
    }
}

@media screen and (max-width: 1000px) {
    /* Hide desktop elements */
    header .header-actions {
        display: none;
    }
    
    header .main-menu-wrapper {
        display: none;
    }
    
    /* Show mobile elements */
    header .header-actions-mobile {
        display: flex;
    }
    
    header .menu-toggle.hamburger-button {
        display: flex;
    }
    
    /* Mobile header adjustments */
    .header-wrapper {
        padding: 0.75rem;
    }
    
    .site-header {
        padding: 0.75rem 1rem;
    }
    
    header .logo {
        height: 2rem;
    }
    
    header .header-inner {
        gap: 1rem;
    }
    
    header .navigation-wrapper {
        gap: 0.75rem;
    }
}

header .menu-item.menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    padding-right: 0.25rem;
}

header nav ul .menu-item-has-children {
    /* padding-right: 1.5rem; */
}

header nav ul li {
    display: flex;
    align-items: center;
    justify-content: center;
}

header nav ul.sub-menu li, header nav ul.sub-menu li a {
    width: 100%;
}

header .menu-item .submenu-toggle {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    padding-top: 4px;
    padding-left: 0px;
}

header .menu-item .submenu-toggle svg {
    display: block;
    width: 1rem;
    height: auto;
}

.sub-menu {
    text-align: center;
    background-color: #E8E8E8;
    margin-top:15px;
}

/* catch cursor so submenu does not disapear */

.sub-menu::before {
    content: "";
    position: absolute;
    top: -20px; /* Matches the distance of your gap */
    left: 0;
    width: 100%;
    height: 20px;
    display: block;
  }

.sub-menu .menu-link {
    color: var(--green);
}

.main-menu-mobile .sub-menu .menu-item-title {
    color: var(--blue-navy);
}

header .menu-item.em-active {
    position: relative;
    z-index: 9999;
}

/*** Mobile Menu Toggle ***/
header .menu-toggle {
    display: none;
    padding: 0;
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
}

header .menu-toggle.hamburger-button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--white);
    border: 2px solid transparent;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

header .menu-toggle.hamburger-button:hover {
    opacity: 0.9;
}

header .menu-toggle.hamburger-button.active,
header .menu-toggle.hamburger-button[aria-expanded="true"],
body.menu-open header .menu-toggle.hamburger-button {
    outline: 1px solid var(--blue-navy);
    outline-offset: 4px;
}

header .menu-toggle.hamburger-button svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

.menu-item-has-children a {
    position: relative;
}

/*** Submenu ***/
.main-navigation ul.sub-menu {
    display: none; /* Hide submenus by default */
    position: absolute;
    padding: 15px 0 15px 0;
    z-index: 200;
    border: 1px solid var(--blue-navy);
    background-color: var(--blue-navy);
    border-radius: 0px 0px 20px 20px ;
    opacity: 0;
    transition: all 0.3s ease;
    min-width: 10rem;
    z-index: -99999;
    max-height: 0;
    overflow: hidden;
    top: 102%;
    /* left: 0; */
}

/* Ensure submenu is visible when the parent menu item has aria-expanded="true" */
.menu-item[aria-expanded="true"] > .sub-menu {
    opacity: 1;
    display: block;
    z-index: 99999;
    max-height: 100rem;
    overflow: visible;
}

header nav ul.sub-menu li a {
    padding: 0.35rem 1.25rem;
    display: block;
}

header nav ul.sub-menu li a:hover {
    /* background-color: var(--blue-tint); */
    text-decoration: underline;
}

header .menu-item.menu-item-has-children:not(.mega-menu-trigger):hover ul.sub-menu {
    opacity: 1;
    display: block;
    z-index: 99999;
    max-height: 100rem;
    overflow: visible;
}

/* Ensure transitions are smooth when toggling submenus */
.menu-item[aria-expanded="true"] > .sub-menu {
    transition: all 0.3s ease;
    opacity: 1;
    max-height: 100rem;
    z-index: 99999;
    overflow: visible;
}

.menu-item[aria-expanded="false"] > .sub-menu {
    opacity: 0;
    max-height: 0;
    z-index: -99999;
    overflow: hidden;
}

body.menu-open .header-wrapper {
    z-index: 9999;
}

body .header-wrapper:hover {
    z-index: 9999;
}

/*** Mobile Menu Dropdown ***/
nav.menu-mobile {
    display: none;
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0.75rem;
    right: 0.75rem;
    background-color: var(--blue-navy);
    border-radius: var(--radius-medium);
    padding: 0;
    z-index: 9998;
    max-width: 1440px;
    margin: 0 auto;
    overflow: hidden;
}

@media screen and (min-width: 1001px) {
    nav.menu-mobile {
        display: none;
    }
}

@media screen and (max-width: 1000px) {
    body.menu-open nav.menu-mobile {
        display: block;
    }
}

nav.menu-mobile ul {
    padding: 1rem 0 0 0;
    list-style: none;
    margin: 0;
    display: block;
}
nav.menu-mobile ul.sub-menu {
    padding: 0;
}

.menu-mobile .menu-item {
    display: block;
    width: 100%;
    border: none !important;
    border-bottom: none !important;
}

.menu-mobile ul > .menu-item > .menu-item-inner {
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
}

.menu-mobile .menu-item > .menu-item-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 100%;
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
}

.menu-mobile .menu-item > .menu-item-inner > .menu-item-title, .menu-mobile .sub-menu .menu-item a {
    padding: 0.875rem 0.25rem 0.875rem 1.5rem;
    color: var(--green);
    font-weight: normal;
    font-size: 0.9rem;
    font-style: normal;
    font-synthesis: none;
    font-variant: normal;
    font-variation-settings: normal;
    font-size:18px;
    transform: none;
    text-decoration: none;
    display: block;
    width: auto;
    text-align: center;
    transition: opacity 0.2s ease;
}


.webship-container {
    /* padding: 0.875rem 0.25rem 0.875rem 1.5rem; */
    color: var(--green);
    font-weight: normal;
    font-size: 0.9rem;
    font-style: normal;
    font-synthesis: none;
    font-variant: normal;
    font-variation-settings: normal;
    font-size:18px;
    transform: none;
    text-decoration: none;
    display: block;
    width: auto;
    text-align: center;
    transition: opacity 0.2s ease;
    background-color: var(--green);
    border-radius: 10px;
    margin-left: 20px;
    margin-right: 20px;
}



.menu-mobile .menu-item > .menu-item-inner > .menu-item-title:hover {
    opacity: 0.8;
}

.menu-mobile .menu-item > .menu-item-inner > .menu-item-icon {
    display: none;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 1rem 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.webship-button-mobile {
    background-color: var(--green);
    color: var(--blue-navy);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-medium);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    display: block;
    transition: opacity 0.2s ease;
    margin-bottom: 0.5rem;
}

.webship-button-mobile:hover {
    opacity: 0.9;
    color: var(--blue-navy);
}

.webship-button-mobile svg {
    height: 1.5rem;
    width: auto;
    display: block;
    margin: 0 auto;
}

.webship-button-mobile svg path {
    fill: var(--blue-navy);
}

.mobile-menu-bottom-bar {
    width: 30%;
    height: 0.25rem;
    background-color: var(--white);
    border-radius: var(--radius-small);
    margin: 0 auto;
}

.menu-mobile .sub-menu svg {
    display: none;
}

.menu-mobile .sub-menu {
    display: none;
}

.has-children > div > button {
    background-color: var(--blue-navy);
    border: none;
}

#page > div.header-wrapper > nav > ul > li.menu-item.has-children > div > button > svg {
    width:1rem;
    height:1rem;
    cursor: pointer;
    margin-top: 5px;
}

/*rotate the icon when active */
.menu-item.active .menu-item-icon-mobile svg {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/*** Country Dropdown ***/
.country-dropdown {
    display: none;
    position: absolute;
    z-index: 10000;
    top: calc(100% + 0.25rem);
    width: 320px;
    background-color: var(--blue-navy);
    border-radius: var(--radius-medium);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#country-dropdown {
    right: 2.75rem;
}

@media screen and (min-width: 1441px) {
    #country-dropdown {
        right: calc((100vw - 1440px) / 2 + 2rem);
    }
}

.country-dropdown.active,
.country-dropdown[aria-hidden="false"] {
    display: block;
}

.country-dropdown-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.country-dropdown-header {
    padding: 1.25rem 1.5rem;
    background-color: var(--blue-navy);
    border-bottom: none;
}

.country-dropdown-title {
    font-family: 'Inter Tight', sans-serif;
    font-size: 1rem;
    font-weight: normal;
    color: var(--white);
    margin: 0;
    padding: 0;
    text-align: center;
}

.country-dropdown-list {
    flex: 1;
    margin: 0 .5rem 0 0.75rem;
    display: flex;
    padding-right: 0.75rem;
}

.country-list-wrapper {
    flex: 1;
    height: 400px !important;
    max-height: 400px;
}

.country-list-wrapper .simplebar-wrapper {
    height: 100%;
}

.country-list-wrapper .simplebar-mask,
.country-list-wrapper .simplebar-offset {
    height: 100%;
}

.country-list-wrapper .simplebar-content-wrapper {
    height: 100%;
    max-height: 100%;
}

.country-list-wrapper .simplebar-track.simplebar-vertical {
    width: 6px;
    right: -0.825rem;
}

.country-list-wrapper .simplebar-scrollbar {
    opacity: 1 !important;
}

.country-list-wrapper .simplebar-scrollbar:before {
    background-color: var(--green) !important;
    border-radius: 3px;
    left: 0;
    right: 0;
    opacity: 1 !important;
}

.country-list-wrapper .simplebar-content-wrapper {
    background-color: var(--white);
    border-radius: var(--radius-medium);
    overflow: hidden;
}

.country-list-wrapper .simplebar-content {
    overflow: hidden;
}

.country-list-wrapper .simplebar-track {
    margin: 20px 0;
}

.country-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.country-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.country-item:last-child {
    border-bottom: none;
}

.country-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--blue-navy);
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    width: 100%;
}

.country-link:hover,
.country-link:focus {
    background-color: #E8E8E8;
}

.country-item.active .country-link {
    background-color: #E8E8E8;
}

.country-flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.country-dropdown-footer {
    padding: 1.25rem 1.5rem 0.5rem;
    background-color: var(--blue-navy);
    border-top: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.global-home-link {
    display: block;
    color: var(--green);
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.9375rem;
    font-weight: normal;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    text-align: center;
    padding: 0 0 0.75rem 0;
    transition: opacity 0.2s ease;
}

.global-home-link:hover,
.global-home-link:focus {
    opacity: 0.8;
}

.country-dropdown-footer::after {
    content: '';
    width: 30%;
    height: 0.25rem;
    background-color: var(--white);
    border-radius: var(--radius-small);
    margin: 0 auto;
    display: block;
}

/* Mobile Country Dropdown */
@media screen and (max-width: 1000px) {
    #country-dropdown-mobile {
        position: absolute;
        top: calc(100% + 0.25rem);
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
        max-width: 1440px;
        margin: 0 auto;
    }
    
    #country-dropdown {
        display: none !important;
    }
}

/* Desktop positioning - dropdown should appear relative to header */
@media screen and (min-width: 1001px) {
    #country-dropdown-mobile {
        display: none !important;
    }
    
    #country-dropdown {
        top: calc(100% - 1.25rem);
    }
}

/* Downdown icon swap CSS */

/* Initial State */
.submenu-toggle .icon-hover {
    display: none;
}

.submenu-toggle .icon-default {
    display: block;
}

/* Hover State: Target the parent .menu-item so the icon 
   changes even if the user hovers the text, not just the button */
.menu-item:hover .submenu-toggle .icon-default {
    display: none;
}

.menu-item:hover .submenu-toggle .icon-hover {
    display: block;
    border: 1px solid var(--blue-navy);
    border-radius: 50%;
}

/* Hide active icon when closed */
.menu-item-icon-mobile .icon-active {
    display: none;
}

/* Hide default icon when button is expanded (clicked) */
.menu-item-icon-mobile[aria-expanded="true"] .icon-default {
    display: none;
}

/* Show active (filled) icon when button is expanded (clicked) */
.menu-item-icon-mobile[aria-expanded="true"] .icon-active {
    display: block;
}
