/* ================================================================
   AAUJMR — Header / Navigation
   Cover blue header, sticky. The navy faculty strip and brand row
   fold away on scroll, leaving a slim nav with a small sticker.
================================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--blue);
    color: var(--ink);
    box-shadow: 0 1px 0 rgba(15, 24, 48, 0.18), 0 8px 24px -12px rgba(15, 24, 48, 0.35);
}

.site-header.is-pinned { position: fixed; left: 0; right: 0; top: 0; }

/* ─── Collapsing region (faculty strip + brand row) ──────────── */
.header-collapse {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.32s ease;
}

.header-collapse-inner { min-height: 0; overflow: hidden; }

.site-header.is-scrolled .header-collapse { grid-template-rows: 0fr; }

/* ─── Faculty strip ──────────────────────────────────────────── */
.header-top {
    background: var(--ink);
    padding: 0.42rem 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.68);
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-top .header-admin-bar { display: flex; gap: 1.1rem; }

.header-top a {
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.header-top a:hover { color: var(--lav); }

/* ─── Brand row ──────────────────────────────────────────────── */
.header-brand { padding: 1.2rem 0 1.1rem; }

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 1.2rem;
    color: var(--ink);
}

.brand-link:hover { color: var(--ink); }

/* The sticker: lavender body, die-cut white edge, slight tilt */
.brand-abbr,
.nav-mini-brand {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--ink);
    background: var(--lav);
    border: 3px solid #fff;
    border-radius: 15px;
    transform: rotate(-4deg);
    box-shadow:
        0 1px 0 rgba(15, 24, 48, 0.25),
        0 10px 18px -6px rgba(15, 24, 48, 0.5);
    position: relative;
    transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1);
    flex-shrink: 0;
}

/* glossy peel highlight */
.brand-abbr::before,
.nav-mini-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 45%);
    pointer-events: none;
}

/* little red dot — the cover's red, used once */
.brand-abbr::after {
    content: '';
    position: absolute;
    top: -7px;
    right: -7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--red);
    border: 2.5px solid #fff;
}

.brand-abbr {
    font-size: 1.85rem;
    letter-spacing: -0.02em;
    line-height: 1;
    padding: 0.42rem 0.8rem 0.46rem;
}

.brand-link:hover .brand-abbr { transform: rotate(-1deg) scale(1.04); }

.brand-info { display: flex; flex-direction: column; gap: 0.2rem; }

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--ink);
    line-height: 1.2;
    max-width: 30ch;
}

.brand-issn { font-size: 0.78rem; color: rgba(15, 24, 48, 0.65); }

/* ─── Main nav ───────────────────────────────────────────────── */
.main-nav .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 56px;
    border-top: 1px solid rgba(15, 24, 48, 0.14);
}

.site-header.is-scrolled .main-nav .container { border-top-color: transparent; }

/* small sticker that appears when the header has folded */
.nav-mini-brand {
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    line-height: 1;
    padding: 0.3rem 0 0.33rem;
    border-width: 2px;
    border-radius: 10px;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    border-color: transparent;
    transition: max-width 0.32s ease, opacity 0.2s ease, margin 0.32s ease, padding 0.32s ease;
}

.nav-mini-brand::before { border-radius: 8px; }

.site-header.is-scrolled .nav-mini-brand {
    max-width: 120px;
    opacity: 1;
    margin-right: 0.9rem;
    padding-inline: 0.55rem;
    border-color: #fff;
}

.nav-mini-brand:hover { color: var(--ink); transform: rotate(-1deg) scale(1.05); }

.nav-list {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    list-style: none;
    flex: 1;
}

.nav-list > li > a,
.nav-list > li > .dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 550;
    color: rgba(15, 24, 48, 0.85);
    background: none;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--transition), background var(--transition);
    font-family: var(--font-body);
    line-height: 1.4;
}

.nav-list > li > a i:first-child,
.dropdown-trigger > i:first-child { font-size: 0.8rem; opacity: 0.6; }

.nav-list > li > a:hover,
.nav-list > li > .dropdown-trigger:hover,
.has-dropdown.open > .dropdown-trigger {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.4);
}

.nav-list > li > a.active,
.nav-list > li.active > .dropdown-trigger {
    color: var(--ink);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 24, 48, 0.12);
}

.nav-list > li > a.active i:first-child,
.nav-list > li.active > .dropdown-trigger > i:first-child { opacity: 1; color: var(--red); }

/* ─── Dropdown ───────────────────────────────────────────────── */
.has-dropdown { position: relative; }

.dropdown-trigger .fa-chevron-down { font-size: 0.62rem; transition: transform var(--transition); }

.has-dropdown.open .dropdown-trigger .fa-chevron-down,
.has-dropdown:focus-within .dropdown-trigger .fa-chevron-down { transform: rotate(180deg); }

.dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    min-width: 230px;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    list-style: none;
    padding: 0.4rem;
    z-index: 1000;
}

.dropdown-panel::before {
    content: '';
    position: absolute;
    inset: -10px 0 auto 0;
    height: 10px;
}

.has-dropdown:hover .dropdown-panel,
.has-dropdown.open .dropdown-panel { display: block; }

.dropdown-panel li a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    border-radius: 9px;
    transition: background var(--transition);
}

.dropdown-panel li a:hover { background: var(--lav-soft); color: var(--ink); }
.dropdown-panel li a.active { background: var(--lav-soft); color: var(--blue-deep); font-weight: 600; }

.dropdown-panel li a i {
    width: 1rem;
    text-align: center;
    color: var(--blue-deep);
    font-size: 0.82rem;
}

/* ─── Submit CTA ─────────────────────────────────────────────── */
.nav-submit-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.2rem;
    margin-left: auto;
    background: var(--red);
    color: #fff !important;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 6px 14px -6px rgba(179, 26, 34, 0.7);
    transition: background var(--transition);
}

.nav-submit-btn i { font-size: 0.78rem; }
.nav-submit-btn:hover { background: var(--ink); color: #fff !important; }

/* ─── Mobile toggle ──────────────────────────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.9rem 0;
    margin-left: auto;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1080px) {
    .nav-list > li > a i:first-child,
    .dropdown-trigger > i:first-child { display: none; }
}

@media (max-width: 900px) {
    .nav-toggle { display: flex; }

    .main-nav .container { flex-wrap: wrap; padding-right: 1.1rem; }

    .nav-list {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.1rem;
        width: 100%;
        border-top: 1px solid rgba(15, 24, 48, 0.14);
        padding: 0.6rem 0 1rem;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    .nav-list.open { display: flex; }

    .nav-list > li > a,
    .nav-list > li > .dropdown-trigger {
        padding: 0.75rem 0.9rem;
        width: 100%;
        justify-content: flex-start;
        border-radius: 12px;
    }

    .nav-list > li > a i:first-child,
    .dropdown-trigger > i:first-child { display: inline-block; }

    .dropdown-panel {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: transparent;
        padding: 0 0 0 1.2rem;
        min-width: 0;
    }

    .dropdown-panel::before { display: none; }
    .dropdown-panel li a:hover,
    .dropdown-panel li a.active { background: rgba(255, 255, 255, 0.4); }
    .has-dropdown:hover .dropdown-panel { display: none; }
    .has-dropdown.open .dropdown-panel { display: block; }

    .nav-submit-btn { display: none; }
    .header-top .header-faculty { display: none; }
    .header-top .container { justify-content: flex-end; }

    .site-header.is-scrolled .nav-mini-brand { margin-right: auto; }
}

@media (max-width: 520px) {
    .brand-link { gap: 0.9rem; }
    .brand-abbr { font-size: 1.45rem; border-radius: 12px; }
    .brand-title { font-size: 0.95rem; }
    .brand-issn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .header-collapse { transition: none; }
}
