/* ============================================================
   ===== PROFIL NEU (Desktop + Mobil) · wird NACH profil.css/profil_modern.css geladen =====
   Rueckgaengig: bash /root/bak-profil-20261109/zurueck.sh
   ============================================================ */

/* ---------- Kopfbereich ---------- */
.profil-layout .profil-header { border: 0; box-shadow: 0 6px 28px rgba(60,10,10,.10); overflow: hidden; }
.profil-layout .profil-header::before {
    height: 132px;
    background: radial-gradient(120% 140% at 0% 0%, #d11a1a 0%, #a70909 38%, #5c0505 100%);
}
.profil-layout .profil-header::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 132px; pointer-events: none;
    background: repeating-linear-gradient(115deg, rgba(255,255,255,.06) 0 2px, transparent 2px 22px);
}
.profil-layout .profil-header-top { padding: 74px 28px 0; z-index: 1; }
.profil-layout .profil-avatar img,
.profil-layout .profil-avatar span:not(.pl-badge) { border: 6px solid #fff !important; box-shadow: 0 8px 24px rgba(0,0,0,.22) !important; }
.profil-layout .profil-identity { padding: 14px 28px 26px; position: relative; z-index: 1; }
.profil-layout .profil-name { font-size: 1.9rem; font-weight: 800; letter-spacing: -.025em; }
.profil-layout .profil-meta > span,
.profil-layout .profil-meta > a { background: #f4f4f7; font-weight: 600; }
.profil-layout .profil-btn { font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.profil-layout .profil-follow { background: #a70909; border-color: #a70909; box-shadow: 0 6px 16px rgba(167,9,9,.28); }
.profil-layout .profil-follow:hover { background: #8a0707; border-color: #8a0707; }
.profil-layout .profil-follow.glocke-abo-aktiv { background: #fff; border-color: var(--pm-linie); box-shadow: none; }

/* ---------- Seitenleiste ---------- */
.profil-layout .profil-card { border: 0; box-shadow: 0 4px 20px rgba(60,10,10,.07); }
.profil-layout .profil-stat { background: #f7f2f2; border-radius: 16px; transition: transform .15s, box-shadow .15s, background .15s; }
.profil-layout .profil-stat:hover { background: #fff; box-shadow: 0 6px 16px rgba(167,9,9,.16), inset 0 0 0 1px #e9c9c9; transform: translateY(-2px); }
.profil-layout .profil-stat b { font-size: 1.4rem; color: #a70909; }

/* ---------- Inhaltsbereich: Beitragsliste ohne Rahmen, jede Karte steht fuer sich ---------- */
.profil-layout .profil-tab-content:has(.pf-post-liste) { background: transparent; border: 0; box-shadow: none; padding: 0; }

.pf-post-liste { display: flex; flex-direction: column; gap: 16px; }
.pf-post {
    background: #fff; border-radius: 20px; overflow: hidden;
    box-shadow: 0 3px 18px rgba(60,10,10,.07); border: 1px solid #f0e9e9;
    transition: box-shadow .2s, transform .2s;
}
.pf-post:hover { box-shadow: 0 8px 30px rgba(60,10,10,.12); }
.pf-post-kopf { padding: 16px 22px 12px; border-bottom: 1px solid #f4eeee; background: linear-gradient(180deg,#fff,#fcf8f8); }
.pf-post-thema { display: block; font-weight: 800; font-size: 1.02rem; line-height: 1.3; color: #a70909; text-decoration: none; letter-spacing: -.01em; }
.pf-post-thema:hover { text-decoration: underline; }
.pf-post-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: .76rem; color: #8b8f99; }
.pf-chip { display: inline-flex; align-items: center; gap: 6px; background: #f4f4f7; color: #5b6070; border-radius: 999px; padding: 4px 10px; font-weight: 600; }
.pf-chip i { color: #a70909; }
.pf-post-sub time i { margin-right: 4px; }
.pf-post-koerper { padding: 16px 22px 6px; }
.pf-post-fuss { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 22px 16px; font-size: .78rem; color: #8b8f99; }
.pf-post-zum { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; background: #a70909; color: #fff !important; font-weight: 700; font-size: .8rem; text-decoration: none !important; transition: background .15s, transform .15s; }
.pf-post-zum:hover { background: #8a0707; transform: translateX(2px); }
.pf-gemerkt { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Beitragstext + Medien: gleiche Darstellung wie im Thema ---------- */
.pf-message { line-height: 1.7; font-size: 1rem; color: #1c1c1f; word-wrap: break-word; overflow-wrap: anywhere; overflow-x: clip; }
.pf-message a { color: #993234; text-decoration: none; }
.pf-message a:hover { text-decoration: underline; }
.pf-message img { max-width: 100%; height: auto; border-radius: 12px; margin: 6px 0; cursor: pointer; }
.pf-message .image-wrapper { position: relative; display: inline-block; max-width: 100%; }
.pf-message .image-wrapper img { max-height: 520px; width: auto; display: block; }
.pf-message .rwe-image-toolbar { position: absolute; top: 8px; right: 8px; z-index: 20; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: calc(100% - 16px); }
.pf-message .rwe-media-download-btn { position: static; width: 30px; height: 30px; border: 0; background: none; padding: 0; color: #fff; display: flex; align-items: center; justify-content: center; font-size: .95rem; cursor: pointer; filter: drop-shadow(0 1px 5px rgba(0,0,0,.75)); transition: transform .2s, filter .2s; flex-shrink: 0; }
.pf-message .rwe-media-download-btn:hover { transform: scale(1.15); }
.pf-message .rwe-media-download-btn.is-bookmarked { filter: drop-shadow(0 1px 5px rgba(0,0,0,.75)) drop-shadow(0 0 10px rgba(255,70,70,.95)); }
.pf-message .video-wrapper { margin: 8px 0; border-radius: 12px; overflow: hidden; background: #000; position: relative; }
.pf-message iframe { max-width: 100%; border-radius: 12px; }
.pf-message blockquote { margin: 10px 0; }

/* lange Beitraege einklappen */
.pf-message.pf-geklappt { max-height: 440px; overflow: hidden; position: relative; }
.pf-message.pf-geklappt::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 85%); pointer-events: none; }
.pf-mehr { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 10px; padding: 8px 16px; border: 1px solid #e6dcdc; border-radius: 999px; background: #fff; color: #a70909; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.pf-mehr:hover { background: #fff5f5; border-color: #a70909; }
.pf-mehr[hidden] { display: none; }
.pf-mehr i { transition: transform .2s; }
.pf-mehr.offen i { transform: rotate(180deg); }

/* Bild-Vollansicht */
.pf-lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(10,6,6,.92); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.pf-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.pf-lightbox button { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 1.1rem; cursor: pointer; }

/* ---------- Medien / Follower / Dateien: ruhiger ---------- */
.profil-layout .user-media-grid { gap: 12px; }
.profil-layout .user-media-tile { border-radius: 16px; }
.profil-layout .user-people-item { border-radius: 16px; }

/* ---------- Mobil ---------- */
@media (max-width: 767px) {
    .profil-layout .profil-header::before,
    .profil-layout .profil-header::after { height: 104px; }
    .profil-layout .profil-header-top { padding: 58px 16px 0; }
    .profil-layout .profil-identity { padding: 12px 16px 20px; }
    .profil-layout .profil-name { font-size: 1.5rem; }
    .profil-layout .profil-avatar img,
    .profil-layout .profil-avatar span:not(.pl-badge) { border-width: 5px !important; }
    .profil-layout .profil-actions { gap: 6px; }
    .profil-layout .profil-btn { padding: 9px 14px; font-size: .82rem; }
    .pf-post-liste { gap: 12px; }
    .pf-post { border-radius: 16px; }
    .pf-post-kopf { padding: 13px 15px 10px; }
    .pf-post-koerper { padding: 13px 15px 4px; }
    .pf-post-fuss { padding: 8px 15px 13px; }
    .pf-message { font-size: .97rem; line-height: 1.65; }
    .pf-message .image-wrapper img { max-height: 380px; }
    .pf-message.pf-geklappt { max-height: 360px; }
    .pf-post-zum { padding: 8px 14px; }
}
@media (max-width: 767px) {
    .profil-layout .profil-meta { gap: 6px; }
    .profil-layout .profil-meta > span,
    .profil-layout .profil-meta > a { padding: 5px 10px; font-size: .76rem; }
}

/* ---------- Medien: Social-Media-Kacheln ---------- */
.user-social-tile { background: linear-gradient(135deg, var(--soc-farbe, #444), #1a1a1a); }
.user-social-tile .user-social-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font-size: 2.4rem; color: rgba(255,255,255,.9); }
.user-social-tile img + .user-social-icon { display: none; }
.pf-soc-karte { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; color: #fff !important; text-decoration: none !important; background: linear-gradient(135deg, var(--soc-farbe, #444), #1a1a1a); }
.pf-soc-karte > i:first-child { font-size: 2rem; }
.pf-soc-karte span { flex: 1; line-height: 1.35; }
.pf-soc-karte small { opacity: .85; }
.pf-soc-slot .social-preview { margin: 0; }

/* ============================================================
   ===== PROFIL-REITER: IMMER SICHTBAR (links am Desktop, Raster am Handy) – kein Hamburger-Menue mehr =====
   ============================================================ */
html body .profil-layout .profil-burger { display: none !important; }
html body .profil-layout .profil-tabs-wrap { display: block; background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0; overflow: visible; }
html body .profil-layout .profil-tabs,
html body .profil-layout .profil-tabs.menue-offen {
    display: flex !important; position: static; width: auto; margin: 0; overflow: visible;
    background: #fff; border: 0; border-radius: 20px; box-shadow: 0 3px 18px rgba(60,10,10,.07); padding: 8px; gap: 3px;
}
html body .profil-layout .profil-tab,
html body .profil-layout .profil-tabs.menue-offen .profil-tab {
    display: flex; align-items: center; gap: 12px; flex: none !important; width: 100%; box-sizing: border-box;
    justify-content: flex-start !important; text-align: left; white-space: nowrap;
    padding: 12px 14px; border-radius: 14px; font-size: .92rem; font-weight: 700; margin: 0;
    background: transparent; color: #3d4150 !important; transition: background .15s, color .15s;
}
html body .profil-layout .profil-tab i { margin: 0; width: 1.25em; text-align: center; font-size: 1.02em; color: #a70909; }
html body .profil-layout .profil-tab .profil-tab-cnt { margin-left: auto; min-width: 26px; text-align: center; padding: 2px 8px; border-radius: 999px; background: #f2f2f5; color: #6b7080; font-size: .74rem; font-weight: 700; }
html body .profil-layout .profil-tab:hover { background: #f8f1f1; }
html body .profil-layout .profil-tab.aktiv,
html body .profil-layout .profil-tabs.menue-offen .profil-tab.aktiv { background: #a70909; color: #fff !important; box-shadow: 0 6px 16px rgba(167,9,9,.28); }
html body .profil-layout .profil-tab.aktiv i { color: #fff; }
html body .profil-layout .profil-tab.aktiv .profil-tab-cnt { background: rgba(255,255,255,.22); color: #fff; }
html body .profil-layout .profil-tab.aktiv::after { display: none; }

/* Desktop breit: Reiter links | Inhalt | Seitenleiste rechts */
@media (min-width: 1100px) {
    .profil-layout { grid-template-columns: 230px minmax(0, 1fr) 300px; grid-template-areas: "header header header" "tabs content sidebar"; gap: 20px; }
    .profil-layout .profil-tabs-wrap { position: sticky; top: 84px; align-self: start; }
    .profil-layout .profil-tabs { flex-direction: column; }
    .profil-layout .profil-sidebar { position: sticky; top: 84px; }
}
/* Tablet: Reiter links | Inhalt, Seitenleiste darunter als Kartenreihe */
@media (min-width: 768px) and (max-width: 1099px) {
    .profil-layout { grid-template-columns: 200px minmax(0, 1fr); grid-template-areas: "header header" "tabs content" "sidebar sidebar"; gap: 16px; }
    .profil-layout .profil-tabs-wrap { position: sticky; top: 84px; align-self: start; }
    .profil-layout .profil-tabs { flex-direction: column; }
    .profil-layout .profil-tab { padding: 11px 12px; font-size: .88rem; }
    .profil-layout .profil-sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profil-layout .profil-sidebar .profil-stats-card { grid-column: 1 / -1; }
}
/* Handy: alle Reiter auf einen Blick als Kachel-Raster */
@media (max-width: 767px) {
    html body .profil-layout .profil-tabs,
    html body .profil-layout .profil-tabs.menue-offen { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px; border-radius: 18px; }
    html body .profil-layout .profil-tab,
    html body .profil-layout .profil-tabs.menue-offen .profil-tab {
        flex-direction: column; justify-content: center !important; align-items: center; text-align: center; gap: 3px;
        padding: 10px 2px 8px; font-size: .7rem; line-height: 1.15; border-radius: 13px; width: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    }
    html body .profil-layout .profil-tab i { font-size: 1.15rem; width: auto; }
    html body .profil-layout .profil-tab .profil-tab-cnt { margin: 0; min-width: 0; padding: 1px 7px; font-size: .66rem; }
}

@media (max-width: 767px) { html body .profil-layout .profil-tabs:has(.profil-tab:nth-child(7)) { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
