/*
 * Kopfbereich, nachgebaut nach golfclubneuhof.de (gemessen am 26.11.2026).
 * Grundschrift 16 px, ab 1280 px 18 px; alle rem-Werte beziehen sich darauf wie im Original.
 * Soll-Maße 390 px:  Kopfzeile 88 hoch, Wappen x32 y8 96 breit, Partnerzeichen x206 y8 72×72, Schalter x302 y16 56×56.
 * Soll-Maße 1440 px: Kopfzeile 107,4 hoch, Wappen x72 y9 136 breit, Partnerzeichen x1332 y17,7,
 *                    Servicezeile y18 (16,2 px), Hauptmenü y54 (21,6 px), Untermenü ab y107 grau über die ganze Breite.
 */

html { font-size: 16px; }
@media (min-width: 1280px) { html { font-size: 18px; } }

.gcn-skip {
    position: absolute;
    inset: 0 auto auto 0;
    z-index: 100;
    padding: .65rem 1rem;
    color: #fff;
    background: #222;
    transform: translateY(-120%);
}
.gcn-skip:focus { transform: none; }

.gcn-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 1rem 2rem;
    color: #000;
    background: #fff;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px 0 rgb(0 0 0 / 6%);
}
.admin-bar .gcn-header { top: var(--wp-admin--admin-bar--height, 0px); }
.gcn-header ul { margin: 0; padding: 0; list-style: none; }
.gcn-header a { color: inherit; text-decoration: none; }
.gcn-header :is(a, button):focus-visible { outline: 3px solid var(--gcn-gruen-dunkel); outline-offset: 2px; }

/* Clubwappen, ragt über die Kopfzeile hinaus */
.gcn-header__club {
    position: absolute;
    top: .5rem;
    left: 0;
    z-index: 21;
    padding-left: 2rem;
}
.gcn-header__club img { display: block; width: 96px; height: auto; }
.gcn-header__name { display: block; padding-top: 1.5rem; font-weight: 700; }
@media (min-width: 640px) { .gcn-header__club { padding-left: 4rem; } }
@media (min-width: 768px) { .gcn-header__club img { width: 136px; } }

/* Partnerzeichen */
.gcn-header__partner {
    position: absolute;
    top: 50%;
    right: 7rem;
    z-index: 20;
    transform: translateY(-50%);
}
.gcn-header__partner img { display: block; width: 72px; height: 72px; }

/* Menüschalter mit der Animation des Originals */
.gcn-header__toggle {
    display: flex;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.gcn-header__toggle[hidden] { display: none; }
.gcn-burger__linie {
    fill: none;
    stroke: #000;
    stroke-width: 6;
    transition: stroke-dasharray .6s cubic-bezier(.4, 0, .2, 1), stroke-dashoffset .6s cubic-bezier(.4, 0, .2, 1);
}
.gcn-burger__linie:nth-child(1), .gcn-burger__linie:nth-child(3) { stroke-dasharray: 60 207; }
.gcn-burger__linie:nth-child(2) { stroke-dasharray: 60 60; }
.gcn-header__toggle[aria-expanded="true"] .gcn-burger__linie:nth-child(1),
.gcn-header__toggle[aria-expanded="true"] .gcn-burger__linie:nth-child(3) { stroke-dasharray: 90 207; stroke-dashoffset: -134; }
.gcn-header__toggle[aria-expanded="true"] .gcn-burger__linie:nth-child(2) { stroke-dasharray: 1 60; stroke-dashoffset: -30; }

/* ---------- Mobil: graue Fläche unter der Kopfzeile ---------- */
.gcn-header__panel {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    padding: 3rem;
    background: #f8f8f8;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px 0 rgb(0 0 0 / 6%);
}
.gcn-header__panel[hidden] { display: none; }

.gcn-l1-list { max-width: 24rem; margin: 0 auto 1rem !important; }

.gcn-l1 {
    display: flex;
    align-items: center;
    padding: 0;
    border: 0;
    border-bottom: 3px solid transparent;
    color: #000;
    background: none;
    font: inherit;
    font-size: 1.3rem;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
}
.gcn-l1.is-section, .gcn-l1.is-current { color: var(--gcn-gruen); }
.gcn-l1[aria-expanded="true"] { border-bottom-color: var(--gcn-gruen); color: var(--gcn-gruen); }

.gcn-mega { display: none; }
.gcn-l1-item.is-open > .gcn-mega { display: block; }

.gcn-l2-list,
.gcn-l3-list {
    margin: .75rem 0 !important;
    padding-left: 1rem !important;
    border-left: 2px solid var(--gcn-gruen);
}
.gcn-l2 {
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    color: #000;
    font-size: 1rem;
    line-height: 1.5;
}
.gcn-l3 {
    display: flex;
    align-items: center;
    margin-bottom: .4rem;
    border-bottom: 3px solid transparent;
    color: #000;
    font-size: .9rem;
    line-height: 1.1;
}
.gcn-l2.is-section, .gcn-l3.is-current { color: var(--gcn-gruen) !important; }

/* Servicezeile: Telefon, E-Mail, Facebook, Sprache */
.gcn-service a {
    display: flex;
    align-items: center;
    padding: .25rem 0;
    color: #000;
}
.gcn-icon {
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
    margin-right: .5rem;
    fill: currentColor;
    color: var(--gcn-gruen);
}
.gcn-icon--facebook { margin-right: 0; }
.gcn-service { margin-bottom: 1rem !important; }
.gcn-service__sprachen { text-transform: uppercase; }
.gcn-service__sprachen a { display: inline; padding: 0; color: var(--gcn-gruen); }

/* ---------- Desktop ab 1280 px ---------- */
@media (min-width: 1280px) {
    .gcn-header { align-items: center; padding-inline: 12rem; }
    .gcn-header__partner { right: 2rem; }
    .gcn-header__toggle { display: none; }

    .gcn-header__panel,
    .gcn-header__panel[hidden] {
        position: static;
        display: flex;
        align-items: center;
        max-height: none;
        overflow: visible;
        padding: 0;
        background: none;
        box-shadow: none;
    }
    .gcn-service { order: 1; display: flex; flex-flow: row wrap; justify-content: center; margin-bottom: .5rem !important; } /* Zeile 27 px + 9 px = Hauptmenü bei y54 */
    .gcn-header__nav { order: 2; }
    .gcn-service > li { line-height: 1.35; } /* Zeilenhöhe 24,3 px wie im Original */
    .gcn-service > li + li { margin-left: 2rem; }
    .gcn-service a { padding: 0; font-size: .9rem; line-height: 1.5; }
    /* Symbole am Desktop etwas kleiner (1.25rem) wie im Original */
    .gcn-icon { width: 1.25rem; height: 1.25rem; }
    .gcn-service__sprachen { font-size: 1rem; line-height: 1.35; }
    .gcn-service__sprachen a { font-size: inherit; }

    .gcn-l1-list { display: flex; flex-flow: row wrap; justify-content: center; max-width: none; margin: 0 !important; }
    .gcn-l1-item + .gcn-l1-item { margin-left: 1.5rem; }
    .gcn-l1 { font-size: 1.2rem; }
    .gcn-l1:hover { color: var(--gcn-gruen); }

    .gcn-l1-item.is-open > .gcn-mega {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 0 240px;
        background: #f8f8f8;
        box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px 0 rgb(0 0 0 / 6%);
    }
    .gcn-l2-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(10rem, 12rem));
        column-gap: 1rem;
        justify-content: center;
        margin: 0 !important;
        padding: 0 !important;
        border: 0;
    }
    .gcn-l2-item { padding: 1rem; }
    .gcn-l2 { margin-bottom: .75rem; font-size: .9rem; font-weight: 600; cursor: default; }
    a.gcn-l2 { cursor: pointer; }
    .gcn-l3-list { margin: 0 !important; padding: 0 !important; border: 0; }
    .gcn-l3:hover, a.gcn-l2:hover { color: var(--gcn-gruen); }

    /* Ohne JavaScript öffnet sich das Untermenü beim Darüberfahren oder per Tab. */
    .gcn-header:not(.gcn-js) .gcn-l1-item:is(:hover, :focus-within) > .gcn-mega {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 0 240px;
        background: #f8f8f8;
    }
}
