/* Mega menu 2.0 (switch nav_mega2, only with the double bar nav_split) — markup: templates/partials/header-mm2-panel.php.
   Desktop: every menu opens full content width under the nav bar. Below 1121px the same markup is the hamburger accordion
   (header-classic.js). Pictures live in --mm2-img and only become backgrounds while a menu is open. */

.mm2 *, .mm2 *::before, .mm2 *::after { box-sizing: border-box; }

/* ── Entries ─────────────────────────────────────────────────────────── */
.header__nav .mm2 a.mm2__link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.25rem;
    padding: 0.25rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.2;
    color: #e0ddd5;
    white-space: normal;
    text-align: left;
    background: none;
}
.header__nav .mm2 a.mm2__link:hover,
.header__nav .mm2 a.mm2__link:focus-visible {
    background: rgba(165, 9, 5, 0.14);
    color: #fff;
}
.header__nav .mm2 a.mm2__link.active { color: #ff5a4e; background: rgba(165, 9, 5, 0.1); }
.mm2__ic {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #2a2a35;
    border-radius: 4px;
    background: #0f1013 no-repeat center / 22px 22px;
    color: #c4a24e;
}
.mm2__txt { display: flex; flex-direction: column; min-width: 0; }
.mm2__name { overflow-wrap: anywhere; }
.mm2__desc {
    font-size: 0.78rem;
    color: #a09d94;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mm2__meta {
    margin-left: auto;
    padding-left: 0.4rem;
    font-size: 0.78rem;
    color: #a09d94;
    font-variant-numeric: tabular-nums;
}
.header__nav .mm2 a.mm2__link--hl { font-weight: 700; color: #fff; }
.mm2__link--hl .mm2__ic { border-color: rgba(212, 11, 6, 0.6); }
.header__nav .mm2 a.mm2__link--ptr { color: #ff6b6b; font-weight: 700; }
.mm2__link--ptr .mm2__ic { color: #ff5a4e; border-color: rgba(212, 11, 6, 0.5); }
.header__nav .mm2 a.mm2__link--new { background: #17693c; color: #fff; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(0, 255, 127, 0.35); }
.header__nav .mm2 a.mm2__link--new:hover,
.header__nav .mm2 a.mm2__link--new.active { background: #1f8a4f; color: #fff; }
.mm2__link--new .mm2__ic { background-color: rgba(0, 0, 0, 0.25); border-color: rgba(0, 255, 127, 0.35); color: #b6f5cb; }

.mm2__head {
    margin: 0 0 0.45rem;
    padding: 0 0 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #c4a24e;
    border-bottom: 1px solid rgba(196, 162, 78, 0.22);
}
.mm2__head--sub { margin-top: 1rem; }
.mm2__col { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mm2__grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 1.75rem; }

/* Class tiles */
.mm2__classes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.header__nav .mm2 a.mm2__class {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    height: 5.25rem;
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #2a2a35;
    border-radius: 4px;
    background: #0f1013 no-repeat center 22% / 0 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    white-space: normal;
    line-height: 1.15;
}
.mm2__class::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: inherit;
    background-size: cover;
    opacity: 0.45;
    filter: brightness(0.7);
    transition: opacity 0.2s ease, transform 0.3s ease;
}
.mm2__class::after {
    content: '';
    position: absolute;
    inset: 40% 0 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
}
.header__nav .mm2 a.mm2__class:hover,
.header__nav .mm2 a.mm2__class:focus-visible,
.header__nav .mm2 a.mm2__class.active { border-color: rgba(212, 11, 6, 0.7); background-color: #0f1013; color: #fff; }
.mm2__class:hover::before,
.mm2__class:focus-visible::before,
.mm2__class.active::before { opacity: 0.85; transform: scale(1.05); }
.mm2__class-ic { flex: 0 0 26px; width: 26px; height: 26px; background: no-repeat center / contain; }
.mm2__class-n { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); overflow-wrap: normal; hyphens: auto; min-width: 0; }
/* Desktop tiles: icon above the name, so long names ("Totenbeschwörer") get the full tile width */
@media (min-width: 1121px) {
    .header__nav .mm2 a.mm2__class { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 0.3rem; }
    .mm2__class-ic { flex-basis: auto; width: 22px; height: 22px; }
}

.mm2__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.header__nav .mm2 a.mm2__chip {
    padding: 0.3rem 0.7rem;
    border: 1px solid #2a2a35;
    border-radius: 999px;
    background: #1a1b20;
    font-size: 0.84rem;
    color: #e0ddd5;
}
.header__nav .mm2 a.mm2__chip:hover,
.header__nav .mm2 a.mm2__chip:focus-visible { border-color: #d40b06; color: #fff; background: #1a1b20; }

/* Picture cards (news, guides) */
.header__nav .mm2 a.mm2__card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 4px;
    white-space: normal;
}
.header__nav .mm2 a.mm2__card:hover,
.header__nav .mm2 a.mm2__card:focus-visible { background: rgba(165, 9, 5, 0.12); }
.mm2__card-img {
    flex: 0 0 6.5rem;
    width: 6.5rem;
    height: 3.75rem;
    border: 1px solid #2a2a35;
    border-radius: 3px;
    background: #0f1013 no-repeat;
    background-size: cover;
}
.mm2__card-txt { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.mm2__card-t {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mm2__card-d { font-size: 0.78rem; color: #a09d94; }

/* BluePosts */
.header__nav .mm2 a.mm2__bp {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.3rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 4px;
    white-space: normal;
}
.header__nav .mm2 a.mm2__bp:hover,
.header__nav .mm2 a.mm2__bp:focus-visible { background: rgba(165, 9, 5, 0.12); }
.mm2__bp-t {
    font-size: 0.875rem;
    color: #e0ddd5;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mm2__bp-d { font-size: 0.72rem; color: #8fb6ff; letter-spacing: 0.03em; }

/* Picture box (season, PTR) */
.header__nav .mm2 a.mm2__feat {
    position: relative;
    isolation: isolate;
    flex: 0 0 20rem;
    width: 20rem;
    min-height: 15rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
    margin: 0;
    border: 1px solid #2a2a35;
    border-radius: 4px;
    overflow: hidden;
    background: #0f1013;
    white-space: normal;
}
.header__nav .mm2 a.mm2__feat:hover { border-color: rgba(212, 11, 6, 0.6); background: #0f1013; }
.mm2__feat-img {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: no-repeat center / cover;
    opacity: 0.75;
    transition: transform 0.4s ease, opacity 0.2s ease;
}
.mm2__feat:hover .mm2__feat-img { opacity: 0.9; transform: scale(1.03); }
.mm2__feat-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(15, 16, 19, 0) 20%, rgba(15, 16, 19, 0.9) 66%, #0f1013 100%);
}
.mm2__feat-c { display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem; }
.mm2__feat-k { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: #c4a24e; }
.mm2__feat-k.is-green { color: #6fdc8c; }
.mm2__feat-k.is-red { color: #ff6b5f; }
.mm2__feat-t { font-family: var(--font-heading, 'OldFenris', serif); font-size: 1.3rem; line-height: 1.15; color: #fff; }
.mm2__feat-p { font-size: 0.85rem; line-height: 1.35; color: #c9c6be; }
.mm2__feat-cta { margin-top: 0.2rem; font-size: 0.875rem; font-weight: 700; color: #ff6b5f; }

/* Footer strip */
.mm2__foot {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.5rem;
    border-top: 1px solid #2a2a35;
    background: #121317;
    font-size: 0.84rem;
    color: #a09d94;
}
.mm2__foot-r { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.25rem 1.25rem; }
.header__nav .mm2 .mm2__foot a {
    display: inline;
    padding: 0;
    margin: 0;
    background: none;
    font-size: 0.875rem;
    color: #e0ddd5;
}
.header__nav .mm2 .mm2__foot a:hover,
.header__nav .mm2 .mm2__foot a:focus-visible { color: #fff; background: none; }
.header__nav .mm2 .mm2__foot a.is-strong { color: #ff6b5f; font-weight: 700; }
.header__nav .mm2 .mm2__foot a.is-strong:hover { color: #ff8a80; }
.mm2__search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 20rem;
    max-width: 45%;
    height: 2rem;
    padding: 0 0.65rem;
    border: 1px solid #2a2a35;
    border-radius: 4px;
    background: #1f2025;
    color: #a09d94;
    font: inherit;
    font-size: 0.875rem;
    cursor: text;
}
.mm2__search span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mm2__search:hover,
.mm2__search:focus-visible { border-color: rgba(212, 11, 6, 0.55); outline: none; box-shadow: 0 0 0 3px rgba(165, 9, 5, 0.15); }

/* ── Desktop: full content width under the bar ──────────────────────── */
@media (min-width: 1121px) {
    .header__nav--mm2 .header__nav-dropdown { position: static; }
    /* The bridge over the gap between item and bar edge sits on the item itself (the menu is no longer below it) */
    .header__nav.header__nav--mm2 .header__nav-dropdown::after { content: none; }
    .header__nav--mm2 .header__nav-dropdown__toggle { position: relative; }
    .header__nav--mm2 .header__nav-dropdown__toggle::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 0.9rem;
    }
    /* Open item: red line on the bar edge, joins the panel */
    .header__nav--mm2 .header__nav-dropdown:not(.is-dismissed):is(:hover, :focus-within) > .header__nav-dropdown__toggle {
        color: #fff;
    }

    .header__nav.header__nav--mm2 .header__nav-dropdown .header__nav-dropdown__menu.mm2 {
        position: absolute;
        top: calc(100% + 1px);
        left: 1.5rem;
        right: 1.5rem;
        width: auto;
        min-width: 0;
        max-height: calc(100vh - 7rem);
        overflow-y: auto;
        padding: 0;
        display: flex;
        flex-direction: column;
        background: #17181d;
        border: 1px solid #2a2a35;
        border-top: 2px solid #a50905;
        border-radius: 0 0 6px 6px;
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
        transform: translateY(-4px);
        /* closing is instant, so two panels never overlap while moving along the bar */
        transition: opacity 0.12s ease, transform 0.12s ease;
        cursor: default;
    }
    .header__nav.header__nav--mm2 .header__nav-dropdown:not(.is-dismissed):is(:hover, :focus-within) .header__nav-dropdown__menu.mm2 {
        transform: translateY(0);
    }
    .header__nav.header__nav--mm2 .header__nav-dropdown.is-dismissed .header__nav-dropdown__menu.mm2 {
        opacity: 0;
        visibility: hidden;
    }

    .mm2__body { display: flex; gap: 2rem; padding: 1.35rem 1.5rem 1.25rem; }
    .mm2__cols { flex: 1; display: grid; gap: 1.75rem; min-width: 0; align-content: start; }
    .mm2__cols--home   { grid-template-columns: minmax(14rem, 1fr) minmax(0, 1.5fr) minmax(0, 1.2fr); }
    .mm2__cols--builds { grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr); }
    .header__nav :is(.mm2--builds, .mm2--database) a.mm2__feat { flex-basis: 16rem; width: 16rem; }
    .mm2__cols--guides { grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); }
    .mm2__cols--db     { grid-template-columns: repeat(var(--mm2-n, 4), minmax(0, 1fr)); }
    .mm2__cols--list   { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
    /* Languages without translated news / guides with a picture: no empty column on the right */
    .mm2__cols--home:not(:has(> :nth-child(3))) { grid-template-columns: minmax(14rem, 1fr) minmax(0, 2.7fr); }
    .mm2__cols--home:only-child:has(> :only-child),
    .mm2__cols--guides:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
    .mm2__cols--guides:has(> :only-child) .mm2__grid2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    /* Pictures only while open */
    .header__nav-dropdown:not(.is-dismissed):is(:hover, :focus-within) .mm2 .mm2__ic--img,
    .header__nav-dropdown:not(.is-dismissed):is(:hover, :focus-within) .mm2 .mm2__class-ic,
    .header__nav-dropdown:not(.is-dismissed):is(:hover, :focus-within) .mm2 .mm2__card-img,
    .header__nav-dropdown:not(.is-dismissed):is(:hover, :focus-within) .mm2 .mm2__feat-img {
        background-image: var(--mm2-img);
    }
    .header__nav-dropdown:not(.is-dismissed):is(:hover, :focus-within) .mm2 a.mm2__class {
        background-image: var(--mm2-img);
    }
}
@media (min-width: 1121px) and (max-width: 1280px) {
    .mm2__body { gap: 1.25rem; padding: 1.1rem 1.1rem 1rem; }
    .mm2__cols { gap: 1.25rem; }
    .header__nav .mm2 a.mm2__feat { flex-basis: 16rem; width: 16rem; }
    .header__nav :is(.mm2--builds, .mm2--database) a.mm2__feat { flex-basis: 13rem; width: 13rem; }
    /* Narrow: class names must not break mid-word — no icon, smaller type, real hyphenation */
    .header__nav .mm2 a.mm2__class { font-size: 0.8rem; padding: 0.4rem 0.45rem; }
    .mm2__card-img { flex-basis: 5rem; width: 5rem; height: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .mm2__class::before, .mm2__feat-img { transition: none; }
    .mm2__class:hover::before, .mm2__feat:hover .mm2__feat-img { transform: none; }
}

/* ── Mobile: accordion inside the hamburger menu ────────────────────── */
@media (max-width: 1120px) {
    .header__nav .header__nav-dropdown__menu.mm2 { padding: 0.35rem 1rem 0.85rem 1.25rem; background: #17181d; }
    .mm2__desk, .mm2__feat, .mm2__search, .mm2__foot > span:first-child { display: none !important; }
    .mm2__body, .mm2__cols { display: flex; flex-direction: column; gap: 0.9rem; }
    .mm2__head { margin-top: 0.5rem; }
    .mm2__col, .mm2__grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; }
    .mm2__col > .mm2__head, .mm2__col > .mm2__classes, .mm2__col > .mm2__chips, .mm2__col > .mm2__grid2 { grid-column: 1 / -1; }
    .header__nav .mm2 a.mm2__link {
        margin: 0;
        min-height: 2.75rem;
        padding: 0.3rem 0.5rem;
        border: 1px solid #2a2a35;
        background: #131418;
        font-size: 0.9rem;
    }
    .mm2__desc { display: none; }
    .mm2__ic { flex-basis: 24px; width: 24px; height: 24px; background-size: 20px 20px; }
    .mm2__classes { gap: 0.35rem; }
    .header__nav .mm2 a.mm2__class {
        height: auto;
        min-height: 4rem;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.4rem 0.2rem;
        font-size: 0.72rem;
        text-align: center;
    }
    .mm2__chips { gap: 0.35rem; }
    .mm2__foot { padding: 0.75rem 0 0; margin-top: 0.75rem; background: none; }
    .mm2__foot-r { margin: 0 auto 0 0; justify-content: flex-start; }
    .header__nav .mm2 .mm2__foot a { font-size: 0.9rem; }

    /* Pictures: the closed accordion is display:none, so nothing loads before it opens */
    .mm2 .mm2__ic--img, .mm2 .mm2__class-ic { background-image: var(--mm2-img); }
    .header__nav .mm2 a.mm2__class { background-image: var(--mm2-img); }
}

/* Menü „Beute“ (15.11.2026): Rubrik Beutefilter breit links, Beute & Bosse, Nachschlagen, Bildkasten zum Editor */
.mm2__note { margin: 0; padding: 0.35rem 0.5rem; font-size: 0.8rem; color: #8b8a84; }
.mm2__lfnew { display: grid; gap: 0.1rem; }
.header__nav .mm2--loot .mm2__lfnew a.mm2__link .mm2__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1121px) {
    .mm2__cols--loot { grid-template-columns: minmax(0, 1.7fr) minmax(12rem, 1fr) minmax(12rem, 1fr); }
    .header__nav .mm2--loot a.mm2__feat { flex-basis: 16rem; width: 16rem; }
    .header__nav .mm2--loot .mm2__lfnew { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 0.75rem; }
}
@media (min-width: 1121px) and (max-width: 1320px) {
    .header__nav .mm2--loot a.mm2__feat { flex-basis: 13rem; width: 13rem; }
    .header__nav .mm2--loot .mm2__lfnew { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1120px) {
    .mm2__col > .mm2__lfnew, .mm2__col > .mm2__note { grid-column: 1 / -1; }
    .mm2__lfnew { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
}
