/* =========================================================
   Beitragsdetail
   Schriften: fonts.css muss vor dieser Datei geladen werden.
   ========================================================= */

/* =========================================================
   Reset / Basis
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

html:not(.header-menu-open) {
    scrollbar-gutter: stable;
    overflow-y: scroll;
}

body {
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-weight: 400;
    line-height: 1.4;
    min-height: 100vh;
    background-color: #000;
    color: #f2f2f2;
}

/* Kein erzwungenes Font-Smoothing.
   Gerade unter Windows kann antialiased/grayscale Text dünner wirken lassen. */

a {
    text-decoration: none;
    color: #000;
    -webkit-tap-highlight-color: transparent;
}

a:visited {
    color: #000;
}

ul {
    list-style: none;
}

/* Korrigiert:
   Vorher stand hier: h1 h2 h3
   Das war ein falscher Selektor.
*/

h1,
h2,
h3 {
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-weight: 600;
    line-height: 1.25;
    text-rendering: optimizeLegibility;
}

pre {
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-weight: 400;
    white-space: break-spaces;
    line-height: 1.45;
}


/* =========================================================
   Layout
   ========================================================= */

#container {
    width: 100%;
    min-height: 100vh;

    display: grid;
    grid-template-columns: 1fr 320px 1fr;
    grid-template-areas:
        "main main main"
        "footer footer footer";
}


/* =========================================================
   Header / Logo / Navigation
   ========================================================= */

#header {
    position: fixed;
    width: 100%;
    height: 60px;
    z-index: 2200;
    background-color: #000;
    border-bottom: 1px solid #5e5e5e;
}

#logo {
    position: fixed;
    width: 100%;
    background-color: #fff;
    height: 40px;
    padding-top: 3px;
    box-shadow: 0px 1px 1px #e9e9e9;
}

#logo img {
    margin: auto;
    display: block;
    height: 35px;
}

#hauptnav {
    position: fixed;
    display: flex;
    align-items: center;

    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;

    background-color: #000;
    height: 60px;
    width: 100%;
    z-index: 2200;
}

#hauptnav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #2d2d2d;
    border-radius: 50%;
    background-color: #050505;
    color: #fff;
}

#hauptnav a:hover {
    background-color: #161616;
}

#hauptnav a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.public-back-button__icon {
    display: block;
    width: 18px;
    height: 18px;
}

.public-back-button__icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   Main
   ========================================================= */

main {
    grid-area: main;
    margin-top: 60px;

    display: grid;
    grid-template-columns: 1fr 300px 1fr;
    grid-template-areas:
        "infos infos infos"
        "adlabel adlabel adlabel"
        "betreff betreff betreff"
        "body body body"
        "images images images"
        "pdf pdf pdf"
        "user_portrait user_portrait user_portrait";
}

#infos {
    grid-area: infos;
    margin-top: 20px;
    padding: 0 20px 0 20px;
}

.logo_portrait_small {
    display: grid;
    grid-template-columns: 70px 1fr;
    grid-template-areas:
        "logo_user user_when"
        ". user_when";
}

.logo_user {
    grid-area: logo_user;
    box-sizing: border-box;
    height: 50px;
    width: 50px;
    border-radius: 50%;
    margin-left: 0px;
    object-fit: contain;
    object-position: center;
    background: #fff;
    padding: 10%;
}

span.logo_user.profile-image-placeholder {
    display: block;
    flex: 0 0 auto;
    background: #fff;
    object-fit: unset;
}

#user_when {
    grid-area: user_when;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.user_name {
    grid-area: user_name;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-weight: 500;
    color: #f2f2f2;
}

.post-publisher-label {
    display: block;
    margin: 0 0 1px;
    color: #8b98a5;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0.1px;
}

.user_name h1 {
    margin-top: 0;
}

#when {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    color: #8b98a5;
}

#when .date,
#when .time,
.post-meta-separator {
    margin: 0;
    color: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0;
}

.post-meta-separator {
    color: #66727d;
}


/* =========================================================
   Überschrift / Betreff / Beitragstext
   ========================================================= */

main h1 {
    margin-top: 10px;

    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
}

.post-ad-label-row {
    grid-area: adlabel;
    margin: 0;
    padding: 10px 20px 0;
}

.ad-label {
    display: inline-block;
    background: #fff;
    color: #000;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 3px;
}

.post-ad-label-row + #betreff {
    padding-top: 10px;
}

#betreff {
    grid-area: betreff;
    margin: 0;
    padding: 24px 20px 10px;
    color: #fff;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

#body_text {
    grid-area: body;

    padding: 14px 20px 32px;

    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.45;

    color: #f2f2f2;
    border-bottom: 1px solid #2f3336;
}

#body_text pre {
    max-width: 50ch;

    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.45;

    color: #f2f2f2;
}


/* =========================================================
   Bilder
   ========================================================= */

.picture_link {
    height: 100%;
}

.pictures {
    grid-area: images;
    margin-top: 20px;
    padding: 0 20px;
}

.pictures img {
    width: 100%;
    height: auto;
    opacity: 1;
    transition: opacity 200ms ease-out;

    position: static;

    border: 1px solid #30363d;
    border-radius: 12px;
}

.pictures img:hover {
    opacity: 0.9;
    transition: opacity 200ms ease-out;
}


/* =========================================================
   PDFs
   ========================================================= */

.pdfs {
    grid-area: pdf;
    margin-top: 20px;
    padding: 0 20px 20px;
}

.pdfs img {
    width: 100%;
    height: auto;
    opacity: 1;
    transition: opacity 200ms ease-out;
    border: 1px solid #30363d;
    border-radius: 10px;
}

.pdfs img:hover {
    opacity: 0.9;
    transition: opacity 200ms ease-out;
}


/* =========================================================
   User Portrait / Profilbereich
   Visuell an die öffentliche Profilansicht angeglichen.
   ========================================================= */

.user_portrait {
    grid-area: user_portrait;
    margin: 44px 16px 0;
    padding-top: 30px;

    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
        "logo_portrait absender_portrait"
        "absatz absatz"
        "address address"
        "oeffnungszeiten oeffnungszeiten"
        "eigenbeschreibung eigenbeschreibung";
    column-gap: 16px;
    align-items: center;

    border-top: 1px solid #2f3336;
}

.user_portrait h2 {
    grid-area: absender_portrait;
    margin: 0;
    padding: 0;
    color: #fff;

    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
    overflow-wrap: anywhere;
}

.logo_portrait {
    grid-area: logo_portrait;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border-radius: 50%;
    background: #fff;
}

.logo_user_portrait {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    object-fit: contain;
    object-position: center;
    background: transparent;
    padding: 10%;
}

span.logo_user_portrait.profile-image-placeholder {
    flex: 0 0 auto;
    background: #fff;
    object-fit: unset;
}

/* Legacy-Kurzbeschreibung: bleibt erhalten, ordnet sich aber optisch dem
   Profilkopf unter und erzeugt keine zusätzliche Karten-/Linienoptik. */
.absatz {
    grid-area: absatz;
    margin: 0;
    padding: 15px 0;
    color: #f2f2f2;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
}

.absatz pre {
    margin: 0;
    color: inherit;
    font: inherit;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.post-profile-section,
.oeffnungszeiten,
.eigenbeschreibung {
    width: 100%;
    margin: 0;
    padding: 15px 0;
    color: #f2f2f2;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
}

.post-profile-contact {
    grid-area: address;
}

.oeffnungszeiten {
    grid-area: oeffnungszeiten;
}

.eigenbeschreibung {
    grid-area: eigenbeschreibung;
}

.post-profile-section h3,
.oeffnungszeiten h3,
.eigenbeschreibung h3 {
    margin: 0 0 9px;
    color: #8b98a5;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.post-profile-address {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    color: #f2f2f2;
    font-style: normal;
    text-align: left;
    white-space: normal;
}

.post-profile-address p {
    display: block;
    width: 100%;
    margin: 0;
    color: #f2f2f2;
    font-size: 16px;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

.post-profile-address .post-profile-email {
    margin-top: 10px;
}

.post-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.post-profile-button,
.post-profile-button:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 8px 13px;
    border: 1px solid #2f3336;
    border-radius: 999px;
    background: #080808;
    color: #e7e9ea;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.post-profile-button:hover,
.post-profile-button:focus-visible {
    background: #151515;
    border-color: #59636d;
    text-decoration: none;
}

.post-profile-button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.oeffnungszeiten pre,
.eigenbeschreibung pre {
    margin: 0;
    color: #f2f2f2;
    font: inherit;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media screen and (max-width: 420px) {
    .user_portrait {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .logo_portrait,
    .logo_user_portrait {
        width: 60px;
        height: 60px;
    }

    .user_portrait h2 {
        font-size: 19px;
    }
}

/* =========================================================
   Media Query ab 500px
   ========================================================= */

@media screen and (min-width: 500px) {

    main {
        grid-area: main;
        margin-top: 60px;

        display: grid;
        grid-template-columns: 1fr 470px 1fr;
        grid-template-areas:
            ". infos ."
            ". betreff ."
            ". body ."
            ". images ."
            ". pdf ."
            ". user_portrait .";
    }

    .pdfs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 5px;
    }

    .pdfs a:nth-of-type(1) {
        grid-column: 1 / 3;
    }

    .pdfs a:nth-of-type(4) {
        grid-column: 1 / 3;
    }
}

/* =========================================================
   Breitere, ruhige Desktop-Darstellung
   ========================================================= */

@media screen and (min-width: 700px) {
    main {
        grid-template-columns: 1fr minmax(0, 500px) 1fr;
    }
}
