/*
 * Gemeinsamer Header des GDfB-Geologiedatenportals.
 *
 * Diese Datei wird von der Portalstartseite und allen ergänzenden
 * öffentlichen Seiten verwendet.
 */

#portal-header {
    width: 100%;
    margin: 0;
    background: #ffffff;
}

#portal-header-top {
    min-height: 104px;
    display: flex;
    align-items: center;
    padding: 0 42px;
    background: #ffffff;
}

#portal-branding {
    width: min(1440px, 100%);
    min-height: 104px;
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0 auto;
    color: #111111;
    text-decoration: none;
}

#portal-logo {
    width: 210px;
    height: 82px;
    flex: 0 0 auto;
    object-fit: contain;
    object-position: left center;
}

#portal-agency-name {
    min-width: 230px;
    color: #111111;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.18;
}

#portal-brand-divider {
    width: 1px;
    height: 62px;
    flex: 0 0 auto;
    background: #c7cfd4;
}

#portal-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#portal-title {
    color: #111111;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.08;
}

#portal-subtitle {
    color: #222222;
    font-size: 15px;
    line-height: 1.3;
}

#portal-header-bottom {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 9px 28px;
    background: #ad1e35;
}

#portal-search {
    width: min(460px, 100%);
}

#portal-search-input {
    width: 100%;
    min-height: 43px;
    padding: 10px 14px;
    border: 0;
    border-radius: 6px;
    background: #ffffff;
    color: #26343d;
    font-size: 15px;
}

#portal-search-input:focus {
    outline: 3px solid rgba(255, 255, 255, 0.38);
}

@media (max-width: 1050px) {
    #portal-header-top {
        min-height: auto;
        padding: 18px 28px;
    }

    #portal-branding {
        min-height: auto;
        gap: 20px;
    }

    #portal-logo {
        width: 185px;
        height: 72px;
    }

    #portal-agency-name {
        min-width: 185px;
        font-size: 18px;
    }

    #portal-brand-divider {
        height: 54px;
    }

    #portal-title {
        font-size: 25px;
    }

    #portal-subtitle {
        font-size: 14px;
    }
}

@media (max-width: 760px) {
    #portal-header-top {
        padding: 18px 20px;
    }

    #portal-branding {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    #portal-logo {
        width: 190px;
        height: auto;
    }

    #portal-agency-name {
        min-width: 0;
        font-size: 18px;
    }

    #portal-brand-divider {
        display: none;
    }

    #portal-title {
        font-size: 24px;
    }

    #portal-header-bottom {
        justify-content: stretch;
        padding: 10px 16px;
    }

    #portal-search {
        width: 100%;
    }
}


/* ==========================================================
   Einheitliche Zurück-Navigation
   ========================================================== */

.portal-back-navigation {
    box-sizing: border-box;
    width: min(1440px, calc(100% - 32px));
    margin: 10px auto 0;
    padding: 0;
}

.portal-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 5px 9px;

    border: 1px solid #d5dadd;
    border-radius: 4px;

    background: #ffffff;
    color: #173a59;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;

    text-decoration: none;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.08);
}

.portal-back-link:hover,
.portal-back-link:focus-visible {
    border-color: #aeb8bf;
    background: #f4f6f7;
    color: #102f49;
}

@media (max-width: 750px) {

    .portal-back-navigation {
        width: calc(100% - 24px);
        margin-top: 8px;
    }

    .portal-back-link {
        padding: 5px 8px;
        font-size: 12px;
    }
}


/* Karten-/Unterseiten: Headerlinks mobil unter dem Markenbereich */

@media (max-width: 760px) {
    #portal-header-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    #portal-header-links {
        margin-left: 0;
    }
}
