/* ============================================
   HEADER — Single row desktop + bottom nav mobile
   ============================================ */

/* ===== ANNOUNCEMENT BAR ===== */
.announcement-bar {
    position: sticky;
    top: 0;
    z-index: 1050;
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}
.announcement-bar a {
    text-decoration: underline;
    text-underline-offset: 2px;
}
.announcement-bar a:hover {
    opacity: .85;
}
/* Header offset when announcement bar is present */
.mobile-header.has-announcement {
    top: var(--announcement-h, 0px);
}

/* ===== STICKY HEADER ===== */
.mobile-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: #fff;
    border-bottom: 1px solid #E8EAF6;
    transition: box-shadow .2s ease;
}
.mobile-header.header-scrolled {
    box-shadow: 0 2px 12px rgba(57, 73, 171, .1);
}

/* ===== HEADER BAR (single row) ===== */
.header-bar {
    height: 80px;
    display: flex;
    align-items: center;
}
.header-bar__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 24px;
}
.header-bar__logo img {
    height: 40px;
    transition: opacity .2s;
}
.header-bar__logo:hover img { opacity: .85; }

/* ===== DESKTOP NAV (center, xl+) ===== */
.header-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.header-nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.header-nav__item { position: relative; }
.header-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: .84rem;
    font-weight: 600;
    color: #5C6270;
    text-decoration: none;
    border-radius: 8px;
    transition: color .2s, background .2s;
    position: relative;
    white-space: nowrap;
}
.header-nav__link i:first-child {
    font-size: .95rem;
    color: #969CAC;
    transition: color .2s;
}
.header-nav__caret {
    font-size: .5rem;
    margin-left: -2px;
    opacity: .5;
    transition: transform .2s;
}

/* Hover */
.header-nav__link:hover {
    color: #FB471F;
    background: rgba(251, 71, 31, .05);
}
.header-nav__link:hover i:first-child { color: #FB471F; }
.header-nav__item--dd:hover .header-nav__caret {
    transform: rotate(180deg);
}

/* Active */
.header-nav__link.active {
    color: #FB471F;
    font-weight: 700;
}
.header-nav__link.active i:first-child { color: #FB471F; }
.header-nav__link.active::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px;
    bottom: -10px;
    height: 2.5px;
    border-radius: 2px 2px 0 0;
    background: #FB471F;
}

/* Dropdown */
.header-nav__dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    max-height: 70vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 8px 32px rgba(57, 73, 171, .14), 0 2px 8px rgba(0,0,0,.06);
    border: 1px solid #E8EAF6;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(6px);
    transition: opacity .18s, transform .18s, visibility .18s;
    z-index: 1055;
}
.header-nav__item--dd:hover > .header-nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.header-nav__dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: .84rem;
    font-weight: 500;
    color: #3C4049;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.header-nav__dd-item i {
    color: #969CAC;
    font-size: .95rem;
    flex-shrink: 0;
    transition: color .15s;
}
.header-nav__dd-item:hover {
    background: #FFEDE9;
    color: #E4411C;
}
.header-nav__dd-item:hover i { color: #FB471F; }

/* ===== ACTIONS (right) ===== */
.header-bar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Login link */
.header-bar__login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: .84rem;
    font-weight: 600;
    color: #3949AB;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.header-bar__login i { font-size: 1.05rem; }
.header-bar__login:hover {
    background: #E8EAF6;
    color: #303F9F;
}

/* CTA button */
.header-bar__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border-radius: 8px;
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #FB471F 0%, #ff5f3a 100%);
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(251, 71, 31, .25);
    transition: transform .15s, box-shadow .2s;
}
.header-bar__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(251, 71, 31, .35);
    color: #fff;
}
.header-bar__cta:active { transform: translateY(0); }
.header-bar__cta i { font-size: .85rem; }

/* ===== PROFILE BUTTON ===== */
.header-bar__actions .custom-btn-secondary {
    padding-top: 6px;
    padding-bottom: 6px;
    border-radius: 50px;
    font-size: .84rem;
    font-weight: 600;
    gap: 8px;
}

/* ===== PROFILE DROPDOWN ===== */
@media (min-width: 992px) {
    .header-bar .dropdown-menu {
        position: absolute;
        top: 100%; right: 0;
        margin-top: 4px;
        z-index: 1055;
    }
    .header-bar .dropdown-menu-end {
        left: auto; right: 0;
    }
}
.header-bar .dropdown-menu {
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(57, 73, 171, .14), 0 2px 8px rgba(0,0,0,.06);
    border: 1px solid #E8EAF6;
}
.header-bar .dropdown-menu .dropdown-item,
.header-bar .dropdown-menu .menu-link {
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 14px;
    transition: background-color .15s, color .15s;
}
.header-bar .dropdown-menu .dropdown-item:hover,
.header-bar .dropdown-menu .menu-link:hover {
    background-color: #FFEDE9;
    color: #E4411C;
}

/* =============================================
   MOBILE FIXED BOTTOM NAV
   ============================================= */
.mbnav {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    z-index: 1050;
    background: #fff;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    height: 64px;
    border-top: 1px solid #E8EAF6;
    box-shadow: 0 -2px 16px rgba(57, 73, 171, .08);
}
.mbnav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 8px 0 6px;
    text-decoration: none;
    color: #8A8FA0;
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .02em;
    border: none;
    background: none;
    cursor: pointer;
    transition: color .2s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}
.mbnav__item i {
    font-size: 1.3rem;
    line-height: 1;
    transition: transform .2s;
}
.mbnav__item span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.1;
}
.mbnav__item--active { color: #FB471F; }
.mbnav__item--active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%; right: 20%;
    height: 2.5px;
    border-radius: 0 0 3px 3px;
    background: #FB471F;
}
.mbnav__item:active i { transform: scale(.9); }

/* Center FAB */
.mbnav__fab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: 6px;
}
.mbnav__fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(145deg, #FB471F 0%, #ff5f3a 100%);
    color: #fff;
    font-size: 1.4rem;
    box-shadow: 0 4px 16px rgba(251, 71, 31, .35);
    transform: translateY(-12px);
    transition: transform .2s, box-shadow .2s;
}
.mbnav__fab:active .mbnav__fab-icon {
    transform: translateY(-10px) scale(.95);
    box-shadow: 0 2px 8px rgba(251, 71, 31, .3);
}
.mbnav__fab-label {
    display: block;
    font-size: .65rem;
    font-weight: 700;
    color: #FB471F;
    margin-top: -8px;
    white-space: nowrap;
    letter-spacing: .02em;
}

/* ===== "MORE" BOTTOM SHEET ===== */
.mbnav-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(16, 17, 22, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}
.mbnav-overlay.show { opacity: 1; visibility: visible; }
.mbnav-sheet {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    z-index: 1070;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0));
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.32, .72, 0, 1);
}
.mbnav-sheet.show { transform: translateY(0); }
.mbnav-sheet__handle {
    width: 36px; height: 4px;
    border-radius: 4px;
    background: #D4D9EF;
    margin: 0 auto 16px;
}
.mbnav-sheet__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.mbnav-sheet__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 4px 10px;
    border-radius: 14px;
    text-decoration: none;
    color: #3C4049;
    font-size: .78rem;
    font-weight: 600;
    transition: background .2s;
    -webkit-tap-highlight-color: transparent;
}
.mbnav-sheet__item:active { background: #F4F5FB; }
.mbnav-sheet__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: 14px;
    font-size: 1.3rem;
}
.mbnav-sheet__icon--indigo { background: #E8EAF6; color: #3949AB; }
.mbnav-sheet__icon--amber  { background: #FFF8E1; color: #F57F17; }
.mbnav-sheet__icon--teal   { background: #E0F2F1; color: #00897B; }
.mbnav-sheet__icon--orange { background: #FFEDE9; color: #FB471F; }

/* ===== BODY PADDING for mobile bottom nav ===== */
@media (max-width: 1199.98px) {
    body { padding-bottom: 68px; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-bar { height: 52px; }
    .header-bar__logo img { height: 34px; }
    .header-bar__cta span { display: none; }
    .header-bar__cta { padding: 8px 12px; }
}

/* Hide mobile nav on desktop */
@media (min-width: 1200px) {
    .mbnav,
    .mbnav-overlay,
    .mbnav-sheet { display: none; }
}

/* ===== Profile Dropdown Shared Elements ===== */
@keyframes pdd-blink {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(34,197,94,0.25); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34,197,94,0.05); }
}
.pdd-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    margin-right: 14px !important;
}
.pdd-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22C55E;
    border: 2.5px solid white;
    animation: pdd-blink 2.5s ease-in-out infinite;
}
.pdd-user-handle {
    font-size: 11px;
    color: #94A3B8;
    letter-spacing: 0.3px;
    margin-bottom: 7px;
}
.pdd-online-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(90deg, #ECFDF5, #D1FAE5);
    border: 1px solid #6EE7B7;
    border-radius: 20px;
    padding: 2px 10px;
    width: fit-content;
}
.pdd-online-badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #10B981;
}
.pdd-online-badge span {
    font-size: 10px;
    color: #059669;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.pdd-email-wrap {
    padding: 10px 18px 2px;
    list-style: none;
}
.pdd-email-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pdd-email-box i {
    color: #94A3B8;
    font-size: 13px;
    width: auto !important;
    min-width: auto !important;
    height: auto !important;
    background: none !important;
    border-radius: 0 !important;
}
.pdd-email-box span {
    font-size: 11px;
    color: #64748B;
}

/* ===== User Profile Dropdown (Web/Candidate) ===== */
.header-bar__actions .dropdown-menu {
    border: 1px solid rgba(255,255,255,0.9) !important;
    border-radius: 28px !important;
    box-shadow: 0 20px 60px rgba(57,73,171,0.12), 0 4px 16px rgba(0,0,0,0.06), inset 0 0 0 1px rgba(255,255,255,0.6) !important;
    padding: 0 !important;
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 310px;
    overflow: hidden;
}

/* Header / User info */
.header-bar__actions .dropdown-menu > .menu-item:first-child {
    padding: 0 !important;
}
.header-bar__actions .dropdown-menu .menu-content {
    padding: 26px 22px 18px !important;
    background: linear-gradient(135deg, rgba(57,73,171,0.07) 0%, rgba(251,71,31,0.05) 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 14px;
}
.header-bar__actions .dropdown-menu .menu-content .symbol {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    flex-shrink: 0;
}
.header-bar__actions .dropdown-menu .menu-content .symbol img {
    border-radius: 50% !important;
    width: 54px !important;
    height: 54px !important;
    object-fit: cover !important;
    box-shadow: 0 4px 14px rgba(251,71,31,0.3);
}
.header-bar__actions .dropdown-menu .fw-bolder {
    color: #0F172A !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: -0.4px;
}
.header-bar__actions .dropdown-menu .menu-content p {
    color: #94A3B8 !important;
    font-size: 11px !important;
    letter-spacing: 0.3px;
}

/* Divider */
.header-bar__actions .dropdown-menu .dropdown-divider {
    border-color: #F1F5F9 !important;
    margin: 4px 18px !important;
    opacity: 1;
}

/* Menu items */
.header-bar__actions .dropdown-menu > .menu-item,
.header-bar__actions .dropdown-menu > li.menu-item {
    padding: 0 10px !important;
    list-style: none;
}
.header-bar__actions .dropdown-menu .menu-item .menu-link {
    border-radius: 14px !important;
    padding: 11px 13px !important;
    margin: 2px 0;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
    color: #64748B !important;
    font-weight: 400 !important;
    font-size: 13.5px !important;
    border: 1px solid transparent;
    display: flex !important;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    position: relative;
}
.header-bar__actions .dropdown-menu .menu-item .menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    border-radius: 0 3px 3px 0;
    background: #FB471F;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.header-bar__actions .dropdown-menu .menu-item .menu-link::after {
    content: '\203A';
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 300;
    color: #CBD5E1;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}
.header-bar__actions .dropdown-menu .menu-item .menu-link i {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    color: #94A3B8 !important;
    font-size: 17px !important;
    transition: background 0.18s, color 0.18s;
    flex-shrink: 0;
    margin-right: 0 !important;
}
.header-bar__actions .dropdown-menu .menu-item .menu-link:hover {
    background: #FFEDE9 !important;
    color: #0F172A !important;
    font-weight: 600 !important;
    transform: translateX(4px);
    border-color: rgba(251,71,31,0.15);
    box-shadow: 0 2px 8px rgba(251,71,31,0.12);
}
.header-bar__actions .dropdown-menu .menu-item .menu-link:hover::before {
    opacity: 1;
}
.header-bar__actions .dropdown-menu .menu-item .menu-link:hover::after {
    opacity: 1;
    color: #FB471F;
}
.header-bar__actions .dropdown-menu .menu-item .menu-link:hover i {
    background: rgba(251,71,31,0.12);
    color: #FB471F !important;
}

/* Logout */
.header-bar__actions .dropdown-menu .menu-item .menu-link.logout-confirmation {
    color: #94A3B8 !important;
    font-weight: 400 !important;
}
.header-bar__actions .dropdown-menu .menu-item .menu-link.logout-confirmation:hover {
    background: #FFF1F2 !important;
    border-color: #FECDD3;
    color: #F43F5E !important;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(244,63,94,0.12);
}
.header-bar__actions .dropdown-menu .menu-item .menu-link.logout-confirmation:hover::before {
    background: #F43F5E;
}
.header-bar__actions .dropdown-menu .menu-item .menu-link.logout-confirmation:hover::after {
    color: #F43F5E;
}
.header-bar__actions .dropdown-menu .menu-item .menu-link.logout-confirmation:hover i {
    background: #FFE4E6;
    color: #F43F5E !important;
}
