/* =========================================================
   Header – Basis
   ========================================================= */
.header {
    background: #ffffff;
    border-bottom: 1px solid #eaeaea;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 3rem);
    box-sizing: border-box;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-top: 15px;
    padding-bottom: 15px;
    gap: 15px;
}

.header__logos {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: block;
    line-height: 0;
}

.logo img {
    display: block;
    width: auto;
    height: 70px;
    max-width: 100%;
}

.logo--partner img {
    height: 40px;
}

.hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.hamburger-box {
    width: 28px;
    height: 20px;
    display: block;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 28px;
    height: 3px;
    background-color: #1a2b5c;
    border-radius: 3px;
    position: absolute;
    left: 0;
    transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.hamburger-inner {
    top: 8px;
}

.hamburger-inner::before {
    content: "";
    top: -9px;
}

.hamburger-inner::after {
    content: "";
    top: 9px;
}

.hamburger.is-active .hamburger-inner {
    transform: rotate(45deg);
}

.hamburger.is-active .hamburger-inner::before {
    top: 0;
    opacity: 0;
}

.hamburger.is-active .hamburger-inner::after {
    top: 0;
    transform: rotate(-90deg);
}

.header__nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 15px;
}

.header__nav.is-open {
    display: flex;
}

.header__tools {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.mainNav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mainNav li a {
    display: block;
    padding: 10px 0;
    color: #1a2b5c;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.mainNav li a:hover,
.mainNav li a.active {
    color: #8fb52e;
}


    .mainNav > li:last-child > a {
        display: inline-block;
        padding: 0.6rem 1rem;
        color: #fff;
        background-color: #003064;
        border-radius: 12px;
        font-weight: 700;
        transition: background-color 0.2s ease;
    }

.mainNav > li:last-child > a:hover,
.mainNav > li:last-child > a:focus-visible {
    color: #fff;
    background-color: #a6bf00;
}
    

.header__search {
    min-width: 0;
}

.tx-indexedsearch-searchbox {
    width: 100%;
}

.tx-indexedsearch-searchbox .input-group {
    display: flex;
    align-items: stretch;
    max-width: 320px;
    width: 100%;
}

.tx-indexedsearch-searchbox fieldset {
    border: none;
    margin: 0;
    padding: 0;
    width: 100%;
    min-width: 0;
}

.tx-indexedsearch-form {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
}

.tx-indexedsearch-form .form-control {
    border: none;
    outline: none;
    padding: 8px 16px;
    font-size: 14px;
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
}

.tx-indexedsearch-searchbox-button {
    border: none;
    background: #1a2b5c;
    color: #fff;
    padding: 0 16px;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
}

.tx-indexedsearch-searchbox-button:hover {
    background: #8fb52e;
}

.header-search {
    position: relative;
    flex-shrink: 0;
}
.header-search__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
    color: #1a2b5c;
    -webkit-tap-highlight-color: transparent;
}
.header-search__toggle:hover,
.header-search__toggle:focus-visible {
    background: rgba(0, 0, 0, 0.06);
}
.header-search__icon {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    background-color: currentColor;
    -webkit-mask-image: url('../icons/icon-search.svg');
    mask-image: url('../icons/icon-search.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}
.header-search__panel {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    z-index: 200;
    width: min(22rem, 90vw);
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    padding: 1.25rem;
}
.header-search__panel[hidden] {
    display: none;
}

@media (max-width: 992px) {
    .header-search__panel { left: 0; }
}

.header-search__headline {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    color: #1a2b5c;
}
.header-search__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #1a2b5c;
}
.header-search__row {
    display: flex;
    gap: 0.5rem;
}
.header-search__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    font-size: 0.95rem;
}
.header-search__input:focus-visible {
    outline: 3px solid #003064;
    outline-offset: 1px;
}
.header-search__submit {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    border: none;
    border-radius: 6px;
    background: #003064;
    color: #ffffff;
    cursor: pointer;
}
.header-search__submit:hover,
.header-search__submit:focus-visible {
    background: #00478f;
}

.header-search__real-form .tx-indexedsearch-hidden-fields,
.header-search__real-form fieldset legend,
.header-search__real-form .tx-indexedsearch-form label,
.header-search__real-form p {
    display: none;
}
.header-search__real-form fieldset {
    border: none;
    margin: 0;
    padding: 0;
}
.header-search__real-form .tx-indexedsearch-searchbox-sword {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
}
.header-search__real-form .tx-indexedsearch-searchbox-sword:focus-visible {
    outline: 3px solid #003064;
    outline-offset: 1px;
}
.header-search__real-form .tx-indexedsearch-search-submit {
    margin-top: 0.6rem;
}
.header-search__real-form .tx-indexedsearch-searchbox-button {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    background: #003064;
    color: #ffffff;
    cursor: pointer;
}
.header-search__real-form .tx-indexedsearch-searchbox-button:hover,
.header-search__real-form .tx-indexedsearch-searchbox-button:focus-visible {
    background: #00478f;
}

.mainNav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 12rem;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 0.5rem 0;
    z-index: 50;
    list-style: none;
    margin: 0;
}
.mainNav > li {
    position: relative;
}

.mainNav .dropdown-menu li a, .mainNav .dropdown-menu li.current {
    display: block;
    padding: 0.5rem 1rem;
    white-space: nowrap;
    color: #1a2b5c;
    text-decoration: none;
}
.mainNav .dropdown-menu li.current { padding-left: 1.5rem; color: #8fb52e; font-size: 15px; font-weight: 500;  } 
.mainNav .dropdown-menu li a:hover,
.mainNav .dropdown-menu li a:focus-visible {
    background: rgba(0, 0, 0, 0.05);
}@media (max-width: 991px) {
    .mainNav .dropdown-menu {
        display: none;
        position: static;
        box-shadow: none;
        padding: 0.25rem 0 0.25rem 1rem;
        margin: 0;
        min-width: 0;
        width: 100%;
        flex-basis: 100%;
    }
    .mainNav > li.has-submenu {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }
    .mainNav > li.has-submenu.is-open > .dropdown-menu {
        display: block;
    }
    .mainNav > li.has-submenu > a {
        flex: 1 1 auto;
        min-width: 0;
    }
    .mainNav__submenu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.75rem;
        height: 1.75rem;
        border: none;
        background: none;
        padding: 0;
        cursor: pointer;
        flex: 0 0 auto;
        color: inherit;
    }
    .mainNav__submenu-toggle::before {
        content: "";
        width: 0.6rem;
        height: 0.6rem;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform 0.2s ease;
    }
    .mainNav > li.has-submenu.is-open .mainNav__submenu-toggle::before {
        transform: rotate(-135deg);
    }
}

/* ---------------------------------------------------------
   Sprachauswahl
   --------------------------------------------------------- */
.langSelect {
    font-size: 14px;
    color: #1a2b5c;
    white-space: nowrap;
    flex-shrink: 0;
}
.langSelect .NO { display: none; }
.langSelect .CUR {
    display: inline-block;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: default;
}

@media (min-width: 992px) {
    
    .mainNav__submenu-toggle { display: none; }
    
    .header__inner {
        flex-wrap: nowrap;
        gap: 25px;
    }

    .hamburger {
        display: none;
    }

    .header__nav {
        display: flex !important;
        flex-basis: auto;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        flex-grow: 1;
        gap: 25px;
        min-width: 0;
    }

    .header__tools {
        border-bottom: none;
        padding-bottom: 0;
        flex-wrap: nowrap;
        flex-shrink: 0;
        gap: 15px;
    }

    .header__search {
        flex: 0 1 200px;
    }

    .tx-indexedsearch-searchbox .input-group {
        max-width: 200px;
    }

    .mainNav {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 22px;
        min-width: 0;
        inset: 0; 
        margin: auto;
    }

    .mainNav li a {
        padding: 6px 0;
        white-space: nowrap;
    }
    .mainNav > li.has-submenu:hover > .dropdown-menu,
    .mainNav > li.has-submenu:focus-within > .dropdown-menu {
        display: block;
    }
}

@media (min-width: 1200px) {
    .header__search {
        flex: 0 1 240px;
    }

    .tx-indexedsearch-searchbox .input-group {
        max-width: 240px;
    }

    .mainNav {
        gap: 28px;
    }
}

@media (min-width: 992px) and (max-width: 1140px) {
    .mainNav {
        gap: 12px;
    }

    .mainNav li a {
        font-size: 13.5px;
    }

    .header__search {
        flex: 0 1 130px;
    }

    .tx-indexedsearch-searchbox .input-group {
        max-width: 130px;
    }

    .header__nav {
        gap: 14px;
    }
}

/* =========================================================
   Kleine Mobile-Anpassung (< 480px)
   ========================================================= */
@media (max-width: 480px) {
    .header__logos {
        gap: 12px;
    }

    .logo img {
        height: 34px;
    }

    .logo--partner img {
        height: 30px;
    }

    .header__tools {
        flex-direction: column;
        align-items: stretch;
    }

    .tx-indexedsearch-searchbox .input-group {
        max-width: 100%;
    }
}
/* ==========================================================================
   Newsletter-Einklinker (siehe Resources/Private/Partials/NewsletterTeaser.html
   + Resources/Public/js/newsletterTeaser.js). Faehrt beim ersten Besuch
   von rechts ein, bleibt nach dem Schliessen als Icon sichtbar.
   ========================================================================== */
.newsletter-teaser[hidden] {
    display: none;
}

.newsletter-teaser__icon {
    position: fixed;
    top: 38rem;
    right: 0;
    transform: translateY(-50%);
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 5px 0 0 5px;
    border: none;
    background: #b1c800;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
    z-index: 901;
}
.newsletter-teaser__icon:hover,
.newsletter-teaser__icon:focus-visible {
    transform: translateY(-50%) translateX(-4px);
}
.newsletter-teaser.is-open .newsletter-teaser__icon {
    display: none;
}

.newsletter-teaser__icon-symbol {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    background-color: currentColor;
    -webkit-mask-image: url('../icons/icon-newsletter.svg');
    mask-image: url('../icons/icon-newsletter.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.newsletter-teaser__panel {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translate(100%, -50%);
    width: min(40rem, 90vw);
    max-height: 85vh;
    overflow-y: auto;
    background: #003064;
    color: #fff !important;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.22);
    border-radius: 12px 0 0 12px;
    padding: 2.25rem 1.75rem 1.75rem;
    box-sizing: border-box;
    transition: transform 0.35s ease;
    z-index: 900;
}
.newsletter-teaser.is-open .newsletter-teaser__panel {
    transform: translate(0, -50%);
}
.newsletter-teaser.is-open {
  z-index: 10001;
  position: relative;
}
@media (prefers-reduced-motion: reduce) {
    .newsletter-teaser__panel {
        transition: none;
    }
}

.newsletter-teaser__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.newsletter-teaser__close:hover,
.newsletter-teaser__close:focus-visible {
    background: rgba(0, 0, 0, 0.12);
}

/*
.newsletter-teaser__content h1,
.newsletter-teaser__content h2,
.newsletter-teaser__content h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #00335b;
}
*/
.newsletter-teaser__content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 34em) {
    .newsletter-teaser__panel {
        width: 100vw;
        max-height: 70vh;
        border-radius: 12px 12px 0 0;
        top: auto;
        bottom: 0;
        right: 0;
        transform: translateY(100%);
    }
    .newsletter-teaser.is-open .newsletter-teaser__panel {
        transform: translateY(0);
    }
    .newsletter-teaser__icon {
        top: auto;
        bottom: 1rem;
        left: 1em;
        transform: none;
    }
    .newsletter-teaser__icon:hover,
    .newsletter-teaser__icon:focus-visible {
        transform: translateX(-4px);
    }
}
