.igs-site-header {
    position: relative;
    z-index: 100;
    background: #fff;
}

/*
 * Original-Layout liegt auf großen Monitoren in einem ca. 1500px breiten
 * Inhaltsbereich. Unterhalb davon schrumpft der Bereich flüssig mit.
 */
.igs-header-container {
    width: min(1500px, calc(100% - clamp(28px, 3vw, 56px)));
    margin-inline: auto;
}

/* =========================
   Obere Kontaktleiste
   ========================= */

.igs-topbar {
    height: clamp(40px, 2.25vw, 42px);
    background: #304f9f;
    color: #fff;
}

.igs-topbar-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.igs-topbar-contact {
    display: flex;
    align-items: center;
    gap: clamp(26px, 2.2vw, 38px);
    min-width: 0;
}

.igs-topbar-contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: clamp(12px, .69vw, 13px);
    line-height: 1;
    white-space: nowrap;
}

.igs-topbar-contact a:hover,
.igs-topbar-contact a:focus-visible {
    opacity: .86;
}

.igs-topbar-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: #fff;
}

.igs-topbar-icon-location {
    color: #ed1c24;
}

.igs-topbar-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.igs-topbar-social {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.igs-facebook-link {
    display: inline-flex;
    width: 21px;
    height: 21px;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: opacity .18s ease;
}

.igs-facebook-link:hover,
.igs-facebook-link:focus-visible {
    opacity: .82;
}

.igs-facebook-link svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* =========================
   Hauptheader
   ========================= */

.igs-main-header {
    height: clamp(94px, 5.3vw, 99px);
    background: #fff;
    border-bottom: 1px solid #d9d9d9;
}

.igs-main-header-inner {
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.igs-header-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    width: clamp(205px, 12vw, 225px);
    text-decoration: none;
}

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

/*
 * Im Original beginnt die Navigation ungefähr 60-65px hinter dem Logo.
 * Der Abstand schrumpft auf kleineren Monitoren automatisch.
 */
.igs-main-navigation {
    flex: 0 1 auto;
    min-width: 0;
    margin-left: clamp(28px, 3.3vw, 64px);
}

.igs-main-menu {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(22px, 2.1vw, 40px);
    margin: 0;
    padding: 0;
}

.igs-main-menu > li {
    position: relative;
    margin: 0;
    padding: 0;
}

.igs-main-menu > li > a {
    display: flex;
    align-items: center;
    height: clamp(94px, 5.3vw, 99px);
    color: #050505;
    text-decoration: none;
    font-size: clamp(13px, .74vw, 14px);
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    transition: color .18s ease;
}

.igs-main-menu > li > a:hover,
.igs-main-menu > li > a:focus-visible,
.igs-main-menu > .current-menu-item > a,
.igs-main-menu > .current-menu-ancestor > a {
    color: #294f9f;
}

/* Normale Untermenüs */
.igs-main-menu .sub-menu {
    position: absolute;
    left: 0;
    top: calc(100% - 1px);
    min-width: 220px;
    margin: 0;
    padding: 10px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #e3e7ee;
    box-shadow: 0 14px 30px rgba(15,35,70,.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
    z-index: 1001;
}

.igs-main-menu li:hover > .sub-menu,
.igs-main-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.igs-main-menu .sub-menu a {
    display: block;
    padding: 10px 18px;
    color: #111827;
    text-decoration: none;
    font-size: 14px;
}

.igs-main-menu .sub-menu a:hover,
.igs-main-menu .sub-menu a:focus-visible {
    background: #f4f7fb;
    color: #294f9f;
}

/*
 * Rechter Bereich richtet sich automatisch am rechten Rand des
 * 1500px-Containers aus. Das schiebt die Navigation nicht künstlich nach rechts.
 */
.igs-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    flex: 0 0 auto;
    min-width: 0;
}

.igs-header-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 42px;
    margin-right: clamp(36px, 3vw, 54px);
    color: #204798;
    text-decoration: none;
    flex: 0 0 auto;
}

.igs-header-search svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.igs-header-cta {
    width: clamp(205px, 12vw, 226px);
    height: 54px;
    padding-inline: clamp(16px, 1.5vw, 24px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #d71920;
    border: 1px solid #d71920;
    color: #fff !important;
    text-decoration: none;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    font-size: clamp(11px, .64vw, 12px);
    font-weight: 700;
    letter-spacing: .01em;
    transition:
        background-color 2s ease,
        border-color 2s ease,
        color 2s ease;
}

.igs-header-cta:hover,
.igs-header-cta:focus-visible {
    background: #294f9f;
    border-color: #294f9f;
    color: #fff !important;
}

/* Telefon/Kontaktblock aus dem Original-Header */
.igs-header-phone {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    margin-left: clamp(20px, 1.5vw, 28px);
    min-width: 150px;
    color: #000;
    text-decoration: none;
    flex: 0 0 auto;
}

.igs-header-phone:hover,
.igs-header-phone:focus-visible {
    color: #294f9f;
}

.igs-header-phone-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #f4efeb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 54px;
    color: #000;
}

.igs-header-phone-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.igs-header-phone-text {
    display: grid;
    gap: 4px;
    font-size: 13px;
    line-height: 1.1;
    white-space: nowrap;
}

.igs-header-phone-text strong {
    color: inherit;
    font-size: 14px;
    font-weight: 500;
}

.igs-main-header.is-sticky {
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* =========================
   Mega-Menüs Desktop
   ========================= */

.igs-has-mega {
    position: static !important;
}

.igs-mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    width: min(1100px, calc(100vw - clamp(32px, 6vw, 100px)));
    max-height: calc(100vh - clamp(140px, 10vw, 158px));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translate(-50%, 10px);
    background: #fff;
    border: 1px solid #e7eaf0;
    box-shadow: 0 18px 45px rgba(12,31,66,.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;
    z-index: 1000;
}

.igs-has-mega:hover > .igs-mega-menu,
.igs-has-mega:focus-within > .igs-mega-menu,
.igs-has-mega.igs-mega-open > .igs-mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.igs-mega-menu-inner {
    padding: clamp(20px, 2vw, 30px);
}

.igs-services-mega-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap:
        clamp(24px, 2vw, 32px)
        clamp(12px, 1vw, 16px);
}

.igs-service-mega-card {
    min-width: 0;
    display: block;
    color: #14378d;
    text-decoration: none;
}

.igs-service-mega-image {
    position: relative;
    display: block;
    overflow: visible;
}

.igs-service-mega-image > img {
    display: block;
    width: 100%;
    aspect-ratio: 1.58 / 1;
    object-fit: cover;
    background: #eef1f5;
}

.igs-service-mega-icon {
    position: absolute;
    left: clamp(14px, 1.2vw, 18px);
    bottom: clamp(-20px, -1.2vw, -16px);
    width: clamp(42px, 3vw, 46px);
    height: clamp(42px, 3vw, 46px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #d71920;
    box-shadow: 0 7px 20px rgba(18,38,75,.10);
    transition:
        background-color .2s ease,
        color .2s ease,
        transform .2s ease;
}

.igs-service-mega-icon svg {
    display: block;
    width: clamp(18px, 1.4vw, 21px);
    height: clamp(18px, 1.4vw, 21px);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.igs-service-mega-title {
    display: block;
    padding:
        clamp(27px, 2vw, 31px)
        clamp(10px, 1vw, 16px)
        0;
    font-size: clamp(12px, .8vw, 13px);
    line-height: 1.25;
    font-weight: 600;
    color: #14378d;
    transition: color .2s ease;
}

.igs-service-mega-card:hover .igs-service-mega-icon,
.igs-service-mega-card:focus-visible .igs-service-mega-icon {
    background: #d71920;
    color: #fff;
    transform: translateY(-2px);
}

.igs-service-mega-card:hover .igs-service-mega-title,
.igs-service-mega-card:focus-visible .igs-service-mega-title {
    color: #d71920;
}

.igs-references-mega {
    width: min(560px, calc(100vw - clamp(32px, 6vw, 100px)));
}

.igs-references-mega-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.igs-reference-mega-card {
    min-width: 0;
}

.igs-reference-mega-image {
    display: block;
    overflow: hidden;
    background: #eef1f5;
}

.igs-reference-mega-image img {
    display: block;
    width: 100%;
    aspect-ratio: 1.2 / 1;
    object-fit: cover;
}

.igs-reference-mega-title {
    display: block;
    padding: 9px 4px 3px;
    color: #14378d;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
}

.igs-mega-menu::-webkit-scrollbar {
    width: 8px;
}

.igs-mega-menu::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.25);
    border-radius: 20px;
}

.igs-mega-menu::-webkit-scrollbar-track {
    background: rgba(0,0,0,.06);
}

html.igs-menu-lock,
body.igs-menu-lock {
    overflow: hidden !important;
}

/* =========================
   Responsive Breakpoints
   ========================= */

/*
 * Kleinere Desktop-/Notebookbreiten:
 * Alles bleibt dieselbe Struktur, wird aber enger.
 */
@media (max-width: 1500px) {
    .igs-header-container {
        width: calc(100% - 32px);
    }

    .igs-main-navigation {
        margin-left: clamp(20px, 2vw, 36px);
    }

    .igs-main-menu {
        gap: clamp(17px, 1.55vw, 28px);
    }

    .igs-header-search {
        margin-right: clamp(20px, 2vw, 34px);
    }

    .igs-header-phone {
        margin-left: 18px;
        min-width: 138px;
    }

    .igs-header-phone-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .igs-header-cta {
        width: clamp(185px, 14vw, 210px);
    }
}

/* Bei sehr schmalen Desktopbreiten Telefonblock ausblenden,
   damit die Hauptnavigation nicht gequetscht wird. */
@media (max-width: 1260px) {
    .igs-header-phone {
        display: none;
    }

    .igs-main-menu {
        gap: clamp(15px, 1.4vw, 22px);
    }

    .igs-header-cta {
        width: 190px;
    }
}

@media (max-width: 1080px) {
    .igs-header-logo {
        width: 185px;
    }

    .igs-main-navigation {
        margin-left: 18px;
    }

    .igs-main-menu > li > a {
        font-size: 13px;
    }

    .igs-header-search {
        margin-right: 14px;
    }

    .igs-header-cta {
        width: 172px;
        padding-inline: 12px;
        font-size: 10.5px;
    }
}

@media (max-width: 1024px) {
    .igs-mega-menu {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .igs-topbar-contact {
        gap: 18px;
    }

    .igs-main-navigation {
        display: none;
    }

    .igs-main-header-inner {
        justify-content: space-between;
    }

    .igs-header-actions {
        margin-left: auto;
    }
}

@media (max-width: 640px) {
    .igs-header-container {
        width: calc(100% - 24px);
    }

    .igs-topbar {
        display: none;
    }

    .igs-main-header {
        height: 82px;
    }

    .igs-header-logo {
        width: 180px;
    }

    .igs-header-search,
    .igs-header-cta,
    .igs-header-phone {
        display: none;
    }
}
