/* ==========================================================
   Abwasserzweckverband Illtal – bereinigtes responsives CSS
   ========================================================== */

/* Grundlayout */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #f4f4f4;
    font-family: Arial, Helvetica, sans-serif;
    color: #00384e;
}

img,
svg {
    max-width: 100%;
}

.page {
    position: relative;
    width: calc(100% - 56px);
    max-width: 1240px;
    margin: 12px auto;
    background: #4599ba;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
}

a {
    color: #28596c;
    font-size: 18px;
    font-weight: 600;
}

a:hover {
    color: #357893;
    text-decoration: underline;
}

/* Header */
.header {
    display: flex;
    position: relative;
    align-items: center;
    min-height: 150px;
    background: #fff;
}

.header__logo {
    display: flex;
    flex: 0 0 400px;
    align-items: center;
    justify-content: center;
    height: 150px;
    overflow: hidden;
    background: #fff;
}

.header__logo img {
    display: block;
    width: 330px;
    height: auto;
    max-height: 140px;
    object-fit: contain;
}

.header__name {
    min-width: 0;
    padding-left: 160px;
    color: #858585;
    font-size: 20px;
    font-weight: 300;
    white-space: nowrap;
}

.header__name strong {
    font-weight: 700;
}

.header__login {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    margin-left: auto;
    margin-right: 34px;
    padding: 7px 10px;
    border-radius: 5px;
    background: #fff;
    color: #00384e;
    font-size: 16px;
    text-decoration: none;
}

.header__login:hover,
.header__login:focus-visible {
    background: #7f1167;
    color: #fff;
}

.header__login-icon {
    margin-right: 5px;
}

/* Hero-Bereich */
.hero {
    position: relative;
    min-height: 550px;
    background: radial-gradient(ellipse at center, #fff 0%, #d5ebf4 100%);
}

.hero__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Meldung: zwei gleich breite Boxen nebeneinander */
.hero__message {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: stretch;
    gap: 30px;
    width: 84%;
    margin: 0 auto;
    padding-top: 60px;
    padding-bottom: 30px;
    text-align: left;
}

.hero__message-inner {
    flex: 1 1 0;
    min-width: 0;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
    line-height: 28px;
    overflow-wrap: break-word;
}

.hero__message-inner p + p {
    margin-top: 20px;
}

.hero__message h1 {
    margin: 0 0 10px;
    color: #005e7c;
    font-family: "Arial Narrow", Arial, sans-serif;
    font-size: 30px;
    font-weight: 600;
    line-height: 33px;
}

.hero__message h2 {
    margin: 0 0 10px;
    color: #005e7c;
    font-size: 24px;
    font-weight: 600;
}

.hero__message h3 {
    margin: 0 0 10px;
    color: #005e7c;
    font-size: 22px;
    font-weight: 600;
}

.hero__message p {
    margin: 0;
    color: #00384e;
    font-size: 18px;
}

/* Zweite Section mit Kontaktboxen */
.hero__contact {
    display: flex;
    align-items: stretch;
    gap: 30px;
    width: 84%;
    margin: 30px auto;
}

.hero__contact .hero__message-inner {
    flex: 1 1 0;
    min-width: 0;
}

.hero__contact h2 {
    margin: 0 0 15px;
    color: #00384e;
    font-size: 24px;
}

.hero__contact p {
    margin: 0;
    color: #00384e;
    font-size: 20px;
    line-height: 28px;
}

/* Motto */
.motto {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    background: #fff;
    color: #4599ba;
    font-size: 22px;
}

.motto_img {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    width: 100%;
}

.motto_img img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Footer Navigation */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 50px;
    background: #005e7c;
    color: #fff;
}

.footer-nav a {
    display: flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 20px;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    white-space: normal;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
    text-decoration: underline;
}

/* Social Navigation */
.social-nav {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.social-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    color: #00384e;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.social-nav a svg {
    width: 22px;
    height: 22px;
    margin: 0 !important;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.social-nav a:hover,
.social-nav a:focus-visible {
    background: #9cd1e5;
    color: #00384e;
}

.social-nav a:hover svg {
    transform: scale(1.1);
}

/* Impressumsseite */
.hero.hero--impressum {
    height: auto;
    min-height: 0;
    overflow: visible;
}

.hero.hero--impressum .hero__message.hero__message--impressum {
    position: relative;
    z-index: auto;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 50px 60px;
    transform: none;
    text-align: left;
}

/* Tablet */
@media (max-width: 850px) {
    .page {
        width: 100%;
        margin: 0;
    }

    .header {
        min-height: 120px;
    }

    .header__logo {
        flex: 0 1 220px;
        height: 120px;
    }

    .header__logo img {
        width: 190px;
    }

    .header__name {
        padding-left: 18px;
        font-size: 17px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .header__login {
        margin-right: 15px;
    }

    .hero__message,
    .hero__contact {
        width: calc(100% - 40px);
    }

    .footer-nav {
        padding: 10px 15px;
    }

    .footer-nav a {
        padding: 6px 12px;
    }
}

/* Smartphone und schmale Tablets */
@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .hero__message {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: auto;
        max-width: none;
        margin: 20px;
        padding: 0;
        transform: none;
        flex-direction: column;
        gap: 20px;
    }

    .hero__message-inner {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        padding: 20px;
        overflow-wrap: anywhere;
    }

    .hero__contact {
        flex-direction: column;
        width: auto;
        gap: 20px;
        margin: 20px;
    }

    .hero__message h1 {
        font-size: 25px;
        line-height: 31px;
    }

    .hero__message h2,
    .hero__contact h2 {
        font-size: 21px;
        line-height: 28px;
    }

    .hero__message p {
        font-size: 17px;
        line-height: 26px;
    }

    .hero__contact p {
        font-size: 17px;
        line-height: 26px;
    }

    .hero.hero--impressum .hero__message.hero__message--impressum {
        padding: 25px 20px;
    }
}

/* Kleine Smartphones */
@media (max-width: 600px) {
    .header {
        flex-wrap: wrap;
        justify-content: space-between;
        height: auto;
        min-height: 0;
        padding: 10px;
        gap: 6px 10px;
    }

    .header__logo {
        flex: 0 1 140px;
        width: 140px;
        height: auto;
        min-width: 0;
    }

    .header__logo img {
        width: 140px;
        max-height: 90px;
    }

    .header__name {
        flex: 1 1 140px;
        min-width: 0;
        padding-left: 0;
        font-size: 12px;
        white-space: normal;
    }

    .header__name span {
        display: block;
    }

    .header__login {
        margin: 0 0 0 auto;
        font-size: 14px;
    }

    .motto {
        padding: 16px 10px;
        font-size: 18px;
    }

    .social-nav a {
        width: 44px;
        height: 44px;
    }

    .social-nav a:hover svg {
        transform: none;
    }
}

@media (max-width: 410px) {
    .hero__message,
    .hero__contact {
        margin: 12px;
        gap: 12px;
    }

    .hero__message-inner {
        padding: 15px;
    }

    .header__name {
        font-size: 11px;
    }
}

/* Anpassungen an die finale HTML-Struktur */
.header__name .social-nav {
    display: flex;
}
.hero__message-inner h3 {
    margin: 0 0 12px;
    color: #005e7c;
    font-size: 22px;
    line-height: 1.3;
}
.hero__message-inner p + h3 {
    margin-top: 20px;
}
.hero__message-inner a {
    overflow-wrap: anywhere;
}
.motto {
    flex-direction: column;
    gap: 10px;
    text-align: center;
}
.motto h3,
.motto p {
    margin: 0;
}
.motto p {
    font-size: 18px;
    line-height: 1.5;
}
@media (max-width: 600px) {
    .header__name .social-nav {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 7px;
    }
    .header__name {
        flex: 1 1 auto;
    }
    .social-nav a {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
    }
    .social-nav a svg {
        width: 19px;
        height: 19px;
    }
    .hero__message-inner h3 {
        font-size: 20px;
    }
}
@media (max-width: 360px) {
    .header__logo {
        flex-basis: 110px;
        width: 110px;
    }
    .header__logo img {
        width: 110px;
    }
    .header__name .social-nav {
        gap: 4px;
    }
    .social-nav a {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }
}
