/* =================================================================
   ARGUMENTA HEADER v8.0  —  Clean Rebuild
   Referensi: Bisnisia.id

   STRUKTUR:
   ┌─────────────────────────────────────────────────────────┐
   │ .nw-ticker  (dark scrolling bar, selalu tampil)         │
   ├─────────────────────────────────────────────────────────┤
   │ .nw-hdr  (DESKTOP ≥1025px, sticky)                     │
   │   ├ .nw-hdr__top:  [LOGO ← kiri]   [tanggal → kanan]  │
   │   └ .nw-hdr__nav:  [MENU ← kiri]   [CARI → kanan]     │
   │       .nw-hdr.nw-scrolled → top hilang, logo muncul    │
   ├─────────────────────────────────────────────────────────┤
   │ .nw-mob-hdr  (MOBILE ≤1024px, sticky)                  │
   │   [☰ kiri]  [LOGO center]  [🔍 kanan]                  │
   ├─────────────────────────────────────────────────────────┤
   │ .nw-drawer  (slide panel, semua ukuran layar mobile)    │
   │   [Logo center]  [✕ pojok kanan]                       │
   │   Menu list bersih                                      │
   └─────────────────────────────────────────────────────────┘
================================================================= */

/* ── TICKER ─────────────────────────────────────────────────── */
.nw-ticker {
    width: 100%;
    height: 36px;
    background: #064044;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    z-index: 900;
    flex-shrink: 0;
}
.nw-ticker__badge {
    flex-shrink: 0;
    height: 100%;
    padding: 0 1.5rem 0 1rem;
    display: flex;
    align-items: center;
    background: #09575b;
    color: #fff;
    font-family: var(--font-mono, monospace);
    font-size: .56rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    white-space: nowrap;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
}
.nw-ticker__track {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    height: 100%;
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.nw-ticker__rail {
    display: inline-flex;
    align-items: center;
    height: 36px;
    white-space: nowrap;
    animation: argTickerScroll 55s linear infinite;
    will-change: transform;
}
.nw-ticker__rail:hover { animation-play-state: paused; }
@keyframes argTickerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.nw-ticker__link {
    display: inline-block;
    padding: 0 1.75rem;
    font-size: .67rem;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s;
}
.nw-ticker__link:hover { color: rgba(255,255,255,.9); }
.nw-ticker__link::after {
    content: "·";
    margin-left: 1.75rem;
    color: rgba(255,255,255,.25);
    font-size: 1.1rem;
    line-height: 0;
    vertical-align: middle;
}

/* ================================================================
   DESKTOP HEADER  .nw-hdr
   Tampil hanya ≥ 1025px (via @media di bawah)
================================================================ */
.nw-hdr {
    position: sticky;
    top: 0;
    z-index: 800;
    width: 100%;
    background: #fff;
    transition: box-shadow .25s;
}
.nw-hdr.nw-scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,.1);
}

/* Shared inner wrapper */
.nw-hdr__inner {
    max-width: var(--max-w, 1400px);
    margin: 0 auto;
    padding: 0 2.5rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
}

/* ── TOP BAR ─────────────────────────────────────────────────── */
.nw-hdr__top {
    border-bottom: 1px solid #ececec;
    background: #fff;
    transition: height .3s ease, opacity .25s ease;
    overflow: hidden;
    height: 76px;
}
.nw-hdr__top .nw-hdr__inner {
    height: 76px;
    justify-content: space-between; /* logo KIRI, tanggal KANAN */
}

/* Saat scroll: top bar menghilang */
.nw-hdr.nw-scrolled .nw-hdr__top {
    height: 0;
    opacity: 0;
    pointer-events: none;
    border-bottom-color: transparent;
}

/* Logo di topbar */
.nw-hdr__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    line-height: 1;
}
.nw-hdr__logo .custom-logo-link {
    display: flex;
    align-items: center;
}
/* Ukuran logo diset via wp_head CSS (priority 999) di functions.php */

.nw-hdr__sitename {
    font-family: var(--font-display, "Playfair Display", serif);
    font-size: 1.85rem;
    font-weight: 900;
    color: #09575b;
    letter-spacing: -.5px;
    line-height: 1;
    white-space: nowrap;
}

/* Tanggal */
.nw-hdr__date {
    font-family: var(--font-mono, "DM Mono", monospace);
    font-size: .6rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(0,0,0,.36);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── NAVBAR ──────────────────────────────────────────────────── */
.nw-hdr__nav {
    background: #09575b;
    position: relative; /* untuk dropdown search */
}
.nw-hdr__nav .nw-hdr__inner {
    height: 48px;
    align-items: stretch;
}

/* Logo compact — TERSEMBUNYI saat normal, TAMPIL saat scrolled */
.nw-hdr__logo-sc {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 1.25rem;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width .3s ease, opacity .25s ease, margin .3s ease;
    pointer-events: none;
}
.nw-hdr__logo-sc .custom-logo-link { display: flex; align-items: center; }
/* Logo di navbar (background teal) — HARUS putih */
.nw-hdr__logo-sc .custom-logo,
.nw-hdr__logo-sc img {
    filter: brightness(0) invert(1) !important;
    display: block;
}
/* Sitename fallback juga putih */
.nw-hdr__logo-sc .nw-hdr__sitename {
    color: #fff !important;
    font-size: 1.1rem;
}
.nw-hdr.nw-scrolled .nw-hdr__logo-sc {
    max-width: 160px;
    opacity: 1;
    pointer-events: auto;
}

/* Menu */
.nw-hdr__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    flex: 1;
    min-width: 0;
    height: 48px;
    overflow-x: auto;
    scrollbar-width: none;
}
.nw-hdr__menu::-webkit-scrollbar { display: none; }
.nw-hdr__menu > li {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}
.nw-hdr__menu > li > a,
.nw-hdr__menu > li > .nav-a {
    display: flex;
    align-items: center;
    padding: 0 1.1rem;
    font-family: var(--font-body, sans-serif);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .15s, background .15s, border-color .15s;
}
.nw-hdr__menu > li > a:hover,
.nw-hdr__menu > li > .nav-a:hover,
.nw-hdr__menu > li.current-menu-item > a,
.nw-hdr__menu > li.current-page-ancestor > a {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-bottom-color: rgba(255,255,255,.9);
}

/* Tombol Cari */
.nw-hdr__searchbtn {
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: 0 1.25rem;
    height: 48px;
    background: rgba(255,255,255,.1);
    border: none;
    border-left: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.75);
    font-family: var(--font-body, sans-serif);
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.nw-hdr__searchbtn:hover,
.nw-hdr__searchbtn[aria-expanded="true"] {
    background: rgba(255,255,255,.2);
    color: #fff;
}

/* Search dropdown panel */
.nw-hdr__searchbox {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 750;
    background: #fff;
    border-bottom: 3px solid #09575b;
    box-shadow: 0 12px 40px rgba(0,0,0,.12);
    animation: argSearchIn .2s ease;
}
.nw-hdr__searchbox[hidden] { display: none !important; }
@keyframes argSearchIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.nw-hdr__searchbox .nw-hdr__inner {
    height: auto;
    padding-top: .9rem;
    padding-bottom: .9rem;
}
.nw-hdr__searchbox form {
    display: flex;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    border: 1.5px solid #ddd;
    background: #fff;
}
.nw-hdr__searchbox input[type="search"] {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    padding: .65rem 1rem;
    font-family: var(--font-body, sans-serif);
    font-size: .9rem;
    color: #0d0c0a;
    background: transparent;
}
.nw-hdr__searchbox input::placeholder { color: rgba(0,0,0,.3); }
.nw-hdr__searchbox button[type="submit"] {
    flex-shrink: 0;
    padding: 0 1.25rem;
    background: #09575b;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.nw-hdr__searchbox button[type="submit"]:hover { background: #0d6b70; }

/* ================================================================
   MOBILE HEADER  .nw-mob-hdr
   Grid 3 kolom ketat: [burger 48px] [logo auto-center] [search 48px]
   Tampil hanya ≤ 1024px
================================================================ */
.nw-mob-hdr {
    position: sticky;
    top: 0;
    z-index: 800;
    width: 100%;
    background: #fff;
    border-bottom: 2px solid #09575b;
    box-sizing: border-box;
    height: 58px;
    /* Grid 3 kolom: burger | logo | search */
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    padding: 0 6px;
    transition: box-shadow .25s;
}
.nw-mob-hdr.nw-scrolled {
    box-shadow: 0 2px 14px rgba(0,0,0,.1);
}

/* Col 1: Burger */
.nw-mob-hdr__burger {
    grid-column: 1;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #09575b;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    justify-self: start;
}

/* Col 2: Logo CENTER — justify-self:center paksa ke tengah kolom */
.nw-mob-hdr__logo {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    text-decoration: none;
    width: 100%;
    overflow: hidden;
}
.nw-mob-hdr__logo .custom-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
}
.nw-mob-hdr__sitename {
    font-family: var(--font-display, "Playfair Display", serif);
    font-size: 1.3rem;
    font-weight: 900;
    color: #09575b;
    white-space: nowrap;
    line-height: 1;
    text-align: center;
}

/* Col 3: Search */
.nw-mob-hdr__search {
    grid-column: 3;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #09575b;
    padding: 0;
    justify-self: end;
    -webkit-tap-highlight-color: transparent;
}

/* ================================================================
   DRAWER  .nw-drawer
   Background putih, logo CENTER, menu clean
================================================================ */
.nw-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1100;
    width: 100%;
    max-width: 360px;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 4px 0 40px rgba(0,0,0,.18);
    overflow: hidden;
}
.nw-drawer.nw-open {
    transform: translateX(0);
}

/* Overlay */
.nw-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(0,0,0,.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.nw-overlay.nw-open {
    opacity: 1;
    pointer-events: auto;
}

/* Drawer head: logo CENTER, tombol close KANAN */
.nw-drawer__head {
    flex-shrink: 0;
    position: relative;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eee;
    padding: 0 52px; /* beri ruang untuk tombol close */
}
.nw-drawer__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 1;
}
.nw-drawer__logo .custom-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
}
.nw-drawer__logo span {
    font-family: var(--font-display, "Playfair Display", serif);
    font-size: 1.45rem;
    font-weight: 900;
    color: #09575b;
    text-align: center;
    line-height: 1;
}

/* Tombol close: absolute di kanan */
.nw-drawer__close {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1.5px solid #ddd;
    border-radius: 50%;
    color: #555;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    -webkit-tap-highlight-color: transparent;
}
.nw-drawer__close:hover {
    background: #f5f5f5;
    color: #000;
    border-color: #bbb;
}

/* Drawer nav */
.nw-drawer__nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.nw-drawer__menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nw-drawer__menu > li {
    border-bottom: 1px solid #f0ece4;
}
.nw-drawer__menu > li:last-child {
    border-bottom: none;
}
.nw-drawer__menu > li > a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    font-family: var(--font-body, "DM Sans", sans-serif);
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: #0d0c0a;
    text-decoration: none;
    transition: color .15s, background .15s, padding-left .15s;
    -webkit-tap-highlight-color: transparent;
}
.nw-drawer__menu > li > a:hover,
.nw-drawer__menu > li.current-menu-item > a {
    color: #09575b;
    background: #f7f4ef;
    padding-left: 2rem;
}

/* ================================================================
   BREAKPOINTS — PEMISAH KETAT
================================================================ */

/* DESKTOP ≥ 1025px */
@media (min-width: 1025px) {
    .nw-hdr     { display: block; }
    .nw-mob-hdr { display: none !important; }
    .nw-drawer  { display: none !important; }
    .nw-overlay { display: none !important; }
}

/* MOBILE ≤ 1024px */
@media (max-width: 1024px) {
    .nw-hdr     { display: none !important; }
    .nw-mob-hdr { display: grid !important; }
    .nw-drawer  { display: flex; }
    .nw-overlay { display: block; }
}
