/* ActiveNordic navigation
   Desktop: tekstbjælke + mega-dropdown under bjælken (ingen hamburger).
   Mobil: bjælke skjult; hamburger-Katalog + fotodetaljepanel. */

/* —— Skjul hamburger på desktop (kun mobil Katalog) —— */
@media (min-width: 1081px) {
    html.site-gymnordic .menu-btn { display: none !important; }
    html.site-gymnordic #site-nav { display: none !important; }
}

/* —— Desktop tekstbjælke —— */
html.site-gymnordic .an-bar {
    --an-ink: var(--gym-night, #071422);
    --an-soft: #3d4752;
    --an-line: rgba(7, 20, 34, .09);
    --an-volt: var(--gym-volt, #e8c547);
    position: relative;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--an-line);
}
html.site-gymnordic .an-bar-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-padding-inline: var(--edge, 1.25rem);
}
html.site-gymnordic .an-bar-scroll::-webkit-scrollbar { display: none; }
html.site-gymnordic .an-bar.can-left .an-bar-scroll { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px); mask-image: linear-gradient(90deg, transparent 0, #000 32px); }
html.site-gymnordic .an-bar.can-right .an-bar-scroll { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent 100%); }
html.site-gymnordic .an-bar.can-left.can-right .an-bar-scroll { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%); }

html.site-gymnordic .an-bar-list {
    display: flex;
    align-items: stretch;
    width: max-content;
    margin: 0 auto;
    padding: 0 var(--edge, 1.25rem);
    list-style: none;
}
html.site-gymnordic .an-bar-item { display: flex; margin: 0; }
html.site-gymnordic .an-bar-item + .an-bar-item::before {
    content: "";
    align-self: center;
    width: 1px;
    height: .8rem;
    background: var(--an-line);
}
html.site-gymnordic .an-bar-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    height: 3rem;
    margin: 0;
    padding: 0 clamp(.5rem, .72vw, 1.1rem);
    border: 0;
    background: none;
    color: var(--an-soft);
    font-family: var(--display, system-ui, sans-serif);
    font-size: .7rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}
html.site-gymnordic .an-bar-link::after {
    content: "";
    position: absolute;
    left: clamp(.5rem, .72vw, 1.1rem);
    right: clamp(.5rem, .72vw, 1.1rem);
    bottom: -1px;
    height: 2px;
    background: var(--an-ink);
    transform: scaleX(0);
    transition: transform .22s cubic-bezier(.2, .7, .2, 1);
}
html.site-gymnordic .an-bar-link:hover,
html.site-gymnordic .an-bar-link.is-active,
html.site-gymnordic .an-bar-link[aria-expanded="true"] { color: var(--an-ink); }
html.site-gymnordic .an-bar-link:hover::after,
html.site-gymnordic .an-bar-link[aria-expanded="true"]::after { transform: scaleX(1); }
html.site-gymnordic .an-bar-link.is-active { font-weight: 700; }
html.site-gymnordic .an-bar-link.is-active::after { transform: scaleX(1); background: var(--an-volt); height: 3px; }
html.site-gymnordic .an-bar-link[aria-expanded="true"] {
    background: rgba(7, 20, 34, .04);
}
html.site-gymnordic .an-bar-link[aria-expanded="true"]::after { transform: scaleX(1); }
html.site-gymnordic .an-bar-link:focus-visible { outline: 2px solid var(--an-ink); outline-offset: -6px; border-radius: 4px; }
html.site-gymnordic .an-bar-chev { flex: 0 0 auto; opacity: .55; transition: transform .2s ease, opacity .15s ease; }
html.site-gymnordic .an-bar-link:hover .an-bar-chev,
html.site-gymnordic .an-bar-link[aria-expanded="true"] .an-bar-chev { opacity: 1; }
html.site-gymnordic .an-bar-link[aria-expanded="true"] .an-bar-chev { transform: rotate(180deg); }

/* —— Desktop mega-dropdown under bjælken —— */
html.site-gymnordic .an-megas {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 60;
    pointer-events: none;
}
html.site-gymnordic .an-mega {
    pointer-events: auto;
    background: #fff;
    border-bottom: 1px solid var(--an-line);
    box-shadow: 0 18px 40px rgba(7, 20, 34, .12);
}
html.site-gymnordic .an-mega[hidden] { display: none; }
html.site-gymnordic .an-mega-inner {
    display: grid;
    grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr);
    gap: 0;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem clamp(1.25rem, 3vw, 2.5rem) 1.75rem;
}
html.site-gymnordic .an-mega-left {
    padding-right: 1.75rem;
    border-right: 1px solid var(--an-line);
}
html.site-gymnordic .an-mega-all {
    display: inline-block;
    margin: 0 0 1rem;
    color: var(--an-ink);
    font-family: var(--sans, system-ui, sans-serif);
    font-size: 1.15rem;
    font-weight: 750;
    text-decoration: none;
    letter-spacing: -.01em;
}
html.site-gymnordic .an-mega-all:hover { color: var(--an-ink); text-decoration: underline; text-underline-offset: .2em; }
html.site-gymnordic .an-mega-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .1rem;
}
html.site-gymnordic .an-mega-links > li > a,
html.site-gymnordic .an-mega-links .an-fold-link {
    display: block;
    padding: .55rem .65rem;
    margin: 0;
    border-radius: 8px;
    color: var(--an-ink);
    font-size: .98rem;
    font-weight: 650;
    text-decoration: none;
}
html.site-gymnordic .an-mega-links > li > a:hover,
html.site-gymnordic .an-mega-links > li > a.is-active,
html.site-gymnordic .an-mega-links .an-fold-link:hover,
html.site-gymnordic .an-mega-links .an-fold-link.is-active {
    background: rgba(7, 20, 34, .05);
}
/* Dame/Herre accordion folds (mega left) */
html.site-gymnordic .an-fold { margin: 0; }
html.site-gymnordic .an-fold-head {
    display: flex;
    align-items: center;
    gap: .15rem;
    margin: 0 -.65rem;
    border-radius: 8px;
}
html.site-gymnordic .an-fold-head:hover,
html.site-gymnordic .an-fold.is-open > .an-fold-head {
    background: rgba(7, 20, 34, .04);
}
html.site-gymnordic .an-fold-link { flex: 1 1 auto; min-width: 0; margin: 0 !important; }
html.site-gymnordic .an-fold-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--an-ink);
    cursor: pointer;
}
html.site-gymnordic .an-fold-toggle:hover,
html.site-gymnordic .an-fold-toggle:focus-visible {
    background: rgba(7, 20, 34, .07);
}
html.site-gymnordic .an-fold-toggle:focus-visible { outline: 2px solid var(--an-ink); outline-offset: -2px; }
html.site-gymnordic .an-fold-toggle svg { transition: transform .18s ease; opacity: .65; }
html.site-gymnordic .an-fold.is-open > .an-fold-head .an-fold-toggle svg { transform: rotate(180deg); opacity: 1; }
html.site-gymnordic .an-mega-links > .an-fold.has-sub > .an-mega-sub { display: none; }
html.site-gymnordic .an-mega-links > .an-fold.is-open > .an-mega-sub { display: grid; }
html.site-gymnordic .an-mega-sub {
    list-style: none;
    margin: .1rem 0 .45rem .35rem;
    padding: 0 0 0 .85rem;
    border-left: 0;
    gap: .05rem;
}
html.site-gymnordic .an-mega-sub a {
    display: block;
    padding: .4rem .55rem;
    margin: 0 -.55rem;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 500;
    color: #3d4752;
    text-decoration: none;
}
html.site-gymnordic .an-mega-sub a:hover,
html.site-gymnordic .an-mega-sub a.is-active {
    color: var(--an-ink);
    background: rgba(7, 20, 34, .05);
}
html.site-gymnordic .an-mega-right { padding-left: 1.75rem; min-width: 0; }
html.site-gymnordic .an-mega-popular-label {
    margin: .15rem 0 1rem;
    color: #6a7380;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}
/* Fast 4-spaltet gitter: 1–4 tiles har samme bredde/højde (3:4 portrait). */
html.site-gymnordic .an-mega-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem 1.1rem;
    width: 100%;
    max-width: 44rem;
    justify-items: stretch;
    align-items: start;
}
html.site-gymnordic .an-mega-tile {
    display: grid;
    grid-template-rows: auto auto;
    gap: .65rem;
    width: 100%;
    min-width: 0;
    text-decoration: none;
    color: var(--an-ink);
}
html.site-gymnordic .an-mega-tile-media {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    background: #eef1f4;
    border: 1px solid rgba(7, 20, 34, .06);
}
html.site-gymnordic .an-mega-tile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .35s ease;
}
html.site-gymnordic .an-mega-tile:hover .an-mega-tile-media img { transform: scale(1.04); }
html.site-gymnordic .an-mega-tile-media.is-empty {
    background: linear-gradient(145deg, #e8edf2, #f6f3ec);
}
html.site-gymnordic .an-mega-tile-name {
    font-size: .92rem;
    font-weight: 650;
    line-height: 1.3;
}
html.site-gymnordic .an-mega-tile.is-active .an-mega-tile-name {
    box-shadow: inset 0 -2px 0 var(--an-volt);
}

@media (max-width: 1100px) {
    /* Behold 4-kolonne-proportioner; krymp kun den samlede bredde. */
    html.site-gymnordic .an-mega-tiles { max-width: min(44rem, 100%); }
}
@media (max-width: 900px) {
    html.site-gymnordic .an-mega-inner { grid-template-columns: 1fr; }
    html.site-gymnordic .an-mega-left { border-right: 0; padding-right: 0; padding-bottom: 1.25rem; border-bottom: 1px solid var(--an-line); margin-bottom: 1.25rem; }
    html.site-gymnordic .an-mega-right { padding-left: 0; }
}

/* —— Mobil fotodetaljepanel (fra Katalog) —— */
html.site-gymnordic .an-drawer .gym-drawer-hero {
    min-height: 10.5rem;
    height: 10.5rem;
    overflow: hidden;
}
html.site-gymnordic .an-drawer .gym-drawer-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
html.site-gymnordic .an-drawer .gym-drawer-close:focus-visible,
html.site-gymnordic .an-drawer a:focus-visible { outline: 2px solid var(--gym-night, #071422); outline-offset: 2px; }
html.site-gymnordic .an-drawer .gym-drawer-list .nav-ico,
html.site-gymnordic .an-drawer .gym-drawer-list .nav-ico-photo,
html.site-gymnordic .an-drawer .gym-drawer-list svg.nav-ico {
    display: none !important;
}
html.site-gymnordic .an-drawer .gym-drawer-list > li > a,
html.site-gymnordic .an-drawer .an-fold-link {
    display: flex;
    align-items: center;
    gap: 0;
    padding: .85rem 0;
    color: var(--ink, #0d1218);
    font-size: 1.05rem;
    font-weight: 650;
    text-decoration: none;
    border-bottom: 1px solid rgba(7, 20, 34, .08);
}
html.site-gymnordic .an-drawer .gym-drawer-list > li > a.is-active,
html.site-gymnordic .an-drawer .gym-drawer-list > li > a:hover,
html.site-gymnordic .an-drawer .an-fold-link.is-active,
html.site-gymnordic .an-drawer .an-fold-link:hover { color: var(--gym-night, #071422); }
/* Dame/Herre accordion (mobil TYPER) */
html.site-gymnordic .an-drawer .an-fold { border-bottom: 1px solid rgba(7, 20, 34, .08); }
html.site-gymnordic .an-drawer .an-fold-head {
    display: flex;
    align-items: stretch;
    gap: .15rem;
    margin: 0;
}
html.site-gymnordic .an-drawer .an-fold-link {
    flex: 1 1 auto;
    min-width: 0;
    border-bottom: 0 !important;
    padding: .9rem 0;
}
html.site-gymnordic .an-drawer .an-fold-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    align-self: center;
    width: 2.7rem;
    height: 2.7rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--paper, #f3f5f8);
    color: var(--gym-night, #071422);
    cursor: pointer;
}
html.site-gymnordic .an-drawer .an-fold.is-open > .an-fold-head .an-fold-toggle {
    background: var(--gym-night, #071422);
    color: #fff;
}
html.site-gymnordic .an-drawer .an-fold-toggle svg { transition: transform .18s ease; }
html.site-gymnordic .an-drawer .an-fold.is-open > .an-fold-head .an-fold-toggle svg { transform: rotate(180deg); }
html.site-gymnordic .an-drawer .gym-drawer-list > .an-fold.has-sub > .an-drawer-sub { display: none; }
html.site-gymnordic .an-drawer .gym-drawer-list > .an-fold.is-open > .an-drawer-sub { display: block; }
html.site-gymnordic .an-drawer-sub {
    list-style: none;
    margin: 0 0 .55rem;
    padding: .15rem 0 .25rem 1rem;
    border-left: 0;
}
html.site-gymnordic .an-drawer-sub a {
    display: block;
    padding: .45rem .5rem;
    border-radius: 8px;
    border: 0 !important;
    color: var(--muted, #5b6570);
    font-size: .98rem;
    font-weight: 550;
    text-decoration: none;
}
html.site-gymnordic .an-drawer-sub a:hover,
html.site-gymnordic .an-drawer-sub a.is-active {
    color: var(--ink, #0d1218);
    background: var(--paper, #f3f5f8);
}

/* —— Mobil Katalog —— */
html.site-gymnordic .nav.is-open .an-kat-head,
html.site-gymnordic .an-kat-head { color: var(--gym-night, #071422); }
html.site-gymnordic .an-kat-head span {
    color: var(--gym-night, #071422);
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}
html.site-gymnordic .an-kat-head .nav-close {
    color: var(--gym-night, #071422);
    letter-spacing: .14em;
    font-weight: 700;
}
html.site-gymnordic .an-kat { margin: 0; }
html.site-gymnordic .an-kat-list { list-style: none; margin: 0; padding: 0; }
html.site-gymnordic .an-kat-item {
    margin: 0;
    border-bottom: 1px solid rgba(7, 20, 34, .1);
}
html.site-gymnordic .an-kat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    margin: 0;
    padding: 1.12rem 0;
    border: 0;
    background: none;
    color: var(--gym-night, #071422);
    font-family: var(--sans, system-ui, sans-serif);
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
html.site-gymnordic .an-kat-label { flex: 1 1 auto; min-width: 0; }
html.site-gymnordic .an-kat-enter { flex: 0 0 auto; opacity: .55; }
html.site-gymnordic .an-kat-link:hover .an-kat-enter,
html.site-gymnordic .an-kat-link[aria-expanded="true"] .an-kat-enter { opacity: 1; }
html.site-gymnordic .an-kat-link:focus-visible {
    outline: 2px solid var(--gym-night, #071422);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (max-width: 1080px) {
    html.site-gymnordic .an-bar { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    html.site-gymnordic .an-bar-link::after,
    html.site-gymnordic .an-bar-chev,
    html.site-gymnordic .an-fold-toggle svg,
    html.site-gymnordic .an-mega-tile-media img { transition: none; }
    html.site-gymnordic .an-drawer .gym-drawer-aside { animation: none; }
}
