/* Header mega menu. Everything is scoped to .mm-header / .mm-* so it cannot touch the Tailwind pages around it.
   Design values come from the approved mockup (public/mockups/project-archive.css and pillars.css). */
.mm-header {
    --mm-green: #00594c; --mm-orange: #f96906; --mm-orange-text: #b84a00; --mm-ink: #333; --mm-muted: #626b68; --mm-line: #dce6e2; --mm-tint: #f0f7f4;
    --mm-bar: 80px;
    position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: #fff; box-shadow: 0 2px 12px #00594c14;
    font-family: "Hanken Grotesk", system-ui, sans-serif; color: var(--mm-ink); line-height: 1.4; text-align: left;
}
.mm-header *, .mm-header *::before, .mm-header *::after { box-sizing: border-box; }
.mm-header a { color: inherit; text-decoration: none; }
.mm-header button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
.mm-header strong, .mm-header h2, .mm-header h3 { font-weight: 700; margin: 0; }
.mm-header p { margin: 0; }
.mm-header :focus-visible, .mm-skip:focus-visible { outline: 3px solid var(--mm-green); outline-offset: 2px; }
.mm-header .mm-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
html { scroll-padding-top: 88px; } /* anchors and focused elements stay clear of the fixed header */
.mm-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mm-skip { position: fixed; top: 10px; left: 10px; z-index: 100; transform: translateY(-250%); background: #fff; color: var(--mm-green); font-weight: 700; padding: 12px 16px; border-radius: 6px; box-shadow: 0 2px 12px #0003; }
.mm-skip:focus { transform: none; }

.mm-bar, .mm-wrap { width: min(1240px, calc(100% - 80px)); margin-inline: auto; }
.mm-bar { display: flex; align-items: center; gap: 26px; height: var(--mm-bar); }
.mm-logo img { display: block; width: 158px; height: auto; }
.mm-desktop-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; font-size: 15px; font-weight: 600; white-space: nowrap; }
.mm-desktop-nav button { position: relative; display: flex; align-items: center; gap: 5px; min-height: 48px; }
.mm-desktop-nav .mm-icon { width: 15px; height: 15px; transition: transform .18s ease; }
.mm-desktop-nav button:hover, .mm-desktop-nav button[aria-expanded=true] { color: var(--mm-green); }
.mm-desktop-nav button[aria-expanded=true] { box-shadow: 0 3px var(--mm-orange); }
.mm-desktop-nav button[aria-expanded=true] .mm-icon { transform: rotate(180deg); }
/* same orange and hover as the site's existing button */
.mm-donate { display: flex; align-items: center; gap: 12px; border-radius: 50px; background: var(--mm-orange); padding: 10px 10px 10px 20px; color: #fff !important; font-weight: 700; font-size: 15px; }
.mm-donate .mm-icon { background: #ff964d; border-radius: 50%; width: 29px; height: 29px; padding: 6px; }
.mm-donate:hover { background: #000; }
.mm-donate:hover .mm-icon { background: var(--mm-orange); }
.mm-lang { display: flex; gap: 2px; font-size: 13px; font-weight: 700; }
.mm-lang button { min-width: 36px; min-height: 36px; border-radius: 18px; color: var(--mm-muted); }
.mm-lang button[aria-pressed=true] { color: var(--mm-green); background: var(--mm-tint); }
.mm-lang button:hover { color: var(--mm-green); }
.mm-toggle { display: none; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--mm-green); }

.mm-panel { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - var(--mm-bar)); overflow-y: auto; background: #fff; border-top: 1px solid var(--mm-line); border-bottom: 4px solid var(--mm-green); box-shadow: 0 24px 35px #003b322e; }
.mm-panel[hidden], .mm-mobile[hidden], [data-mm-pillar-panel][hidden] { display: none; }
.mm-text-link { display: flex; align-items: center; gap: 9px; min-height: 44px; color: var(--mm-green) !important; font-weight: 700; font-size: 13px; }
.mm-text-link:hover { text-decoration: underline !important; text-underline-offset: 5px; }

/* Pillars and programs panel */
.mm-pillars-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 30px; padding-block: 28px; }
.mm-selector { padding-right: 25px; border-right: 1px solid var(--mm-line); }
.mm-label { color: var(--mm-muted); font-size: 13px; font-weight: 600; }
.mm-switch { display: grid; gap: 7px; margin: 12px 0 14px; }
.mm-switch button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; min-height: 76px; padding: 12px; text-align: left; border: 1px solid transparent; border-radius: 8px; background: #fff; }
.mm-switch button[aria-pressed=true] { background: var(--mm-green); color: #fff; }
.mm-switch button:not([aria-pressed=true]):hover { background: var(--mm-tint); }
.mm-switch strong { display: block; font-size: 18px; }
.mm-switch small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.35; }
.mm-switch .mm-icon { width: 17px; height: 17px; }
.mm-pillar-content { min-width: 0; }
.mm-pillar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 235px; gap: 25px; }
.mm-program-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 0 13px; }
.mm-program-heading h2 { color: var(--mm-green); font-size: 20px; }
.mm-program-heading > span { font-size: 12px; color: var(--mm-muted); white-space: nowrap; }
.mm-program-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.mm-program-list > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 81px; padding: 15px 8px; border-top: 1px solid var(--mm-line); }
.mm-program-list > a:hover, .mm-program-list > a:focus-visible { background: var(--mm-tint); }
.mm-program-list > a:hover strong, .mm-program-list > a:focus-visible strong { text-decoration: underline; text-underline-offset: 4px; }
.mm-program-list strong { display: block; font-size: 14px; color: var(--mm-green); line-height: 1.25; }
.mm-program-list small { display: block; margin-top: 5px; font-size: 12px; color: var(--mm-muted); line-height: 1.4; }
.mm-feature { display: flex; flex-direction: column; background: var(--mm-tint); border-radius: 10px; overflow: hidden; }
.mm-feature > img { display: block; width: 100%; height: 155px; object-fit: cover; }
.mm-feature > div { padding: 19px; }
.mm-feature div > span { font-size: 12px; color: var(--mm-green); }
.mm-feature h3 { font-size: 21px; color: var(--mm-green); line-height: 1.2; margin-top: 7px; }
.mm-feature p { font-size: 13px; color: var(--mm-muted); line-height: 1.45; margin-top: 8px; }
.mm-feature strong { display: flex; align-items: center; gap: 8px; margin-top: 15px; font-size: 13px; color: var(--mm-green); }
.mm-feature:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.mm-work { background: #f5f8f7; border-top: 1px solid var(--mm-line); }
.mm-work > div { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; min-height: 55px; }
.mm-work span { font-size: 12px; color: var(--mm-muted); margin-right: auto; }
.mm-work a { color: var(--mm-green) !important; font-size: 12px; font-weight: 600; padding-block: 16px; }
.mm-work a:hover { text-decoration: underline !important; text-underline-offset: 4px; }

/* Other groups: heading, text, links, picture */
.mm-secondary-layout { display: grid; grid-template-columns: 265px minmax(0, 1fr) 250px; gap: 40px; padding-block: 30px; }
.mm-secondary-layout.mm-no-image { grid-template-columns: 265px minmax(0, 1fr); }
.mm-secondary-layout h2 { color: var(--mm-green); font-size: 27px; line-height: 1.2; }
.mm-secondary-layout > div > p { font-size: 14px; line-height: 1.6; margin-top: 14px; color: var(--mm-muted); }
.mm-secondary-layout > img { display: block; height: 245px; width: 100%; border-radius: 10px; object-fit: cover; }
.mm-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; align-content: start; }
.mm-links > a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--mm-line); }
.mm-links strong { display: block; color: var(--mm-green); font-size: 15px; }
.mm-links small { display: block; margin-top: 5px; font-size: 12px; line-height: 1.5; color: var(--mm-muted); }
.mm-links .mm-icon { width: 16px; height: 16px; color: var(--mm-green); }
.mm-links a:hover strong, .mm-links a[aria-current=page] strong { text-decoration: underline; text-underline-offset: 4px; }

/* Mobile menu */
.mm-mobile { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - var(--mm-bar)); overflow: auto; background: #fff; padding: 15px 30px 30px; box-shadow: 0 20px 30px #00594c24; }
.mm-mobile a, .mm-mobile summary { display: block; width: 100%; min-height: 44px; padding: 14px 4px; border-bottom: 1px solid var(--mm-line); color: var(--mm-green) !important; }
.mm-mobile summary { cursor: pointer; font-weight: 700; }
.mm-mobile details > a { padding-left: 18px; font-size: 14px; }
.mm-mobile details details { padding-left: 18px; }
.mm-mobile details details > a { padding-left: 14px; }
.mm-mobile .mm-mobile-main { font-weight: 700; background: var(--mm-tint); }
.mm-mobile-lang { display: flex; gap: 10px; padding-top: 18px; }
.mm-mobile-lang button { min-height: 44px; padding: 0 18px; border: 1px solid var(--mm-line); border-radius: 22px; color: var(--mm-muted); font-weight: 600; }
.mm-mobile-lang button[aria-pressed=true] { background: var(--mm-green); border-color: var(--mm-green); color: #fff; }

@media (max-width: 1320px) {
    .mm-bar { gap: 18px; }
    .mm-desktop-nav { gap: 18px; font-size: 14px; }
    .mm-logo img { width: 140px; }
    .mm-pillars-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 22px; }
    .mm-pillar-layout { grid-template-columns: minmax(0, 1fr) 180px; gap: 18px; }
    .mm-program-list { gap: 0 13px; }
    .mm-program-list strong { font-size: 13px; }
    .mm-feature > div { padding: 15px; }
    .mm-feature h3 { font-size: 19px; }
    .mm-secondary-layout { grid-template-columns: 220px minmax(0, 1fr) 180px; gap: 25px; }
    .mm-secondary-layout.mm-no-image { grid-template-columns: 220px minmax(0, 1fr); }
}
/* Below 1180px the bar can no longer hold five groups with long Indonesian names, Donate and the language switch. */
@media (max-width: 1180px) {
    .mm-desktop-nav, .mm-lang, .mm-panel { display: none !important; }
    .mm-logo { margin-right: auto; }
    .mm-toggle { display: flex; }
}
@media (max-width: 600px) {
    .mm-header { --mm-bar: 72px; }
    .mm-bar { width: calc(100% - 36px); gap: 13px; }
    .mm-logo img { width: 124px; }
    .mm-donate { padding: 9px 14px; font-size: 13px; }
    .mm-donate .mm-icon { display: none; }
    .mm-toggle { font-size: 14px; }
    .mm-mobile { padding: 10px 18px 24px; }
}
@media (min-width: 1181px) { .mm-mobile { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .mm-header * { transition: none !important; } }
