
/* ==================================================
   HEi – Jubiläum 2027
   Globaler Website-Header
   ================================================== */


/* ==================================================
   1. Banner und innere Bannerzeile
   ================================================== */

.banner.hei-jubilaeum-header {
    background: #193e6c;
    color: #ffffff;
    padding: 22px 24px;
    box-sizing: border-box;
    font-family: "DM Sans", sans-serif;
}

.banner.hei-jubilaeum-header
.hei-jubilaeum-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 30px;
    width: 100%;
    max-width: 1420px;
    min-height: 160px;
    margin: 0 auto;
    box-sizing: border-box;
}


/* ==================================================
   2. HEi-Logo
   ================================================== */

.hei-jubilaeum-header-inner > .wp-block-image {
    flex: 0 0 200px;
    margin: 0;
}

.hei-jubilaeum-header-inner > .wp-block-image img {
    display: block;
    width: 100%;
    height: auto;
}


/* ==================================================
   3. Jubiläumskampagne
   ================================================== */

.hei-jubilaeum-header-campaign {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.hei-jubilaeum-header-text {
    text-align: center;
    color: #ffffff;
    min-width: 0;
}

.hei-jubilaeum-header-title {
    font-size: clamp(30px, 3vw, 46px);
    font-weight: 700;
    line-height: 1.1;
    color: #ffffff;
}

.hei-jubilaeum-header-claim {
    font-size: 17px;
    line-height: 1.4;
    margin-top: 6px;
    color: #ffffff;
}


/* ==================================================
   4. Originalflugzeug
   ================================================== */

.hei-jubilaeum-header-plane {
    flex: 0 0 180px;
    width: 180px;
    max-width: 180px;
    margin: 0;
}

.hei-jubilaeum-header-plane img {
    display: block;
    width: 100% !important;
    max-width: 180px !important;
    height: auto !important;
    max-height: 130px !important;
    object-fit: contain;
}


/* ==================================================
   5. Jubiläumsbutton
   ================================================== */

.hei-jubilaeum-header a.hei-jubilaeum-header-button {
    display: inline-block;
    background: #ce1c0c;
    color: #ffffff;
    padding: 10px 20px;
    margin-top: 14px;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.hei-jubilaeum-header a.hei-jubilaeum-header-button:hover {
    background: #a9170b;
    color: #ffffff;
}

.hei-jubilaeum-header a.hei-jubilaeum-header-button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

/* Bis zur Freigabe der Jubiläumskampagne ausblenden */

.hei-jubilaeum-header a.hei-jubilaeum-header-button[hidden] {
    display: none !important;
}


/* ==================================================
   6. Instagram und PayPal
   ================================================== */

.hei-jubilaeum-header-social {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: 0;
}

.hei-jubilaeum-header-social > * {
    margin: 0;
}


/* ==================================================
   7. Metanavigation – Desktop
   ================================================== */

/* Mobile Symbolnavigation standardmäßig ausblenden */

.hei-mobile-metanav {
    display: none !important;
}


/* ==================================================
   8. Tablet
   ================================================== */

@media (min-width: 768px) and (max-width: 1100px) {

    .banner.hei-jubilaeum-header
    .hei-jubilaeum-header-inner {
        gap: 18px;
        flex-wrap: wrap;
    }

    .hei-jubilaeum-header-inner > .wp-block-image {
        flex-basis: 160px;
    }

    .hei-jubilaeum-header-social {
        flex-basis: 100%;
        justify-content: center;
    }
}


/* ==================================================
   9. Smartphone – Jubiläumsbanner
   ================================================== */

@media (max-width: 767px) {

    .banner.hei-jubilaeum-header {
        padding: 12px 16px !important;
    }

    .banner.hei-jubilaeum-header
    .hei-jubilaeum-header-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
    }


    /* HEi-Logo oben links */

    .hei-jubilaeum-header-inner > figure {
        grid-column: 1;
        grid-row: 1;
        margin: 0 !important;
        width: 110px;
        max-width: 100%;
    }

    .hei-jubilaeum-header-inner > figure img {
        width: 110px !important;
        max-width: 100% !important;
        height: auto !important;
    }


    /* Instagram und PayPal oben rechts */

    .hei-jubilaeum-header-social {
        grid-column: 2;
        grid-row: 1;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 10px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .hei-jubilaeum-header-social > * {
        margin: 0 !important;
    }


    /* PayPal links von Instagram */

    .hei-jubilaeum-header-social > p {
        order: -1;
    }

    .hei-jubilaeum-header-social .paypal-donate-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 36px !important;
        height: 36px !important;
        min-width: 0 !important;
        padding: 7px !important;
        box-sizing: border-box;
        border-radius: 6px;
    }

    .hei-jubilaeum-header-social .paypal-text {
        display: none !important;
    }

    .hei-jubilaeum-header-social .paypal-icon {
        display: flex !important;
        width: 22px !important;
        height: 22px !important;
        margin: 0 !important;
    }

    .hei-jubilaeum-header-social .paypal-icon svg {
        width: 100% !important;
        height: 100% !important;
    }


    /* Jubiläumskampagne in der zweiten Zeile */

    .hei-jubilaeum-header-campaign {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 12px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: center !important;
    }

    .hei-jubilaeum-header-text {
        text-align: center !important;
    }

    .hei-jubilaeum-header-title {
        font-size: 17px;
        font-weight: 400;
        line-height: 1.4;
    }

    .hei-jubilaeum-header-claim {
        font-size: 16px;
        line-height: 1.5;
        margin-top: 4px;
    }


    /* Flugzeug verkleinern */

    .hei-jubilaeum-header-plane {
        flex: 0 0 95px !important;
        width: 95px !important;
        max-width: 95px !important;
        margin: 0 !important;
    }

    .hei-jubilaeum-header-plane img {
        max-width: 95px !important;
        max-height: 65px !important;
    }


    /* Jubiläumsbutton nach späterer Freigabe */

    .hei-jubilaeum-header a.hei-jubilaeum-header-button {
        font-size: 13px;
        padding: 8px 12px;
        margin-top: 8px;
    }
}


/* ==================================================
   10. Mobile Hauptnavigation
   ================================================== */

@media (max-width: 767px) {

    header .banner.hei-jubilaeum-header
    + .wp-block-navigation {
        min-height: 42px;
        margin: 0 !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f5f5f5;
        box-sizing: border-box;
    }

    header .banner.hei-jubilaeum-header
    + .wp-block-navigation
    .wp-block-navigation__responsive-container-open {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: #193e6c;
        min-height: 42px;
        padding: 6px 16px;
    }

    header .banner.hei-jubilaeum-header
    + .wp-block-navigation
    .wp-block-navigation__responsive-container-open::after {
        content: "Menü";
        font-family: "DM Sans", sans-serif;
        font-size: 16px;
        font-weight: 600;
    }

    header .banner.hei-jubilaeum-header
    + .wp-block-navigation
    .wp-block-navigation__responsive-container-open svg {
        width: 22px;
        height: 22px;
    }
}


/* ==================================================
   11. Mobile Metanavigation
   ================================================== */

@media (max-width: 767px) {

    /* Bisherige Metanavigation ausblenden */

    .metanav-wrap .metanav {
        display: none !important;
    }


    /* Schwarze Leiste */

    .metanav-wrap {
        background: #000000 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .metanav-wrap .metanav-inner {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }


    /* Symbolnavigation */

    .hei-mobile-metanav {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        min-height: 44px;
        padding: 0 12px;
        margin: 0 !important;
        box-sizing: border-box;
        position: relative;
        background: #000000;
    }

    .hei-mobile-metanav > a,
    .hei-mobile-search > summary {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        margin: 0;
        color: #ffffff !important;
        text-decoration: none;
        cursor: pointer;
        box-sizing: border-box;
    }

    .hei-mobile-metanav svg {
        display: block;
        width: 21px;
        height: 21px;
    }

    .hei-mobile-metanav > a:hover,
    .hei-mobile-search > summary:hover {
        color: #ff6600 !important;
    }

    .hei-mobile-metanav > a:focus-visible,
    .hei-mobile-search > summary:focus-visible {
        outline: 2px solid #ffffff;
        outline-offset: -3px;
    }


    /* Aufklappbare Suche */

    .hei-mobile-search {
        margin: 0;
        padding: 0;
    }

    .hei-mobile-search > summary {
        list-style: none;
    }

    .hei-mobile-search > summary::-webkit-details-marker {
        display: none;
    }

    .hei-mobile-search > summary::marker {
        content: "";
    }

    .hei-mobile-search[open] > summary {
        color: #ff6600 !important;
    }

    .hei-mobile-search form {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 100;
        display: flex;
        gap: 8px;
        padding: 12px;
        margin: 0;
        background: #000000;
        box-sizing: border-box;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

    .hei-mobile-search input[type="search"] {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        height: 40px;
        padding: 8px 10px;
        border: 0;
        border-radius: 3px;
        background: #ffffff;
        color: #333333;
        font-family: "DM Sans", sans-serif;
        font-size: 16px;
        box-sizing: border-box;
    }

    .hei-mobile-search button {
        flex: 0 0 auto;
        padding: 8px 14px;
        border: 0;
        border-radius: 3px;
        background: #ff6600;
        color: #000000;
        font-family: "DM Sans", sans-serif;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
    }
}

/* =========================================
   Mobile Metanavigation – Größenkorrektur
   ========================================= */

/* Auf dem Desktop vollständig ausblenden */

.metanav-wrap .hei-mobile-metanav {
    display: none !important;
}

/* SVG-Symbole grundsätzlich begrenzen */

.hei-mobile-metanav svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    flex-shrink: 0;
}

/* Smartphone */

@media (max-width: 767px) {

    /* Bisherige Metanavigation ausblenden */

    .metanav-wrap .metanav {
        display: none !important;
    }

    /* Mobile Metanavigation einblenden */

    .metanav-wrap .hei-mobile-metanav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        justify-content: flex-end;
        gap: 20px;
        width: 100%;
        padding: 4px 12px;
        margin: 0 !important;
        box-sizing: border-box;
    }

    .hei-mobile-metanav > a,
    .hei-mobile-metanav summary {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        margin: 0;
        color: #ffffff !important;
        text-decoration: none;
        cursor: pointer;
    }

    .hei-mobile-metanav details {
        position: relative;
        margin: 0 !important;
    }

    .hei-mobile-metanav summary {
        list-style: none;
    }

    .hei-mobile-metanav summary::-webkit-details-marker {
        display: none;
    }

    /* Aufklappbares Suchformular */

    .hei-mobile-search form {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 999;
        width: 280px;
        max-width: calc(100vw - 40px);
        padding: 12px;
        background: #000000;
        box-sizing: border-box;
    }

    .hei-mobile-search input {
        width: 100%;
        padding: 8px;
        box-sizing: border-box;
    }

    .hei-mobile-search button {
        width: 100%;
        margin-top: 8px;
        padding: 8px;
        background: #ff6600;
        color: #ffffff;
        border: 0;
        cursor: pointer;
    }
}