/* willihobnen - Custom Styles & Alpine Polish */
[x-cloak] { display: none !important; }

:root {
    --brand-red: #D92534;
    --brand-red-dark: #B31B28;
    --brand-green: #059669;
    --brand-gold: #D97706;
    --brand-slate: #0F172A;
    --res-scale: 1;
    --header-h: 5rem;
    --sidebar-w: 16rem;
    --page-max-w: 104rem;
    --page-pad-x: 2rem;
}

@media (max-width: 767.98px) {
    :root {
        --header-h: 3.75rem;
        --sidebar-w: 3.75rem;
        --page-pad-x: 0.75rem;
    }
}

@media (min-width: 768px) and (max-width: 959.98px) {
    :root {
        --header-h: 4.25rem;
        --sidebar-w: 13rem;
        --page-pad-x: 1.25rem;
    }
}

/* Automatic Hardware/Viewport Resolution Calibration Baseline (HD 720p/768p, FHD 1080p, 2K 1440p, 4K 2160p, 8K 4320p) */
@media (min-width: 960px) {
    html {
        font-size: clamp(9.5px, 0.833333vw, 68px);
    }
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1E293B;
    background-color: #ECF5FC;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(186, 230, 253, 0.33) 0%, transparent 60%),
        radial-gradient(circle at 90% 70%, rgba(191, 219, 254, 0.33) 0%, transparent 60%),
        radial-gradient(circle at 50% 30%, rgba(224, 242, 254, 0.33) 0%, transparent 70%),
        linear-gradient(180deg, #F5F9FD 0%, #E8F3FC 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Fluid Container with Adaptive Padding & Harmonious Alignment across all resolutions (HD, 1080p, 2K, 4K, 8K) */
.page-container {
    width: 100% !important;
    max-width: min(100%, var(--page-max-w, 104rem)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--page-pad-x, 2rem) !important;
    padding-right: var(--page-pad-x, 2rem) !important;
    box-sizing: border-box !important;
}

/* Header Black Bar (Kopfzeile total schwarz, dynamisch an Skalierung angepasst) */
.header-black-bar, .header-panorama-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h, 80px) !important;
    min-height: var(--header-h, 80px) !important;
    z-index: 40;
    width: 100%;
    background-color: #000000 !important;
    border-bottom: 1px solid #27272A;
    box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.6);
}

/* Header Category / Action Buttons on Top Panorama Banner */
.header-field-btn {
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.92);
    color: #0F172A;
    box-shadow: 0 2px 8px -1px rgba(0, 0, 0, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
}
.header-field-btn:hover {
    border-color: rgba(255, 255, 255, 0.75);
    background: #FFFFFF;
    color: #0F172A;
    box-shadow: 0 6px 18px -2px rgba(0, 0, 0, 0.35);
    transform: translateY(-1.5px);
}

/* Permanent Left Burger Menu Sidebar + Main Content Area Lockstep Fluid Scaling */
.permanent-left-sidebar {
    top: var(--header-h, 80px) !important;
    width: var(--sidebar-w, 16rem) !important;
    max-width: var(--sidebar-w, 16rem) !important;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}
.main-content-area {
    margin-left: var(--sidebar-w, 16rem) !important;
    padding-top: var(--header-h, 80px) !important;
    width: calc(100% - var(--sidebar-w, 16rem)) !important;
    max-width: calc(100% - var(--sidebar-w, 16rem)) !important;
    box-sizing: border-box !important;
}
.permanent-left-sidebar::-webkit-scrollbar {
    width: 5px;
}
.permanent-left-sidebar::-webkit-scrollbar-thumb {
    background-color: #CBD5E1;
    border-radius: 4px;
}
.permanent-left-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #94A3B8;
}

/* Larger, modern subcategory pills with 19% Transparency */
.subcat-pill-btn {
    border: 1px solid rgba(30, 41, 59, 0.2);
    background: rgba(30, 41, 59, 0.19);
    color: #0F172A;
    box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.06);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.subcat-pill-btn:hover {
    border-color: rgba(30, 41, 59, 0.38);
    background: rgba(30, 41, 59, 0.28);
    color: #0F172A;
    transform: translateY(-1.5px);
}

/* Startseite Category Portal Cards in 19% Alpine Blue Transparency */
.portal-cat-card {
    background: rgba(30, 41, 59, 0.19);
    border: 1px solid rgba(30, 41, 59, 0.22);
    box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.portal-cat-card:hover {
    background: rgba(30, 41, 59, 0.28);
    border-color: rgba(30, 41, 59, 0.45);
    box-shadow: 0 10px 25px -3px rgba(15, 23, 42, 0.14);
    transform: translateY(-2px);
}

/* Brand Logo Polish */
.brand-logo {
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.08));
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
}
.brand-logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 3px 8px rgba(217, 37, 52, 0.18));
}

/* Hero Mountain Silhouette & Trödelmarkt Decoration */
.hero-alpine {
    background: radial-gradient(circle at 50% 15%, #1E293B 0%, #0F172A 100%);
    position: relative;
    overflow: hidden;
}
.hero-alpine::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3.75rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C150,90 350,-40 500,60 C650,160 900,10 1200,40 L1200,120 L0,120 Z' fill='%23F8FAFC'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    pointer-events: none;
    z-index: 5;
}

/* Subtle Glowing Alpine Border for Search Card */
.troedel-card-glow {
    position: relative;
}
.troedel-card-glow::before {
    content: '';
    position: absolute;
    inset: -0.25rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 37, 52, 0.2) 50%, rgba(5, 150, 105, 0.25) 100%);
    z-index: -1;
    filter: blur(10px);
    opacity: 0.8;
    pointer-events: none;
}

/* Modern High-End Badges above Search Bar (In Schwarz, modernes abstraktes Design, nicht rund, ohne Emojis) */
.hero-modern-badge, .alpine-wood-sign {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 1.15rem;
    border-radius: 0.625rem; /* Modernes, nicht-rundes Design */
    background: #000000; /* Tiefes Schwarz */
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 
        0 4px 18px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #F8FAFC;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    position: relative;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    cursor: default;
}
.hero-modern-badge:hover, .alpine-wood-sign:hover {
    transform: translateY(-2px);
    background: #0a0d12;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.85),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    color: #FFFFFF;
}
.hero-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 0.4375rem; /* Modernes geometrisches Icon-Feld, nicht rund */
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.hero-modern-badge:hover .hero-badge-icon {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}
.hero-badge-text {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    color: #F8FAFC;
    white-space: nowrap;
}
@media (min-width: 640px) {
    .hero-modern-badge, .alpine-wood-sign {
        padding: 0.55rem 1.35rem;
        gap: 0.8rem;
    }
    .hero-badge-text {
        font-size: 0.86rem;
    }
}
.wood-rivet {
    display: none;
}

/* Dolomites Peak Skyline Silhouette */
.hero-skyline-svg {
    position: absolute;
    bottom: 1.5625rem;
    left: 0;
    right: 0;
    width: 100%;
    height: 11.875rem;
    opacity: 0.25;
    pointer-events: none;
    z-index: 1;
}

/* Custom Card Hover Effects */
.listing-card {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px -8px rgba(15, 23, 42, 0.12);
}

/* Primary CTA Button (Optimized to eliminate scroll flickering) */
.btn-post-ad {
    box-shadow: 0 4px 14px -2px rgba(217, 37, 52, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-post-ad:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 8px 22px -3px rgba(217, 37, 52, 0.45);
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* District Badge Pills */
.district-pill {
    transition: all 0.2s ease;
}
.district-pill:hover {
    transform: scale(1.04);
}

/* Modals */
.modal-overlay {
    animation: fadeIn 0.2s ease-out forwards;
}
.modal-content {
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Badges */
.badge-top {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}
.badge-verified {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

/* Admin In-Place Editing & Pencil Badges */
.admin-pencil-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
    border: 1.5px solid #ffffff;
    z-index: 50;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    opacity: 0.9;
}
.admin-pencil-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: scale(1.22);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
}

.admin-pencil-banner {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.92);
    backdrop-filter: blur(4px);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 50;
    transition: all 0.2s ease;
    cursor: pointer;
}
.admin-pencil-banner:hover {
    background: #d97706;
    transform: scale(1.05);
}

.admin-mode-ring {
    transition: box-shadow 0.2s ease;
}
[data-admin-mode="true"] .admin-mode-ring:hover {
    box-shadow: 0 0 0 2px #f59e0b !important;
}

/* ==================== willihobn DORFGESPRÄCH LOCK BANNER (#FFD700) ==================== */
.willihobnn-dorf-banner {
    width: 100%;
    box-sizing: border-box;
    background-color: #FFD700;
    color: #000000;
    border-top: 3px solid #000000;
    border-bottom: 3px solid #000000;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.willihobnn-dorf-banner__container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}
.willihobnn-dorf-banner__icon-box {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    background: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.willihobnn-dorf-banner__icon-box svg {
    stroke: #FFD700;
    width: 26px;
    height: 26px;
}
.willihobnn-dorf-banner__content {
    flex-grow: 1;
}
.willihobnn-dorf-banner__tag {
    display: inline-block;
    background: #000000;
    color: #FFD700;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.35rem;
}
.willihobnn-dorf-banner__title {
    margin: 0 0 0.35rem 0;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.2;
    color: #000000;
}
.willihobnn-dorf-banner__desc {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    font-weight: 500;
    color: #000000;
}
.willihobnn-dorf-banner__desc strong {
    font-weight: 800;
    text-decoration: underline;
}
.willihobnn-dorf-banner__action {
    flex-shrink: 0;
}
.willihobnn-dorf-banner__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #000000;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 800;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    border: 2px solid #000000;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}
.willihobnn-dorf-banner__btn:hover {
    background-color: #222222;
    color: #FFD700;
    transform: translateY(-2px);
}
@media (max-width: 860px) {
    .willihobnn-dorf-banner__container {
        flex-direction: column;
        align-items: flex-start;
    }
    .willihobnn-dorf-banner__action {
        width: 100%;
    }
    .willihobnn-dorf-banner__btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== FORUM GEORDNETES BEITRAGSFENSTER ==================== */
.ws-forum-post {
    display: flex;
    background: #FFFFFF;
    border: 2.5px solid #CBD5E1 !important;
    border-radius: 1.125rem;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    margin-bottom: 1.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ws-forum-post:hover {
    border-color: #94A3B8 !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}
.ws-forum-author {
    width: 13.75rem;
    min-width: 12.5rem;
    flex-shrink: 0;
    background: #F8FAFC;
    border-right: 2.5px solid #CBD5E1;
    padding: 1.15rem 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.ws-forum-author__avatar-wrap {
    position: relative;
    width: 4.25rem;
    height: 4.25rem;
    margin-bottom: 0.6rem;
}
.ws-forum-author__avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: #334155;
    border: 2px solid #CBD5E1;
}
.ws-forum-author__name {
    font-weight: 800;
    font-size: 0.95rem;
    color: #0F172A;
    margin-bottom: 0.35rem;
    word-break: break-word;
}
.ws-forum-author__rank-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.72rem 0.28rem 0.45rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.85rem;
    border: 1.5px solid transparent;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 100%;
}
.ws-forum-author__rank-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
}
.ws-forum-author__rank-pill img {
    width: 1.7rem;
    height: 1.7rem;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.28));
    flex-shrink: 0;
}
.ws-rank--1 { background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%); color: #78350F; border-color: #F59E0B; } /* Gsell */
.ws-rank--2 { background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%); color: #0F172A; border-color: #94A3B8; } /* Stadtler */
.ws-rank--3 { background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%); color: #1E3A8A; border-color: #60A5FA; } /* Adlerauge */
.ws-rank--4 { background: linear-gradient(135deg, #FFFBEB 0%, #FEF08A 100%); color: #92400E; border-color: #D97706; } /* Gipfelstürmer */
.ws-rank--5 { background: linear-gradient(135deg, #991B1B 0%, #450A0A 100%); color: #FEF08A; border-color: #FBBF24; box-shadow: 0 2px 8px rgba(153, 27, 27, 0.35); } /* Forum-Kommandant */
.ws-rank--admin { background: linear-gradient(135deg, #7F1D1D 0%, #1F0404 100%); color: #FEF08A; border-color: #FBBF24; box-shadow: 0 2px 10px rgba(185, 28, 28, 0.45); } /* Klemmseckl Admin */
.ws-rank--moderator { background: linear-gradient(135deg, #065F46 0%, #022C22 100%); color: #ECFDF5; border-color: #34D399; box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35); } /* Moderator */

.ws-forum-author__meta {
    width: 100%;
    border-top: 1px solid rgba(15, 23, 42, 0.16);
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.78rem;
}
.ws-forum-author__meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0.25rem;
}
.ws-forum-author__meta-label {
    color: #64748B;
    font-weight: 500;
}
.ws-forum-author__meta-val {
    font-weight: 700;
    color: #0F172A;
}

.ws-forum-content {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.5rem;
}
.ws-forum-content__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
    padding-bottom: 0.65rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #64748B;
}
.ws-forum-content__body {
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1E293B;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.ws-forum-content__body blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: #F8FAFC;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-left: 4px solid #FFD700;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #475569;
}
.ws-forum-content__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    padding-top: 0.85rem;
    margin-top: 1.25rem;
}

@media (max-width: 767.98px) {
    .ws-forum-post {
        flex-direction: column;
    }
    .ws-forum-author {
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 2px solid #E2E8F0;
        flex-direction: row;
        flex-wrap: wrap;
        text-align: left;
        align-items: center;
        gap: 0.75rem;
    }
    .ws-forum-author__avatar-wrap {
        margin-bottom: 0;
        width: 3rem;
        height: 3rem;
    }
    .ws-forum-author__meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .ws-forum-author__meta-row {
        width: auto;
        gap: 0.35rem;
    }
}

/* ==================== ACCOUNT VERWALTUNG PAGE ==================== */
.ws-account-grid {
    display: grid;
    grid-template-columns: 16.25rem minmax(0, 1fr);
    gap: 1.5rem;
}
@media (max-width: 767.98px) {
    .ws-account-grid {
        grid-template-columns: 1fr;
    }
}
.ws-account-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    transition: all 0.15s ease;
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
}
.ws-account-nav-btn:hover {
    background: #F1F5F9;
    color: #0F172A;
}
.ws-account-nav-btn.active {
    background: #0F172A;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.ws-account-nav-btn.active svg {
    stroke: #FFD700;
}



/* ==================== WILLIHOBN SCHLERN HEADER BANNER & BURGER MENU ==================== */
.header-burger-btn {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.header-burger-btn:hover {
    transform: scale(1.05);
}
.header-burger-btn:active {
    transform: scale(0.95);
}

.header-schlern-strip {
    width: 100%;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.header-schlern-banner {
    position: relative;
    width: 100%;
    height: 4.5rem;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
}
.header-schlern-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 26%;
    transition: transform 0.6s ease;
}
.header-schlern-banner:hover img {
    transform: scale(1.02);
}

/* Fluid responsive zoom safeguards: 25% to 500% zoom */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}
img, svg, video {
    max-width: 100%;
}


/* Responsive Zoom & Viewport Optimization (25% to 500%) */
@media (max-width: 640px) {
    .brand-logo {
        height: 2rem !important;
    }
    .header-burger-btn {
        width: 2.25rem !important;
        height: 2.25rem !important;
    }
    .btn-post-ad {
        padding: 0.35rem 0.65rem !important;
        font-size: 0.75rem !important;
    }
    .header-schlern-banner {
        height: 3rem !important;
    }
}

/* In-Sidebar Live Chat Styling */
.sidebar-chat-box {
    background: #FFFFFF;
    border: 1.5px solid rgba(15, 23, 42, 0.18);
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.07);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-chat-box:hover {
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.12);
}
.sidebar-chat-scroll {
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}
.sidebar-chat-scroll::-webkit-scrollbar {
    width: 4px;
}
.sidebar-chat-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-chat-scroll::-webkit-scrollbar-thumb {
    background-color: #CBD5E1;
    border-radius: 4px;
}
.sidebar-chat-scroll::-webkit-scrollbar-thumb:hover {
    background-color: #94A3B8;
}

/* ==========================================================================
   NACHRICHTENSEITE: 8% SANFTE GRAU-SCHATTIERUNG (AUGENFREUNDLICH & WEICH)
   ========================================================================== */
.messages-page-shaded {
    background-color: #EAECEF !important;
    background: rgba(15, 23, 42, 0.08) !important;
}

.messages-page-shaded .messenger-main-card {
    background-color: #F4F6F8 !important;
    border-color: rgba(15, 23, 42, 0.16) !important;
    box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.10) !important;
}

.messages-page-shaded .messenger-panel-bg {
    background-color: #ECEFF2 !important;
}

.messages-page-shaded .messenger-header-bg {
    background-color: #F8F9FA !important;
    border-color: rgba(15, 23, 42, 0.14) !important;
}

.messages-page-shaded .messenger-stream-bg {
    background-color: #EBECEF !important;
}

.messages-page-shaded .messenger-input-bg {
    background-color: #F8F9FA !important;
    border-color: rgba(15, 23, 42, 0.18) !important;
}

/* ==========================================================================
   VERSTÄRKTER KONTRAST FÜR FELDER AUF WEISSEM HINTERGRUND ("MINIMAL SCHWARZ")
   Inputs, Textareas, Selects, Suchleiste, Inseratskarten, Forenkästen & Modale
   ========================================================================== */

/* 1. Allgemeine Formular-Eingabefelder (Inputs, Textareas, Selects) */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not(.bg-transparent):not(.border-0):not(.border-none),
select:not(.bg-transparent):not(.border-0):not(.border-none),
textarea:not(.bg-transparent):not(.border-0):not(.border-none) {
    border-color: rgba(15, 23, 42, 0.22) !important;
}

/* Formularfelder bei Fokus: taktiles, sauberes Feedback */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not(.bg-transparent):not(.border-0):not(.border-none):focus,
select:not(.bg-transparent):not(.border-0):not(.border-none):focus,
textarea:not(.bg-transparent):not(.border-0):not(.border-none):focus {
    border-color: rgba(15, 23, 42, 0.45) !important;
}

/* 2. Spezifische Tailwind Border-Klassen auf hellen Elementen subtil schärfen */
body :not(main[x-show*="admin"]):not(.bg-slate-900):not(.bg-slate-800):not(.header-black-bar) > .border-slate-200,
body :not(main[x-show*="admin"]):not(.bg-slate-900):not(.bg-slate-800):not(.header-black-bar) > .border-slate-100 {
    border-color: rgba(15, 23, 42, 0.18);
}

/* 3. Forum: Themen-Karten in der Themenliste & Antwortkasten */
.forum-topic-card,
[x-show*="forumTopics"] .rounded-2xl.border,
[x-show*="forumTopics"] .border-slate-200,
[x-show*="forumTopics"] .border-slate-200\/90 {
    border-width: 2px !important;
    border-style: solid !important;
    border-color: #CBD5E1 !important;
    border-radius: 1.125rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.forum-topic-card:hover,
[x-show*="forumTopics"] .rounded-2xl.border:hover {
    border-color: #F59E0B !important;
    box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.16), 0 4px 8px -2px rgba(15, 23, 42, 0.06) !important;
}

/* Antwort-Box im Forum */
[x-show*="forumActiveTopic"] .bg-white.rounded-3xl.border,
[x-show*="forumActiveTopic"] .border-slate-200 {
    border-width: 2px !important;
    border-color: #CBD5E1 !important;
}

/* 4. Haupt-Suchleiste (Unified Smart Search Bar) auf der Startseite */
.troedel-card-glow > div {
    border: 1.5px solid rgba(15, 23, 42, 0.20) !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08) !important;
}
.troedel-card-glow .border-l,
.troedel-card-glow .border-t {
    border-color: rgba(15, 23, 42, 0.16) !important;
}

/* 5. Inserats-Karten (Listing Cards) */
.listing-card {
    border: 1px solid rgba(15, 23, 42, 0.18) !important;
}

/* 6. Modalfenster mit weißem Hintergrund */
.modal-content.bg-white {
    border: 1.5px solid rgba(15, 23, 42, 0.18) !important;
    box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.15) !important;
}

/* 7. Sekundäre Filter (z. B. Preisbereich € Min - Max, Übergabeart) */
.flex.items-center.gap-1\.5.bg-white.border {
    border: 1px solid rgba(15, 23, 42, 0.22) !important;
}

/* 8. AUSNAHMEN: CMS-Cockpit & Dunkle Bereiche unberührt lassen */
main[x-show*="admin"] input,
main[x-show*="admin"] select,
main[x-show*="admin"] textarea,
.bg-slate-900 input,
.bg-slate-900 select,
.bg-slate-900 textarea,
.bg-slate-800 input,
.bg-slate-800 select,
.bg-slate-800 textarea,
.header-black-bar input,
.header-black-bar select {
    border-color: #334155 !important;
}

/* ==========================================================================
   3D-ANIMIERTE HISTORISCHE STÄDTE- & ORTSCHAFTSWAPPEN (3D-PERSPEKTIVE & TILT)
   ========================================================================== */

@keyframes districtHeraldic3d {
    0%, 100% {
        transform: perspective(600px) translateY(0px) rotateX(0deg) rotateY(0deg) scale(1);
        filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 10px rgba(245, 158, 11, 0.35));
    }
    33% {
        transform: perspective(600px) translateY(-3.5px) rotateX(5deg) rotateY(-8deg) scale(1.04);
        filter: drop-shadow(0 14px 22px rgba(220, 38, 38, 0.45)) drop-shadow(0 0 16px rgba(245, 158, 11, 0.55));
    }
    66% {
        transform: perspective(600px) translateY(-1.5px) rotateX(-4deg) rotateY(7deg) scale(1.03);
        filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 14px rgba(254, 240, 138, 0.45));
    }
}

@keyframes subforumHeraldic3d {
    0%, 100% {
        transform: translateY(0px) rotateY(0deg);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    }
    50% {
        transform: translateY(-2.5px) rotateY(12deg) scale(1.08);
        filter: drop-shadow(0 5px 10px rgba(245, 158, 11, 0.55));
    }
}

/* voglioavere Adler Kreis-Medaillon auf den 9 Bezirkskarten (Kompakt & edel für schmale rechteckige Banner) */
.district-3d-badge {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 3.5rem !important;
    height: 3.5rem !important;
    min-width: 3.5rem !important;
    min-height: 3.5rem !important;
    max-width: 3.5rem !important;
    max-height: 3.5rem !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Moderner detailreicher voglioavere Adler SVG (im Ruhezustand ruhig & edel) */
.district-3d-badge .district-3d-svg {
    width: 3.5rem !important;
    height: 3.5rem !important;
    min-width: 3.5rem !important;
    min-height: 3.5rem !important;
    max-width: 3.5rem !important;
    max-height: 3.5rem !important;
    display: block !important;
    margin: 0 auto !important;
    transform-origin: center center;
    animation: none !important;
    transform: translateZ(0);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.65));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease !important;
}

/* Hover-Effekt: Dezent um 50% reduziertes 3D-Hervorheben nur beim Drüberhovern */
.district-3d-badge:hover,
.forum-district-card:hover .district-3d-badge {
    transform: translateY(-2px) scale(1.04) !important;
    border: none !important;
    box-shadow: none !important;
}

.district-3d-badge:hover .district-3d-svg,
.forum-district-card:hover .district-3d-svg {
    transform: scale(1.05) translateY(-1px) !important;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 10px rgba(245, 158, 11, 0.5)) !important;
}

/* Adler-Medaillon im Bezirks-Detailbanner (schlanker & harmonisch) */
.district-header-banner .district-3d-badge {
    width: 4.25rem !important;
    height: 4.25rem !important;
    min-width: 4.25rem !important;
    min-height: 4.25rem !important;
    max-width: 4.25rem !important;
    max-height: 4.25rem !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.district-header-banner .district-3d-badge .district-3d-svg {
    width: 4.25rem !important;
    height: 4.25rem !important;
    min-width: 4.25rem !important;
    min-height: 4.25rem !important;
    max-width: 4.25rem !important;
    max-height: 4.25rem !important;
    animation: none !important;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.65));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease !important;
}
.district-header-banner .district-3d-badge:hover {
    transform: translateY(-2px) scale(1.04) !important;
}
.district-header-banner .district-3d-badge:hover .district-3d-svg {
    transform: scale(1.05) translateY(-1px) !important;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 12px rgba(245, 158, 11, 0.5)) !important;
}

/* Ortschaftswappen im Unterforen-Button (kompakt mit 3D-Effekt) */
.subforum-3d-svg {
    display: inline-block !important;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
    transform-origin: center center;
    animation: subforumHeraldic3d 3.8s ease-in-out infinite;
    transition: transform 0.3s ease;
}

/* Ortschaftswappen-Badge in der Unterforen-Detailübersicht */
.subforum-card-badge {
    width: 3rem !important;
    height: 3.5rem !important;
    min-width: 3rem !important;
    min-height: 3.5rem !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0.875rem !important;
    background: radial-gradient(circle at 35% 25%, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
    border: 1.5px solid rgba(245, 158, 11, 0.55) !important;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.45) !important;
    padding: 0.125rem !important;
}
.subforum-card-badge .subforum-3d-svg {
    width: 2.375rem !important;
    height: 2.875rem !important;
    min-width: 2.375rem !important;
    min-height: 2.875rem !important;
}

/* Quick District Pills auf der Startseite: sauber skaliert */
.district-pill .district-3d-svg {
    width: 0.875rem !important;
    height: 1rem !important;
    min-width: 0.875rem !important;
    min-height: 1rem !important;
    max-width: 0.875rem !important;
    max-height: 1rem !important;
    animation: none !important;
    filter: none !important;
}

.district-breadcrumb-svg .district-3d-svg,
.district-breadcrumb-svg .subforum-3d-svg {
    width: 1rem !important;
    height: 1.125rem !important;
    min-width: 1rem !important;
    min-height: 1.125rem !important;
    animation: none !important;
}

/* Forenbeiträge: dickerer Rand im selben eleganten Stil */
.forum-topic-card {
    border: 2.5px solid #CBD5E1 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.forum-topic-card:hover {
    border-color: #F59E0B !important;
    box-shadow: 0 10px 24px -3px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(245, 158, 11, 0.2) !important;
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
    .district-3d-svg,
    .subforum-3d-svg {
        animation: none !important;
        transform: none !important;
    }
}

/* Mobile responsive sizing */
@media (max-width: 640px) {
    .district-3d-badge,
    .district-3d-badge .district-3d-svg {
        width: 3.25rem !important;
        height: 3.25rem !important;
        min-width: 3.25rem !important;
        min-height: 3.25rem !important;
        max-width: 3.25rem !important;
        max-height: 3.25rem !important;
    }
    .district-header-banner .district-3d-badge,
    .district-header-banner .district-3d-badge .district-3d-svg {
        width: 3.75rem !important;
        height: 3.75rem !important;
        min-width: 3.75rem !important;
        min-height: 3.75rem !important;
        max-width: 3.75rem !important;
        max-height: 3.75rem !important;
    }
}

/* ==========================================================================
   PROMINENTE ZURÜCK-NAVIGATION IM FORUM (TIROLER ROT-WEISS DESIGN, KEINE EMOJIS)
   ========================================================================== */

.forum-nav-bar {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* Primärer Zurück-Button: Kräftiges Tiroler Rot (#D92534) mit klarem Schneeweiß */
.forum-btn-back-districts,
.forum-btn-back-topic {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    background: #D92534 !important;
    color: #FFFFFF !important;
    border: 1.5px solid #B91C1C !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em !important;
    border-radius: 0.875rem !important;
    box-shadow: 0 4px 14px -2px rgba(217, 37, 52, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    cursor: pointer !important;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.forum-btn-back-districts:hover,
.forum-btn-back-topic:hover {
    background: #B91C1C !important;
    color: #FFFFFF !important;
    border-color: #991B1B !important;
    transform: translateX(-3px) translateY(-1px) !important;
    box-shadow: 0 8px 20px -3px rgba(217, 37, 52, 0.55), 0 3px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.forum-btn-back-districts:active,
.forum-btn-back-topic:active {
    transform: translateX(-1px) translateY(0) !important;
    box-shadow: 0 2px 8px -2px rgba(217, 37, 52, 0.4) !important;
}

/* Sekundärer Zurück-Button: Edles Schneeweiß (#FFFFFF) mit Tiroler Rot (#D92534) & starkem Rahmen */
.forum-btn-back-district {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    background: #FFFFFF !important;
    color: #D92534 !important;
    border: 2px solid #D92534 !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em !important;
    border-radius: 0.875rem !important;
    box-shadow: 0 2px 8px -1px rgba(217, 37, 52, 0.15) !important;
    cursor: pointer !important;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.forum-btn-back-district:hover {
    background: #FEF2F2 !important;
    color: #B91C1C !important;
    border-color: #B91C1C !important;
    transform: translateX(-3px) translateY(-1px) !important;
    box-shadow: 0 6px 16px -2px rgba(217, 37, 52, 0.25) !important;
}

.forum-btn-back-district:active {
    transform: translateX(-1px) translateY(0) !important;
}

/* Modal Zurück / Abbrechen Buttons (Rot-Weiß dezent) */
.forum-btn-back-modal {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    background: #FFFFFF !important;
    color: #D92534 !important;
    border: 1.5px solid #FCA5A5 !important;
    font-weight: 800 !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 1px 4px rgba(217, 37, 52, 0.08) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.forum-btn-back-modal:hover {
    background: #FEF2F2 !important;
    border-color: #DC2626 !important;
    color: #991B1B !important;
    transform: translateX(-2px) !important;
}

/* ==========================================================================
   PANORAMISCHE BEZIRKS-BANNERKARTEN (SCHMAL RECHTECKIG, OHNE GEMEINDE-CHAOS)
   ========================================================================== */

.forum-district-card {
    position: relative;
    overflow: hidden;
    background-color: #0F172A;
    border: 2px solid rgba(148, 163, 184, 0.4) !important;
    border-radius: 1rem;
    min-height: 5.25rem !important;
    padding: 0.65rem 1rem !important;
    box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.35), 0 2px 6px -1px rgba(15, 23, 42, 0.2) !important;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform, box-shadow, border-color;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease !important;
}

.forum-district-card:hover {
    transform: translateY(-3px) scale(1.012);
    border-color: #F59E0B !important;
    box-shadow: 0 16px 34px -6px rgba(15, 23, 42, 0.58), 0 6px 16px -4px rgba(217, 119, 6, 0.45) !important;
}

.forum-district-card .district-banner-img {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.forum-district-card:hover .district-banner-img {
    transform: scale(1.07);
}

.forum-district-card .district-banner-overlay {
    background: linear-gradient(
        90deg,
        rgba(15, 23, 42, 0.88) 0%,
        rgba(15, 23, 42, 0.54) 55%,
        rgba(15, 23, 42, 0.82) 100%
    );
    transition: background 0.35s ease;
}

.forum-district-card:hover .district-banner-overlay {
    background: linear-gradient(
        90deg,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(15, 23, 42, 0.42) 55%,
        rgba(15, 23, 42, 0.74) 100%
    );
}

.district-header-banner {
    position: relative;
    overflow: hidden;
    background-color: #0F172A;
    border: 2px solid rgba(245, 158, 11, 0.75) !important;
    border-radius: 1.25rem;
    box-shadow: 0 10px 28px -4px rgba(15, 23, 42, 0.45);
}

.subforum-header-banner {
    position: relative;
    overflow: hidden;
    background-color: #0F172A;
    border: 2px solid rgba(245, 158, 11, 0.75) !important;
    border-radius: 1.25rem;
    box-shadow: 0 10px 28px -4px rgba(15, 23, 42, 0.45);
}

.subforum-header-banner .subforum-3d-badge {
    width: 4.5rem !important;
    height: 5.125rem !important;
    min-width: 4.5rem !important;
    min-height: 5.125rem !important;
    max-width: 4.5rem !important;
    max-height: 5.125rem !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.subforum-header-banner .subforum-3d-badge .subforum-3d-svg {
    width: 4.5rem !important;
    height: 5.125rem !important;
    min-width: 4.5rem !important;
    min-height: 5.125rem !important;
    max-width: 4.5rem !important;
    max-height: 5.125rem !important;
    animation: none !important;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 8px rgba(245, 158, 11, 0.4));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease !important;
}

.subforum-header-banner .subforum-3d-badge:hover {
    transform: translateY(-2px) scale(1.05) !important;
}

.subforum-header-banner .subforum-3d-badge:hover .subforum-3d-svg {
    transform: scale(1.06) translateY(-1px) !important;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 14px rgba(245, 158, 11, 0.6)) !important;
}

@media (max-width: 640px) {
    .subforum-header-banner {
        border-radius: 1rem;
    }
    .subforum-header-banner .subforum-3d-badge,
    .subforum-header-banner .subforum-3d-badge .subforum-3d-svg {
        width: 3.75rem !important;
        height: 4.25rem !important;
        min-width: 3.75rem !important;
        min-height: 4.25rem !important;
        max-width: 3.75rem !important;
        max-height: 4.25rem !important;
    }
}

/* ==========================================================================
   AUTOMATIC MULTI-RESOLUTION CALIBRATION ENGINE (HD, 1080p, 2K, 4K, 8K)
   Ensures all arbitrary pixel classes, search bars, headers, sidebars, grids,
   and panels scale in exact 1080p proportions across every monitor resolution.
   ========================================================================== */

/* 0. Convert Tailwind Arbitrary Pixel Classes to Proportional rem Units */
.text-\[8px\]  { font-size: 0.5rem !important; }
.text-\[9px\]  { font-size: 0.5625rem !important; }
.text-\[10px\] { font-size: 0.625rem !important; }
.text-\[11px\] { font-size: 0.6875rem !important; }
.text-\[12px\] { font-size: 0.75rem !important; }
.text-\[13px\] { font-size: 0.8125rem !important; }
.text-\[15px\] { font-size: 0.9375rem !important; }
.text-\[17px\] { font-size: 1.0625rem !important; }

.max-w-\[65px\]   { max-width: 4.0625rem !important; }
.max-w-\[85px\]   { max-width: 5.3125rem !important; }
.max-w-\[110px\]  { max-width: 6.875rem !important; }
.max-w-\[140px\]  { max-width: 8.75rem !important; }
.max-w-\[160px\]  { max-width: 10rem !important; }
.max-w-\[180px\]  { max-width: 11.25rem !important; }
.max-w-\[220px\]  { max-width: 13.75rem !important; }
.max-w-\[240px\]  { max-width: 15rem !important; }
.max-w-\[280px\]  { max-width: 17.5rem !important; }
.max-w-\[880px\]  { max-width: 55rem !important; }
.max-w-\[1440px\] { max-width: 90rem !important; }

.min-w-\[125px\]  { min-width: 7.8125rem !important; }
.min-w-\[130px\]  { min-width: 8.125rem !important; }
.min-w-\[200px\]  { min-width: 12.5rem !important; }

.min-h-\[100px\]  { min-height: 6.25rem !important; }
.min-h-\[340px\]  { min-height: 21.25rem !important; }
.min-h-\[500px\]  { min-height: 31.25rem !important; }
.min-h-\[580px\]  { min-height: 36.25rem !important; }
.min-h-\[640px\]  { min-height: 40rem !important; }
.h-\[520px\]      { height: 32.5rem !important; }
.h-\[640px\]      { height: 40rem !important; }
.max-h-\[720px\]  { max-height: 45rem !important; }

/* 1. Top Header Bar: Proportional Action Buttons & Anti-Overflow Scaling */
.header-black-bar > div {
    gap: 0.75rem;
    min-width: 0;
}

.header-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem !important;
    min-width: 0;
    flex-shrink: 1;
}

@media (max-width: 959.98px) {
    .header-field-btn {
        padding: 0.35rem 0.55rem !important;
        font-size: 0.72rem !important;
    }
    .btn-post-ad {
        padding: 0.4rem 0.7rem !important;
        font-size: 0.75rem !important;
    }
    .header-hide-zoom {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .header-hide-compact {
        display: none !important;
    }
}

/* 2. Left Sidebar: Proportional Scaling Across HD, 1080p, 2K, 4K, 8K */
.permanent-left-sidebar .sidebar-ant-header {
    height: clamp(3.5rem, 13.5vh, 8.25rem) !important;
}

@media (max-width: 767.98px) {
    .permanent-left-sidebar .sidebar-ant-header {
        height: 3.75rem !important;
    }
}

.permanent-left-sidebar #chat-scroll-container {
    height: clamp(7rem, 18vh, 11.5rem) !important;
    max-height: clamp(7rem, 20vh, 12.5rem) !important;
}

/* 3. Unified Smart Search Bar: Proportional rem Distribution & Responsive Wrapping */
.troedel-card-glow {
    width: 100% !important;
    max-width: min(100%, 73.75rem) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.smart-search-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    width: 100% !important;
}

.smart-search-input-wrap {
    flex: 2.2 1 15rem !important;
    min-width: 0 !important;
}

.smart-search-select-wrap {
    flex: 1.1 1 10.5rem !important;
    min-width: 0 !important;
}

.smart-search-region-wrap {
    flex: 1.35 1 12.25rem !important;
    min-width: 0 !important;
}

.smart-search-btn-wrap {
    flex: 0 0 auto !important;
    display: flex !important;
}

@media (max-width: 959.98px) {
    .smart-search-bar {
        flex-wrap: wrap !important;
    }
    .smart-search-input-wrap {
        flex: 1 1 100% !important;
        background-color: #F8FAFC !important;
        border-radius: 0.75rem !important;
    }
    .smart-search-select-wrap,
    .smart-search-region-wrap {
        flex: 1 1 11rem !important;
        border-left: none !important;
        background-color: #F8FAFC !important;
        border-radius: 0.75rem !important;
        padding: 0.35rem 0.65rem !important;
    }
    .smart-search-btn-wrap {
        flex: 1 1 auto !important;
    }
    .smart-search-btn-wrap > button:first-child {
        width: 100% !important;
    }
}

/* 4. Startseite & Portal Grids: Identical 1080p Proportions on HD, 1080p, 2K, 4K, 8K */
.welcome-features-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
}

.forum-hub-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
}

.highlights-deals-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 1rem !important;
}

.portal-cat-grid {
    display: grid !important;
    grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
    width: 100% !important;
}

.portal-cat-card {
    min-height: 6.125rem !important;
    height: auto !important;
    width: 100% !important;
}

.listings-fluid-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1.35rem !important;
}

.forum-districts-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.875rem !important;
}

.forum-subforums-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1rem !important;
}

/* Tablet & Mobile Adaptation (< 960px or extreme zoom) */
@media (max-width: 959.98px) {
    .welcome-features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .forum-hub-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)) !important;
    }
    .highlights-deals-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.5rem), 1fr)) !important;
    }
    .portal-cat-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)) !important;
    }
    .listings-fluid-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr)) !important;
    }
    .forum-districts-grid,
    .forum-subforums-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)) !important;
    }
}

@media (max-width: 639.98px) {
    .welcome-features-grid,
    .forum-hub-cards-grid,
    .listings-fluid-grid,
    .forum-districts-grid,
    .forum-subforums-grid {
        grid-template-columns: 1fr !important;
    }
    .portal-cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* 5. Modals, Messenger & Overlay Panels: Dynamic Viewport Height (dvh) Safeguards */
.modal-overlay {
    padding: clamp(0.5rem, 2vh, 1.25rem) !important;
}

.modal-content {
    max-height: min(92dvh, calc(100vh - 1.5rem)) !important;
    width: 100% !important;
}

.messenger-main-card {
    min-height: clamp(23.75rem, 68dvh, 40rem) !important;
    max-height: min(85dvh, calc(100vh - var(--header-h, 5rem) - 2rem)) !important;
}

/* Ensure all flex/grid children inside panels respect container boundaries at any resolution */
.page-container > * {
    max-width: 100%;
    box-sizing: border-box;
}





