#menu-desktop {
    display: none;
}

@media (min-width: 1300px) {
    #menu-mobile {
        display: none;
    }

    #menu-desktop {
        display: block;
    }
}

.main-header {
    padding: 12px;
}

.main-header .container {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 0;
    max-width: 1440px;
}

.main-header ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.header__logo img {
    width: auto;
    height: 80px;
    object-fit: cover;
}

.header__nav {
    margin-left: auto;
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header__nav-list .menu-item a {
    color: var(--wp--preset--color--gray);
    font-size: 1rem;
    font-weight: 400;
    padding: 0.5px;
}

@media( min-width: 1300px ) {
    .header__nav-list .menu-item.current_page_item a,
    .header__nav-list .menu-item:hover a {
        color: var(--wp--preset--color--primary);
        font-weight: 500;
        padding: 0;
    }
}
#menu-mobile .header__nav-list .menu-item.current_page_item a,
#menu-mobile .header__nav-list .menu-item:hover a {
    color: var(--wp--preset--color--gray);
}

#menu-mobile .header__nav-list .menu-item.current_page_item,
#menu-mobile .header__nav-list .menu-item:hover {
    background-color: #E9F1FC;
}

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

.header__nav-list .sub-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 0;
    opacity: 0;
    pointer-events: none;
    background: #fff;
    padding-block: 8px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    min-width: 200px;
}

.header__nav-list > .menu-item-has-children > .sub-menu::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 26px;
}

.header__nav-list > .menu-item-has-children > .sub-menu::after {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #fff;
}

.header__nav-list .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 4px;
}

.header__nav-list .sub-menu .sub-menu::before {
    content: '';
    position: absolute;
    top: 0;
    right: 100%;
    width: 8px;
    height: 100%;
}

.header__nav-list .sub-menu .sub-menu::after {
    content: none;
    display: none;
}

.header__nav-list .menu-item-has-children:hover > .sub-menu,
.header__nav-list .menu-item-has-children .sub-menu:hover,
.header__nav-list .menu-item-has-children .sub-menu:has(.sub-menu:hover) {
    opacity: 1;
    z-index: 100;
    pointer-events: all;
}

.header__nav-list .sub-menu .menu-item-has-children::after {
    display: none;
}

.menu-item-has-children::after {
    content: '\eb3a';
    font-family: "unicons-line";
    font-size: 16px;
    display: inline-block;
    color: var(--wp--preset--color--primary);
    transition: transform 0.3s ease;
}

.menu-item-has-children:hover::after {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.header__nav-list .menu-item-has-children .sub-menu li {
    padding: 8px 16px;
}

.header__nav-list .menu-item-has-children .sub-menu li a {
    color: var(--wp--preset--color--gray);
}

.header__nav-list .menu-item-has-children .sub-menu li:hover {
    background-color: var(--wp--preset--color--primary);
}

.header__nav-list .menu-item-has-children .sub-menu li:hover > a {
    color: #fff;
}


@media (max-width: 992px) {
    .header__cta {
        margin-left: 0;
    }
}

/* Header CTA button (icon + title + link) */
.header__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px !important;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;
    color: var(--wp--preset--color--primary);
    background: transparent;
    border: 1px solid var(--wp--preset--color--primary);
    margin-left: 12px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header__cta:hover {
    color: #fff;
    background: var(--wp--preset--color--primary);
}


.header__cta img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ========== Mobile ========== */
.header__mobile {
    position: relative;
    z-index: 100;
}

.header__mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.header__mobile-bar .custom-logo {
    max-width: 180px;
    height: auto;
}

.header__mobile-menu-btn {
    all: unset;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--wp--preset--color--gray, #333);
    font-size: 24px;
}

.header__mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    visibility: hidden;
    pointer-events: none;
}

.header__mobile-drawer.is-open {
    visibility: visible;
    pointer-events: all;
}

.header__mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.header__mobile-drawer.is-open .header__mobile-drawer-backdrop {
    opacity: 1;
}

.header__mobile-drawer-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 85vw);
    max-width: 320px;
    background: #fff;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.header__mobile-drawer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    all: unset;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--wp--preset--color--gray, #333);
    font-size: 24px;
}

.header__mobile-drawer.is-open .header__mobile-drawer-panel {
    transform: translateX(0);
}

.header__mobile-drawer-inner {
    padding: 24px 0;
}

.header__mobile-nav {
    padding-bottom: 10px;
}

.header__mobile-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header__mobile-nav-list .menu-item a {
    display: block;
    padding: 12px 16px;
}

.header__mobile-nav-list .menu-item-has-children > a {
    padding-right: 44px;
}

.header__mobile-nav-list .sub-menu {
    position: static;
    opacity: 1;
    pointer-events: all;
    box-shadow: none;
    min-width: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.04);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-radius: 0;
}

.header__mobile-nav-list .sub-menu::before,
.header__mobile-nav-list .sub-menu::after {
    display: none;
}

.header__mobile-nav-list .menu-item-has-children.is-expanded > .sub-menu {
    max-height: 2000px;
}

.header__mobile-nav-list .sub-menu .menu-item a {
    padding-left: 32px;
    padding-block: 10px;
}

.header__mobile-nav-list .sub-menu .sub-menu .menu-item a {
    padding-left: 48px;
}

.header__mobile-nav-list .menu-item-has-children .sub-menu li {
    padding: 0;
}

.header__mobile-nav-list .menu-item-has-children {
    position: relative;
}

.header__mobile-nav-list .menu-item-has-children::after,
.header__mobile-nav-list .menu-item-has-children .sub-menu .menu-item-has-children::after {
    content: '\eb3a';
    font-family: "unicons-line";
    font-size: 16px;
    display: inline-block;
    color: var(--wp--preset--color--primary);
    transition: transform 0.3s ease;
    position: absolute;
    right: 16px;
    top: 25px;
    transform: translateY(-50%);
    transition: transform 0.25s ease;
}

.header__mobile-nav-list .menu-item-has-children.is-expanded::after,
.header__mobile-nav-list .menu-item-has-children .sub-menu .menu-item-has-children.is-expanded::after {
    transform: translateY(-50%) rotate(180deg);
}
