/*
 * Jäger Technik Header-Modul
 * Wird erst sichtbar wirksam, wenn das lokale Pattern .jt-hyd-header auf der
 * Seite vorhanden ist. Bestehende URLs und das GeneratePress-Menü bleiben
 * unangetastet.
 */

.jt-hyd-header {
    position: relative;
    z-index: 20;
    border: 0;
    background: var(--jt-surface);
    color: var(--jt-text);
    box-shadow: 0 10px 30px rgb(15 23 42 / 0.08);
}

.jt-hyd-header :where(p, span) {
    margin: 0;
}

.jt-hyd-header a {
    text-decoration: none;
}

.jt-hyd-header__shell {
    width: min(100%, var(--jt-wide));
    margin-inline: auto;
    padding-inline: clamp(1rem, 3vw, 1.5rem);
}

.jt-hyd-header__utility {
    background: var(--jt-brand-dark);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.jt-hyd-header__utility-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 34px;
}

.jt-hyd-header__utility-text {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: #ffffff;
}

.jt-hyd-header__utility-text::before {
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.55rem;
    border-radius: 50%;
    background: #5eead4;
    box-shadow: 0 0 0 4px rgb(94 234 212 / 0.12);
    content: "";
    flex: 0 0 auto;
}

.jt-hyd-header__utility-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgb(255 255 255 / 0.45);
    text-underline-offset: 0.2em;
}

.jt-hyd-header__utility-link:hover,
.jt-hyd-header__utility-link:focus-visible {
    color: #ccfbf1;
    text-decoration-color: currentColor;
}

.jt-hyd-header__main {
    background:
        linear-gradient(90deg, rgb(8 127 120 / 0.055), transparent 28%),
        var(--jt-surface);
}

.jt-hyd-header__main-inner {
    display: grid;
    grid-template-columns: minmax(16.5rem, 0.9fr) minmax(18rem, 1.25fr) auto;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2.25rem);
    min-height: 94px;
    padding-block: 1rem;
}

.jt-hyd-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    color: var(--jt-heading);
}

.jt-hyd-header__brand:hover,
.jt-hyd-header__brand:focus-visible {
    color: var(--jt-brand);
}

.jt-hyd-header__mark {
    display: inline-grid;
    width: 3.1rem;
    height: 3.1rem;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgb(255 255 255 / 0.18);
    border-radius: 0.75rem 0.75rem 0.2rem 0.75rem;
    background: linear-gradient(145deg, var(--jt-brand), #065f5b);
    box-shadow: 0 7px 16px rgb(8 127 120 / 0.22);
    color: #ffffff;
    font-family: var(--jt-font-heading);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.jt-hyd-header__brand-copy {
    display: grid;
    min-width: 0;
    gap: 0.1rem;
}

.jt-hyd-header__brand-name {
    color: currentColor;
    font-family: var(--jt-font-heading);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    white-space: nowrap;
}

.jt-hyd-header__brand-claim {
    color: var(--jt-muted);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.jt-hyd-header__search {
    min-width: 0;
}

.jt-hyd-header__search .wp-block-search__label {
    color: var(--jt-heading);
    font-weight: 700;
}

.jt-hyd-header__search .wp-block-search__inside-wrapper {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 4px;
    border: 2px solid #cbd5e1;
    border-radius: 0.65rem;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgb(15 23 42 / 0.04);
}

.jt-hyd-header__search .wp-block-search__inside-wrapper:focus-within {
    border-color: var(--jt-brand);
    box-shadow: 0 0 0 4px rgb(8 127 120 / 0.12);
}

.jt-hyd-header__search .wp-block-search__input {
    min-width: 0;
    min-height: 38px;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 0.45rem;
    background: transparent;
    color: var(--jt-text);
    font-size: 0.92rem;
    outline: 0;
}

.jt-hyd-header__search .wp-block-search__button {
    display: inline-grid;
    width: 42px;
    min-width: 42px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 0.45rem;
    background: var(--jt-brand);
    color: #ffffff;
}

.jt-hyd-header__search .wp-block-search__button:hover,
.jt-hyd-header__search .wp-block-search__button:focus-visible {
    background: var(--jt-brand-dark);
    color: #ffffff;
}

.jt-hyd-header__search .wp-block-search__button svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: currentColor;
}

.jt-hyd-header__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.7rem 1rem;
    border: 2px solid var(--jt-brand);
    border-radius: 0.65rem;
    background: var(--jt-brand);
    box-shadow: 0 7px 16px rgb(8 127 120 / 0.18);
    color: #ffffff;
    font-family: var(--jt-font-heading);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.jt-hyd-header__cta:hover,
.jt-hyd-header__cta:focus-visible {
    border-color: var(--jt-brand-dark);
    background: var(--jt-brand-dark);
    color: #ffffff;
}

.jt-hyd-header__proof {
    border-top: 1px solid #dbe4e8;
    background: var(--jt-surface-soft);
}

.jt-hyd-header__proof-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 36px;
}

.jt-hyd-header__proof-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    color: var(--jt-heading);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.jt-hyd-header__proof-item + .jt-hyd-header__proof-item {
    border-left: 1px solid #cbd5e1;
}

.jt-hyd-header__proof-item::before {
    color: var(--jt-brand);
    content: "✓";
    font-size: 0.95rem;
    font-weight: 800;
}

/* Der bisherige kleine GeneratePress-Kopf wird nur ausgeblendet, wenn das
   neue Pattern tatsächlich vorhanden ist. Die Navigation im Masthead bleibt. */
body:has(.jt-hyd-header) #secondary-navigation {
    display: none;
}

body:has(.jt-hyd-header) #masthead.site-header {
    border: 0;
    background: var(--jt-brand-dark);
    box-shadow: none;
}

body:has(.jt-hyd-header) #masthead .inside-header {
    display: block;
    width: 100%;
    max-width: none;
    padding: 0;
}

body:has(.jt-hyd-header) #masthead .site-branding,
body:has(.jt-hyd-header) #masthead .site-logo {
    display: none;
}

body:has(.jt-hyd-header) #site-navigation.main-navigation {
    float: none;
    width: 100%;
    clear: both;
    border-bottom: 3px solid var(--jt-brand);
    background: var(--jt-brand-dark);
}

body:has(.jt-hyd-header) #site-navigation .inside-navigation {
    width: min(100%, var(--jt-wide));
    margin-inline: auto;
    padding-inline: clamp(1rem, 3vw, 1.5rem);
}

body:has(.jt-hyd-header) #site-navigation .main-nav > ul {
    justify-content: center;
}

body:has(.jt-hyd-header) #site-navigation .main-nav > ul > li > a,
body:has(.jt-hyd-header) #site-navigation .menu-bar-item > a,
body:has(.jt-hyd-header) #site-navigation .menu-toggle {
    color: #ffffff;
    text-decoration: none;
}

body:has(.jt-hyd-header) #site-navigation .main-nav > ul > li:hover > a,
body:has(.jt-hyd-header) #site-navigation .main-nav > ul > li:focus-within > a,
body:has(.jt-hyd-header) #site-navigation .main-nav > ul > li[class*="current-menu-"] > a {
    background: rgb(255 255 255 / 0.09);
    color: #ffffff;
}

body:has(.jt-hyd-header) #mobile-menu-control-wrapper {
    width: 100%;
    border-bottom: 3px solid var(--jt-brand);
    background: var(--jt-brand-dark);
}

body:has(.jt-hyd-header) #mobile-menu-control-wrapper .menu-toggle {
    display: flex;
    width: 100%;
    min-height: 48px;
    justify-content: center;
    gap: 0.5rem;
    border: 0 !important;
    border-radius: 0;
    background: var(--jt-brand-dark) !important;
    box-shadow: none;
    color: #ffffff !important;
    font-family: var(--jt-font-heading);
    font-weight: 700;
}

body:has(.jt-hyd-header) #mobile-menu-control-wrapper .menu-toggle:hover,
body:has(.jt-hyd-header) #mobile-menu-control-wrapper .menu-toggle:focus-visible {
    background: #1f3333 !important;
    color: #ffffff !important;
}

body:has(.jt-hyd-header) #mobile-menu-control-wrapper .menu-toggle svg {
    fill: currentColor;
}

body:has(.jt-hyd-header) #mobile-menu-control-wrapper .screen-reader-text {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

@media (max-width: 980px) {
    .jt-hyd-header__main-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand cta"
            "search search";
        min-height: 0;
        gap: 0.85rem 1rem;
        padding-block: 0.85rem;
    }

    .jt-hyd-header__brand {
        grid-area: brand;
    }

    .jt-hyd-header__search {
        grid-area: search;
    }

    .jt-hyd-header__cta {
        grid-area: cta;
    }
}

@media (max-width: 680px) {
    .jt-hyd-header__utility {
        font-size: 0.72rem;
    }

    .jt-hyd-header__utility-text {
        max-width: 64%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .jt-hyd-header__main-inner {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .jt-hyd-header__mark {
        width: 2.65rem;
        height: 2.65rem;
        border-radius: 0.65rem 0.65rem 0.18rem 0.65rem;
        font-size: 0.9rem;
    }

    .jt-hyd-header__brand-name {
        font-size: clamp(1rem, 5.1vw, 1.25rem);
        white-space: normal;
    }

    .jt-hyd-header__brand-claim {
        display: none;
    }

    .jt-hyd-header__cta {
        min-height: 44px;
        padding-inline: 0.75rem;
        font-size: 0.76rem;
    }

    .jt-hyd-header__proof-inner {
        grid-template-columns: 1fr 1fr;
    }

    .jt-hyd-header__proof-item {
        padding-inline: 0.5rem;
        font-size: 0.68rem;
    }

    .jt-hyd-header__proof-item:nth-child(3) {
        display: none;
    }
}

@media (max-width: 390px) {
    .jt-hyd-header__brand {
        gap: 0.55rem;
    }

    .jt-hyd-header__mark {
        width: 2.4rem;
        height: 2.4rem;
    }

    .jt-hyd-header__cta {
        padding-inline: 0.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jt-hyd-header * {
        scroll-behavior: auto;
        transition: none !important;
    }
}
