/* Header product search shares the navigation's navy and blue palette. */
.header-mobile-actions { display: none; }
.header-search-trigger {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--primary, #0b2a4a);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.header-search-trigger svg { display: block; width: 20px; height: 20px; }
.header-search-trigger:hover,
.header-search-trigger[aria-expanded="true"] { background: #fff; color: var(--accent, #0b63a5); }
.header-search-trigger:focus-visible,
.header-search-close:focus-visible,
.header-search-submit:focus-visible { outline: 2px solid var(--accent, #0b63a5); outline-offset: 3px; }
.header-search-panel[hidden] { display: none !important; }
.header-search-panel {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: max(24px, calc((100vw - 1280px) / 2 + 152px));
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(620px, calc(100% - 48px));
    padding: 12px;
    border: 1px solid #dce7f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 44px rgba(6, 26, 46, .18);
}
.header-search-form {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding-inline-start: 12px;
    border: 1px solid #dbe6ef;
    border-radius: 12px;
    background: #f5f9fc;
}
.header-search-form:focus-within { border-color: #4a90c2; box-shadow: 0 0 0 3px rgba(11, 99, 165, .08); }
.header-search-form > svg { flex: 0 0 19px; width: 19px; height: 19px; color: #6d879c; }
.header-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.header-search-form input {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 44px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--primary, #0b2a4a);
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
}
.header-search-form input::placeholder { color: #74899a; opacity: 1; }
.header-search-submit {
    flex: 0 0 auto;
    min-height: 40px;
    margin: 3px;
    padding: 8px 17px;
    border: 0;
    border-radius: 9px;
    background: var(--accent, #0b63a5);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}
.header-search-submit:hover { background: #084c80; }
.header-search-close {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 11px;
    background: #f1f5f9;
    color: #527087;
    cursor: pointer;
}
.header-search-close svg { display: block; width: 18px; height: 18px; }
.header-search-close:hover { background: #e4edf4; color: var(--primary, #0b2a4a); }

@media screen and (max-width: 1260px) {
    .nav-pill-wrap { display: none !important; }
    .nav-search { display: none !important; }
    .header-mobile-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
    .header-mobile-actions .header-search-trigger,
    .header-mobile-actions .hamburger { flex: 0 0 44px; width: 44px; height: 44px; }
    header.header-pill .header-mobile-actions .hamburger { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; }
    .header-search-trigger-mobile { border-radius: 12px; background: #f1f5f9; }
    .header-search-trigger-mobile:hover,
    .header-search-trigger-mobile[aria-expanded="true"] { background: #e3eff8; }
    .header-search-panel {
        inset-inline: 12px;
        width: auto;
        max-width: none;
        gap: 8px;
        padding: 10px;
        border-radius: 15px;
    }
    .header-search-form { gap: 8px; padding-inline-start: 9px; }
    .header-search-form input { font-size: 16px; }
    .header-search-submit { min-height: 44px; margin: 2px; padding-inline: 12px; }
    /* Reuse the established drawer layout for tablet widths too. */
    .mm {
        display: block !important;
        position: fixed;
        inset: 0;
        z-index: 9999;
        visibility: hidden;
        transition: visibility 0.35s;
    }
    .mm.open { visibility: visible; }
    .mm-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        opacity: 0;
        transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .mm.open .mm-backdrop { opacity: 1; }
    .mm-panel {
        position: absolute;
        top: 0; right: 0; bottom: 0;
        width: 300px;
        max-width: 88vw;
        background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        box-shadow: -8px 0 40px rgba(0, 51, 102, 0.08);
        border-left: 1px solid rgba(0, 115, 183, 0.06);
    }
    .mm.open .mm-panel { transform: translateX(0); }
    .mm-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 24px 20px;
        background: #fff;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        flex-shrink: 0;
    }
    .mm-logo {
        font-size: 1.3rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        color: #0f172a;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 0;
    }
    .mm-logo img { display:block; width:178px; max-width:100%; height:auto; }
    .mm-close {
        width: 44px;
        height: 44px;
        border: none;
        background: #f8fafc;
        border-radius: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #64748b;
        font-size: 1rem;
        transition: all 0.2s ease;
    }
    .mm-close:hover {
        background: #f1f5f9;
        color: #0f172a;
        transform: scale(0.96);
    }
    .mm-nav {
        flex: 1;
        overflow-y: auto;
        padding: 20px 16px 24px;
        -webkit-overflow-scrolling: touch;
    }
    .mm-link {
        display: block;
        padding: 15px 18px;
        font-size: 1rem;
        font-weight: 500;
        color: #334155;
        text-decoration: none;
        border-radius: 12px;
        margin-bottom: 4px;
        transition: all 0.2s ease;
    }
    .mm-link:hover {
        background: rgba(0, 115, 183, 0.06);
        color: #0b63a5;
        padding-left: 22px;
    }
    .mm-group {
        margin-bottom: 6px;
    }
    .mm-trigger {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 18px;
        font-size: 1rem;
        font-weight: 500;
        color: #334155;
        background: none;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        text-align: left;
        font-family: inherit;
        transition: all 0.2s ease;
    }
    .mm-trigger:hover {
        background: rgba(0, 115, 183, 0.06);
        color: #0b63a5;
    }
    .mm-trigger::after {
        content: '';
        width: 6px;
        height: 6px;
        border-right: 2px solid #94a3b8;
        border-bottom: 2px solid #94a3b8;
        transform: rotate(45deg);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        margin-right: 4px;
    }
    .mm-group.open .mm-trigger::after { transform: rotate(-135deg); }
    .mm-drop {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding-left: 12px;
        margin-left: 14px;
        border-left: 2px solid rgba(0, 115, 183, 0.12);
    }
    .mm-group.open .mm-drop { grid-template-rows: 1fr; }
    .mm-drop-inner {
        overflow: hidden;
        padding: 6px 0 10px 4px;
    }
    .mm-drop a {
        display: block;
        padding: 11px 16px;
        font-size: 0.9rem;
        font-weight: 500;
        color: #64748b;
        text-decoration: none;
        border-radius: 10px;
        transition: all 0.2s ease;
    }
    .mm-drop a:hover {
        background: rgba(0, 115, 183, 0.06);
        color: #0b63a5;
    }
    .mm-drop .mm-sub {
        padding-left: 20px;
        font-size: 0.88rem;
        font-weight: 400;
        color: #94a3b8;
    }
    .mm-langs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }
    .mm-lang {
        padding: 10px 16px;
        font-size: 0.88rem;
        font-weight: 500;
        color: #64748b;
        background: #f8fafc;
        border: 1px solid rgba(0, 0, 0, 0.04);
        border-radius: 10px;
        text-decoration: none;
        transition: all 0.2s ease;
    }
    .mm-lang:hover {
        background: rgba(0, 115, 183, 0.08);
        color: #0b63a5;
        border-color: rgba(0, 115, 183, 0.15);
    }
    .mm-foot {
        padding: 20px;
        background: #fff;
        border-top: 1px solid rgba(0, 0, 0, 0.04);
        flex-shrink: 0;
    }
    .mm-cta {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
        padding: 16px 24px;
        background: linear-gradient(135deg, #0b2a4a 0%, #0b63a5 100%);
        color: #fff;
        font-weight: 600;
        font-size: 1rem;
        text-decoration: none;
        border-radius: 14px;
        margin-bottom: 12px;
        box-shadow: 0 4px 20px rgba(0, 115, 183, 0.35);
        transition: all 0.25s ease;
    }
    .mm-cta:hover {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 8px 28px rgba(0, 115, 183, 0.4);
    }
    .mm-mail {
        display: block;
        font-size: 0.86rem;
        font-weight: 500;
        color: #64748b;
        text-decoration: none;
        text-align: center;
        transition: color 0.2s;
    }
    .mm-mail:hover { color: #0b63a5; }


}
@media screen and (max-width: 359px) {
    header.header-pill > nav,
    header.header-pill.scrolled > nav { padding-inline: 16px; }
    .header-mobile-actions { gap: 6px; }
    .header-search-panel { gap: 6px; padding: 8px; }
    .header-search-form > svg { display: none; }
    .header-search-form { gap: 6px; }
    .header-search-submit { padding-inline: 10px; }
}
@media print {
    .header-mobile-actions,
    .nav-search,
    .header-search-panel { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    .header-search-trigger { transition: none; }
}
