/* ============================================
   JM SITE HEADER — shared across all pages
   ============================================ */

.jm-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: "Onest", sans-serif;
    background: transparent;
    padding: 0.75rem 75px 0;
    transition: background 0.2s, padding 0.2s;
}

.jm-site-header.scrolled {
    background: transparent;
    padding: 0.5rem 75px 0;
}

.jm-site-header__inner {
    display: flex;
    align-items: center;
    max-width: 89.5rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    gap: 2rem;
    background: #ffffff;
    border-radius: 0.875rem;
    transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.jm-site-header.scrolled .jm-site-header__inner {
    box-shadow: 0 8px 32px rgba(0, 19, 106, 0.12);
}

/* Logo */
.jm-site-header__logo {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1;
}

.jm-site-header__logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.jm-site-header__logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.jm-site-header__brand {
    font-family: "Onest", sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: #14171d;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* Desktop nav */
.jm-site-header__nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.jm-site-header__nav-pill {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    border-radius: 999px;
    padding: 0.3rem;
}

.jm-site-header__nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.875rem;
    font-family: "Onest", sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #464d4d;
    text-decoration: none;
    border-radius: 999px;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}

.jm-site-header__nav-link svg {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.jm-site-header__nav-link:hover {
    color: #14171d;
    background: #f3f5f7;
}

.jm-site-header__nav-link:hover svg { opacity: 1; }

.jm-site-header__nav-link--active {
    color: #56af40;
    background: rgba(86, 175, 64, 0.08);
}

.jm-site-header__nav-link--active svg {
    opacity: 1;
    color: #56af40;
}

.jm-site-header__nav-link--active:hover {
    color: #348e23;
}

/* Language dropdown */
.jm-site-header__lang-dropdown .dropdown-toggle::after { margin-left: 0.2rem; }

/* Right actions */
.jm-site-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* Login link */
.jm-site-header__login-link {
    font-family: "Onest", sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #464d4d;
    text-decoration: none;
    padding: 0.4rem 0.5rem;
    border-radius: 0.5rem;
    transition: color 0.15s, background 0.15s;
}

.jm-site-header__login-link:hover {
    color: #14171d;
    background: #f3f5f7;
}

/* CTA button */
.jm-site-header__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    background: #56af40 !important;
    color: #ffffff !important;
    font-family: "Onest", sans-serif;
    font-size: 0.9375rem;
    font-weight: 800;
    border-radius: 0.625rem;
    text-decoration: none;
    border: none;
    transition: background 0.15s, transform 0.15s;
    white-space: nowrap;
}

.jm-site-header__cta-btn:hover {
    background: #348e23 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* User dropdown */
.jm-site-header__user-dropdown { position: relative; }

.jm-site-header__user-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.625rem;
    border-radius: 0.625rem;
    cursor: pointer;
    text-decoration: none;
    color: #14171d;
    transition: background 0.15s;
}

.jm-site-header__user-toggle:hover {
    background: #f3f5f7;
    color: #14171d;
}

.jm-site-header__avatar {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #e0f0db;
    flex-shrink: 0;
}

.jm-site-header__user-name {
    font-family: "Onest", sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #14171d;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown menu */
.jm-site-header__user-dropdown .dropdown-menu,
.jm-site-header__lang-dropdown .dropdown-menu {
    border-radius: 0.875rem !important;
    border: 1px solid rgba(20, 23, 29, 0.08) !important;
    box-shadow: 0 8px 32px rgba(0, 19, 106, 0.1) !important;
    padding: 0.375rem !important;
    min-width: 160px;
    font-family: "Onest", sans-serif;
}

.jm-site-header__user-dropdown .dropdown-item,
.jm-site-header__lang-dropdown .dropdown-item {
    border-radius: 0.5rem !important;
    font-weight: 600;
    font-size: 0.875rem;
    color: #14171d;
    padding: 0.5rem 0.75rem;
    transition: background 0.12s;
}

.jm-site-header__user-dropdown .dropdown-item:hover,
.jm-site-header__lang-dropdown .dropdown-item:hover {
    background: #f3f5f7 !important;
    color: #14171d;
}

/* Mobile toggle */
.jm-site-header__mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1.5px solid rgba(20, 23, 29, 0.15);
    border-radius: 0.5rem;
    color: #14171d;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
}

.jm-site-header__mobile-toggle:hover {
    background: #f3f5f7;
    border-color: rgba(20, 23, 29, 0.25);
}

/* Mobile nav */
.jm-site-header__mobile-nav {
    display: none;
    border-top: 1px solid rgba(20, 23, 29, 0.08);
    background: #ffffff;
}

.jm-site-header__mobile-nav.show { display: block; }

.jm-site-header__mobile-inner {
    max-width: 89.5rem;
    margin: 0 auto;
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.jm-site-header__mobile-link {
    display: block;
    padding: 0.6rem 0.75rem;
    font-family: "Onest", sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #464d4d;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: color 0.15s, background 0.15s;
}

.jm-site-header__mobile-link:hover {
    color: #14171d;
    background: #f3f5f7;
}

.jm-site-header__mobile-cta {
    margin-top: 0.5rem;
    text-align: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
}

/* ── Responsive ── */
@media screen and (max-width: 1200px) {
    .jm-site-header { padding: 0.75rem 24px 0; }
    .jm-site-header__inner { padding: 0 1.25rem; }
}

@media screen and (max-width: 767px) {
    .jm-site-header { padding: 0.5rem 12px 0; }
    .jm-site-header__inner {
        padding: 0 1rem;
        height: 58px;
        gap: 0.75rem;
        border-radius: 0.75rem;
    }
    .jm-site-header__nav { display: none !important; }
    .jm-site-header__actions { display: none !important; }
    .jm-site-header__mobile-toggle { display: flex; }
}

/* ══════════════════════════════════════════════
   App pages (dashboard, profile, etc.)
   Header is solid — no floating pill look
   ══════════════════════════════════════════════ */
body.jm-ui-app .jm-site-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(20, 23, 29, 0.07);
    padding: 0;
    box-shadow: 0 1px 0 rgba(20, 23, 29, 0.06);
}

body.jm-ui-app .jm-site-header__inner {
    max-width: 100%;
    border-radius: 0;
    padding: 0 2rem;
    height: 64px;
    box-shadow: none !important;
}

body.jm-ui-app .jm-site-header.scrolled {
    background: #ffffff;
    padding: 0;
}

body.jm-ui-app .jm-site-header.scrolled .jm-site-header__inner {
    box-shadow: none !important;
}

@media screen and (max-width: 1200px) {
    body.jm-ui-app .jm-site-header { padding: 0; }
    body.jm-ui-app .jm-site-header__inner { padding: 0 1.5rem; }
}

@media screen and (max-width: 767px) {
    body.jm-ui-app .jm-site-header { padding: 0; }
    body.jm-ui-app .jm-site-header__inner {
        padding: 0 1rem;
        height: 58px;
        border-radius: 0;
    }
}
