/**
 * Schwab retail meganav — matched to schwab.com/bank (1440px reference).
 * Logo: square Charles Schwab Bank badge (#logo_bank), 96×96px.
 */

.schwab-header {
    --meganav-bg: #33424c;
    --metal-700: #556977;
    --metal-800: #415462;
    --metal-900: #29353d;
    --tangerine-700: #b05e0d;
    --tangerine-800: #8a4500;
    --schwab-nav-active: #026d97;
    background: var(--meganav-bg);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    color: #fff;
}

.schwab-header,
.schwab-header .schwab-btn-login,
.schwab-header .schwab-btn-primary,
.schwab-header .schwab-btn-secondary,
.schwab-header .schwab-nav-link,
.schwab-header .schwab-util-link,
.schwab-header .schwab-lang-btn {
    font-family: 'Charles Modern', CharlesModern-Regular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.schwab-header .las,
.schwab-header .la,
.schwab-header .lar,
.schwab-header .lal,
.schwab-header .fal,
.schwab-header .far,
.schwab-header .fas,
.schwab-header .fab,
.schwab-header [class*=' la-'],
.schwab-header [class*=' las-'],
.schwab-header i[class*='la-'],
.schwab-header i[class*='las-'] {
    font-family: 'Line Awesome Free' !important;
    font-weight: 900;
}

.schwab-header-container {
    width: 100%;
    max-width: 1232px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    gap: 16px;
    min-height: 96px;
    position: relative;
}

.schwab-header-logo-col {
    flex: 0 0 96px;
    display: flex;
    align-items: center;
    align-self: stretch;
}

.schwab-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
    text-decoration: none;
}

.schwab-header-logo img,
.schwab-header-logo svg {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.schwab-header-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 96px;
}

.schwab-utility {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    padding: 14px 0 0;
    font-size: 13px;
    line-height: 1;
    flex-wrap: nowrap;
}

.schwab-util-link {
    color: #fff;
    background: none;
    border: 0;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
}

.schwab-util-link:hover {
    text-decoration: underline;
    color: #fff;
}

.schwab-util-link i {
    color: #98a4ae;
    font-size: 16px;
}

.schwab-util-link i.chev {
    color: #fff;
    font-size: 11px;
    margin-left: -2px;
}

.schwab-search {
    display: flex;
    align-items: stretch;
}

.schwab-search input[type='text'] {
    background: var(--metal-700);
    color: #fff;
    border: 1px solid var(--metal-700);
    padding: 0 8px;
    font-size: 13px;
    height: 32px;
    width: 143px;
    outline: none;
    border-radius: 4px 0 0 4px;
    box-sizing: border-box;
}

.schwab-search input::placeholder {
    color: #fff;
    opacity: 0.9;
}

.schwab-search button {
    background: var(--metal-700);
    border: 1px solid var(--metal-700);
    border-left: 0;
    color: #fff;
    padding: 0 10px;
    height: 32px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 0 4px 4px 0;
    box-sizing: border-box;
}

.schwab-search button:hover {
    background: var(--metal-800);
}

.schwab-header-nav {
    display: flex;
    align-items: stretch;
    flex: 1;
    margin-top: auto;
}

.schwab-nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

.schwab-nav-menu li {
    margin: 0;
    display: flex;
    align-items: stretch;
}

.schwab-header .schwab-nav-menu .schwab-nav-link,
.schwab-header .schwab-nav-menu .schwab-nav-list .schwab-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 22px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    transition: background 0.15s ease;
    background: transparent;
    border: none;
    border-bottom: 4px solid transparent;
    height: 100%;
    box-sizing: border-box;
    cursor: pointer;
    white-space: nowrap;
}

.schwab-header .schwab-nav-menu .schwab-nav-link:hover,
.schwab-header .schwab-nav-menu .schwab-nav-list .schwab-nav-link:hover {
    color: #fff;
    background: var(--metal-900);
    text-decoration: none;
}

.schwab-header .schwab-nav-menu .schwab-nav-link.active,
.schwab-header .schwab-nav-menu .schwab-nav-list .schwab-nav-link.active {
    color: #fff;
    font-weight: 700;
    background: transparent;
    text-decoration: none;
    border-bottom-color: var(--schwab-nav-active);
}

.schwab-header .schwab-nav-menu .schwab-nav-list {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

.schwab-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    padding: 0 0 8px;
    align-self: flex-end;
}

.schwab-language-dropdown {
    position: relative;
}

.schwab-lang-btn {
    background: transparent;
    border: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
}

.schwab-lang-btn:hover {
    text-decoration: underline;
}

.schwab-lang-btn img {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
}

.schwab-lang-btn i {
    font-size: 11px;
    color: #fff;
}

.schwab-lang-list {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid #e0e4e7;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 4px;
    margin: 0;
    display: none;
    z-index: 100;
    min-width: 160px;
}

.schwab-language-dropdown:hover .schwab-lang-list,
.schwab-language-dropdown:focus-within .schwab-lang-list {
    display: block;
}

.schwab-lang-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.15s;
}

.schwab-lang-list li a:hover,
.schwab-lang-list li a.active {
    background: #f7f9fc;
    color: #006e99;
}

.schwab-lang-list li a img {
    width: 16px;
    height: 16px;
    object-fit: cover;
}

.schwab-utility .schwab-btn-login,
.schwab-header .schwab-btn-login {
    background: transparent;
    border: 0;
    padding: 0;
    color: #fff;
    text-decoration: none;
    font-weight: 400;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    white-space: nowrap;
}

.schwab-utility .schwab-btn-login:hover,
.schwab-header .schwab-btn-login:hover {
    text-decoration: underline;
    color: #fff;
}

.schwab-header .schwab-btn-primary {
    background: var(--tangerine-700);
    border: 1px solid var(--tangerine-700);
    border-radius: 9999px;
    padding: 8px 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    transition: background 0.15s, border-color 0.15s;
    display: inline-block;
    white-space: nowrap;
}

.schwab-header .schwab-btn-primary:hover {
    background: var(--tangerine-800);
    border-color: var(--tangerine-800);
    color: #fff;
    text-decoration: none;
}

.schwab-header .schwab-btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 9999px;
    padding: 8px 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    transition: background 0.15s, border-color 0.15s;
    display: inline-block;
}

.schwab-header .schwab-btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
}

.schwab-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    flex-shrink: 0;
}

.schwab-mobile-toggle span {
    width: 22px;
    height: 2px;
    background: #fff;
    transition: all 0.2s ease;
    border-radius: 1px;
}

.schwab-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.schwab-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.schwab-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 1024px) {
    .schwab-header-logo-col {
        flex-basis: 72px;
    }

    .schwab-header-logo img,
    .schwab-header-logo svg {
        width: 72px;
        height: 72px;
    }

    .schwab-header-container,
    .schwab-header-right {
        min-height: 80px;
    }

    .schwab-search input[type='text'] {
        width: 120px;
    }
}

@media (max-width: 992px) {
    .schwab-header {
        padding: 0 16px;
    }

    .schwab-header-container {
        min-height: 64px;
        align-items: center;
        flex-wrap: nowrap;
    }

    .schwab-header-logo-col {
        flex-basis: 48px;
    }

    .schwab-header-logo img,
    .schwab-header-logo svg {
        width: 48px;
        height: 48px;
    }

    .schwab-mobile-toggle {
        display: flex;
        margin-left: auto;
        align-self: center;
    }

    .schwab-header-right {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--meganav-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        min-height: auto;
    }

    .schwab-header-right.active {
        display: flex;
    }

    .schwab-utility {
        justify-content: flex-start;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        gap: 12px;
    }

    .schwab-util-link {
        padding: 8px 0;
    }

    .schwab-search {
        width: 100%;
    }

    .schwab-search input[type='text'] {
        flex: 1;
        width: auto;
    }

    .schwab-header-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 0;
    }

    .schwab-nav-menu,
    .schwab-header .schwab-nav-menu .schwab-nav-list {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }

    .schwab-header .schwab-nav-menu .schwab-nav-link,
    .schwab-header .schwab-nav-menu .schwab-nav-list .schwab-nav-link {
        padding: 12px 0;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .schwab-header-actions {
        margin-left: 0;
        padding: 0;
        flex-wrap: wrap;
        gap: 12px;
        align-self: stretch;
    }
}

@media (max-width: 576px) {
    .schwab-header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .schwab-header .schwab-btn-primary,
    .schwab-header .schwab-btn-secondary,
    .schwab-header .schwab-btn-login {
        width: 100%;
        text-align: center;
    }
}
