/* ============================================================
   FinancePress — Mega Navigation CSS
   ============================================================ */

/* ---- Ticker Bar ---- */
.fp-ticker-bar {
    background: #091628;
    height: 32px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: relative;
    z-index: 201;
}
.fp-ticker-bar__track {
    flex: 1;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    animation: fp-ticker 60s linear infinite;
}
.fp-ticker-bar__track.paused { animation-play-state: paused; }
.fp-ticker-bar__track:hover  { animation-play-state: paused; }
@keyframes fp-ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.fp-ticker-bar__loading {
    padding: 0 16px;
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    font-family: var(--fp-font-ui);
}
.fp-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    border-right: 1px solid rgba(255,255,255,0.07);
    font-size: 11px;
    font-family: var(--fp-font-data);
    color: rgba(255,255,255,0.65);
    white-space: nowrap;
}
.fp-ticker-item__symbol { font-weight: 600; color: #fff; letter-spacing: 0.02em; }
.fp-ticker-item__price  { color: rgba(255,255,255,0.8); }
.fp-ticker-item__change { font-weight: 600; }
.fp-ticker-item__change--bull { color: #34D399; }
.fp-ticker-item__change--bear { color: #F87171; }
.fp-ticker-bar__pause {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    background: none;
    border: none;
    cursor: pointer;
    transition: color .15s;
}
.fp-ticker-bar__pause:hover { color: rgba(255,255,255,0.8); }

/* ---- Breaking Bar ---- */
.fp-breaking-bar {
    background: #C0392B;
    height: 34px;
    display: flex;
    align-items: center;
    z-index: 202;
}
.fp-breaking-bar__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    width: 100%;
    max-width: var(--fp-max-width);
    margin-inline: auto;
}
.fp-breaking-bar__badge {
    display: inline-block;
    padding: 1px 7px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #fff;
    flex-shrink: 0;
}
.fp-breaking-bar__text {
    font-size: 12.5px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
}
.fp-breaking-bar__text:hover { text-decoration: underline; }

/* ---- Main Header ---- */
.fp-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #0B1D35;
    height: 56px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 4px 20px rgba(0,0,0,0.25);
}
.fp-header__inner {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: var(--fp-max-width);
    margin-inline: auto;
    padding-inline: 20px;
    gap: 0;
    height: 100%;
}

/* Logo */
.fp-header__logo { flex-shrink: 0; margin-right: 28px; }
.fp-header__logo a { display: flex; align-items: center; text-decoration: none; }
.fp-logo-text {
    font-family: var(--fp-font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #C8A84B;
}
.fp-logo-text span { color: rgba(255,255,255,0.5); font-weight: 400; }

/* ---- Mega Nav ---- */
.fp-mega-nav { flex: 1; height: 100%; display: flex; align-items: stretch; }
.fp-mega-nav__list {
    display: none;
    align-items: stretch;
    list-style: none;
    height: 100%;
    gap: 0;
    margin: 0;
    padding: 0;
}
@media (min-width: 1024px) { .fp-mega-nav__list { display: flex; } }
.fp-mega-nav__item { position: relative; display: flex; align-items: stretch; }

/* Top-level link */
.fp-mega-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 12px;
    font-family: var(--fp-font-ui);
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}
.fp-mega-nav__link svg { flex-shrink: 0; opacity: 1; }
.fp-mega-nav__link:hover,
.fp-mega-nav__item.fp-is-open .fp-mega-nav__link {
    color: #fff;
    border-bottom-color: #C8A84B;
}
.fp-mega-nav__link:hover svg,
.fp-mega-nav__item.fp-is-open .fp-mega-nav__link svg { opacity: 1; }
.fp-mega-nav__link--active { color: #C8A84B !important; border-bottom-color: #C8A84B !important; }
.fp-mega-nav__caret {
    transition: transform .2s ease;
    opacity: 0.8;
    flex-shrink: 0;
}
.fp-mega-nav__item.fp-is-open .fp-mega-nav__caret { transform: rotate(180deg); opacity: .9; }

/* ---- Dropdowns ---- */
.fp-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 300;
    pointer-events: none;
}
.fp-mega-nav__item.fp-is-open .fp-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Mega (multi-column) */
.fp-dropdown--mega {
    display: flex;
    gap: 0;
    min-width: 580px;
    padding: 6px 0 10px;
}
.fp-dropdown__col {
    flex: 1;
    padding: 12px 16px;
    border-right: 1px solid rgba(0,0,0,.06);
    min-width: 170px;
}
.fp-dropdown__col:last-child { border-right: none; }
.fp-dropdown__heading {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9CA3AF;
    padding: 0 8px 8px;
    border-bottom: 1px solid rgba(0,0,0,.06);
    margin-bottom: 4px;
}

/* Simple dropdown */
.fp-dropdown--simple { min-width: 210px; padding: 8px 6px; }

/* Dropdown items */
.fp-dd-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 7px;
    text-decoration: none;
    transition: background .12s;
    cursor: pointer;
}
.fp-dd-item:hover { background: #F4F2ED; }
.fp-dd-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.fp-dd-icon svg { width: 15px; height: 15px; }
.fp-dd-icon--navy  { background: #EBF0F8; color: #0B1D35; }
.fp-dd-icon--gold  { background: #FBF4E3; color: #8B6914; }
.fp-dd-icon--green { background: #EDFAF2; color: #166534; }
.fp-dd-icon--red   { background: #FEF2F2; color: #991B1B; }
.fp-dd-icon--blue  { background: #EFF6FF; color: #1D4ED8; }
.fp-dd-icon--teal  { background: #E6F7F4; color: #0D6E56; }
.fp-dd-body { flex: 1; }
.fp-dd-title {
    font-family: var(--fp-font-ui);
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.fp-dd-desc {
    font-size: 11px;
    color: #6B7280;
    margin-top: 2px;
    line-height: 1.4;
}
.fp-dropdown__divider {
    height: 1px;
    background: rgba(0,0,0,.07);
    margin: 5px 8px;
}

/* Badges */
.fp-dd-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: .04em;
    vertical-align: middle;
    flex-shrink: 0;
}
.fp-dd-badge--new { background: #DCFCE7; color: #166534; }
.fp-dd-badge--pro { background: #FEF9C3; color: #854D0E; }

/* ---- Header Actions ---- */
.fp-header__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}
.fp-header__icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: none;
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.6);
    cursor: pointer;
    transition: all .15s;
}
.fp-header__icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
.fp-btn-ghost {
    height: 30px;
    padding: 0 13px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 6px;
    color: rgba(255,255,255,.7);
    font-size: 12.5px;
    font-weight: 500;
    font-family: var(--fp-font-ui);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all .15s;
    white-space: nowrap;
}
.fp-btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.05); }
.fp-btn-gold {
    height: 30px;
    padding: 0 14px;
    background: #C8A84B;
    border: none;
    border-radius: 6px;
    color: #0B1D35;
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--fp-font-ui);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background .15s, box-shadow .15s;
    white-space: nowrap;
    cursor: pointer;
}
.fp-btn-gold:hover { background: #D4B65C; box-shadow: 0 4px 16px rgba(200,168,75,.3); }
.fp-icon-sun  { display: block; }
.fp-icon-moon { display: none; }
body.fp-dark-mode .fp-icon-sun  { display: none; }
body.fp-dark-mode .fp-icon-moon { display: block; }

/* ---- Hamburger ---- */
.fp-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    background: none;
    cursor: pointer;
}
.fp-hamburger span {
    display: block;
    height: 1.5px;
    background: rgba(255,255,255,.7);
    border-radius: 2px;
    transition: all .2s ease;
}
.fp-hamburger.is-open span:nth-child(1) { transform: rotate(45deg) translate(4.5px,4.5px); }
.fp-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.fp-hamburger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px,-4.5px); }
@media (min-width: 1024px) { .fp-hamburger { display: none; } }
@media (min-width: 900px)  { .fp-btn-ghost { display: inline-flex; } }

/* ---- Search Overlay ---- */
.fp-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8,15,28,.95);
    z-index: 500;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s;
}
.fp-search-overlay.is-open { opacity: 1; visibility: visible; }
.fp-search-overlay__box { position: relative; width: 100%; max-width: 620px; padding: 0 20px; }
.fp-search-overlay__box .search-form { display: flex; gap: 0; }
.fp-search-overlay__box .search-field {
    flex: 1;
    padding: 14px 20px;
    font-size: 20px;
    font-family: var(--fp-font-display);
    background: rgba(255,255,255,.07);
    border: 1.5px solid rgba(255,255,255,.18);
    border-radius: 10px 0 0 10px;
    color: #fff;
    outline: none;
}
.fp-search-overlay__box .search-field:focus { border-color: #C8A84B; }
.fp-search-overlay__box .search-field::placeholder { color: rgba(255,255,255,.25); }
.fp-search-overlay__box .search-submit {
    padding: 0 20px;
    background: #C8A84B;
    border: none;
    border-radius: 0 10px 10px 0;
    color: #0B1D35;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.fp-search-overlay__close {
    position: absolute;
    top: -52px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    color: rgba(255,255,255,.5);
    font-size: 16px;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.fp-search-overlay__close:hover { color: #fff; border-color: rgba(255,255,255,.5); }

/* ---- Backdrop ---- */
.fp-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 350;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s;
    backdrop-filter: blur(2px);
}
.fp-backdrop.is-open { opacity: 1; visibility: visible; }

/* ---- Mobile Nav Drawer ---- */
.fp-mobile-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px,100vw);
    background: #fff;
    z-index: 400;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.fp-mobile-nav.is-open { transform: translateX(0); }
.fp-mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #F0EDE8;
    background: #0B1D35;
    flex-shrink: 0;
}
.fp-mobile-nav__header .fp-logo-text { font-size: 17px; }
.fp-mobile-nav__close {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.6);
    font-size: 15px;
    background: none;
    cursor: pointer;
}
.fp-mobile-nav__body { flex: 1; padding: 8px 10px; }
.fp-mob-item { border-bottom: 1px solid #F4F2ED; }
.fp-mob-item:last-child { border-bottom: none; }
.fp-mob-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 8px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    border-radius: 7px;
    transition: background .12s;
}
.fp-mob-link:hover { background: #F4F2ED; }
.fp-mob-link svg { color: #6B7280; flex-shrink: 0; }
.fp-mob-link--parent { justify-content: flex-start; }
.fp-mob-caret { margin-left: auto; color: #9CA3AF; transition: transform .2s; flex-shrink: 0; }
.fp-mob-link--parent[aria-expanded="true"] .fp-mob-caret { transform: rotate(180deg); }
.fp-mob-sub { padding: 2px 0 8px 18px; }
.fp-mob-group-heading {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #9CA3AF;
    padding: 8px 8px 4px;
}
.fp-mob-sub-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    font-size: 13px;
    color: #374151;
    border-radius: 6px;
    text-decoration: none;
    transition: background .12s;
}
.fp-mob-sub-link:hover { background: #F4F2ED; color: #0B1D35; }
.fp-mob-sub-link svg { width: 14px; height: 14px; color: #9CA3AF; flex-shrink: 0; }
.fp-mob-divider { height: 1px; background: #F0EDE8; margin: 4px 8px; }
.fp-mobile-nav__footer {
    padding: 14px 16px;
    border-top: 1px solid #F0EDE8;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}
.fp-mobile-nav__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.fp-mobile-nav__btn--outline { border: 1.5px solid #E5E1D8; color: #111827; }
.fp-mobile-nav__btn--outline:hover { border-color: #0B1D35; }
.fp-mobile-nav__btn--gold { background: #C8A84B; color: #0B1D35; border: none; }
.fp-mobile-nav__btn--gold:hover { background: #D4B65C; }
