:root {
    --primary: #0f172a;    /* Dunkles Blau (Slate 900) */
    --accent: #3b82f6;     /* Helles Blau (Blue 500) */
    --success: #10b981;    /* Grün (Emerald 500) */
    --danger: #ef4444;     /* Rot (Red 500) */
    --bg: #f8fafc;         /* Hintergrund (Slate 50) */
    --text: #334155;       /* Text (Slate 700) */
    --white: #ffffff;
    --radius: 18px;        /* Runde Ecken für Cards */
    --shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- 1. BASE & RESET --- */
* { box-sizing: border-box; transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); }

body {
    margin: 0; 
    font-family: var(--font-main); 
    background-color: var(--bg);
    color: var(--text); 
    line-height: 1.6; 
    overflow-x: hidden; 
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--primary); letter-spacing: -0.5px; margin-top: 0; line-height: 1.2; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }

/* --- 2. LAYOUT --- */
.stage { 
    padding-top: 80px; /* Platz für Header */
    min-height: 100vh; 
    padding-bottom: 3rem; 
}

.container { 
    width: 95%; 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 0 1.5rem; 
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- 3. PREMIUM NAVIGATION --- */
.header-ui {
    position: fixed; top: 0; left: 0; width: 100%; height: 0;
    z-index: 1000; padding: 1.5rem;
    display: flex; justify-content: space-between; align-items: flex-start;
    pointer-events: none;
}

/* Suche diesen Block und passe ihn an: */
.logo {
    max-width: 128px;
    width: 100%;
    height: auto;
    pointer-events: auto; /* WICHTIG: Damit das Logo Klicks annimmt */
    cursor: pointer;
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.05); /* Kleiner visueller Feedback-Effekt */
}

.logo-pill {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-weight: 900; font-size: 1.6rem; 
    text-decoration: none; color: var(--primary); letter-spacing: -1px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex; align-items: center;
}
.logo-pill:hover { transform: scale(1.03); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.logo-pill:active { transform: scale(0.97); }

.lang-pill {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.9rem; 
    color: var(--primary); text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s, background 0.2s;
}
.lang-pill:hover { transform: scale(1.05); background: white; color: var(--accent); }
.lang-pill:active { transform: scale(0.95); }

.nav-trigger {
    pointer-events: auto;
    width: 54px; height: 54px; 
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: transform 0.2s;
    z-index: 2000;
}
.nav-trigger:active { transform: scale(0.95); }

.burger-lines { position: relative; width: 22px; height: 16px; }
.burger-lines span {
    position: absolute; left: 0; width: 100%; height: 2.5px;
    background: var(--primary); border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}
.burger-lines span:nth-child(1) { top: 0; }
.burger-lines span:nth-child(2) { top: 50%; transform: translateY(-50%); width: 70%; right: 0; left: auto; }
.burger-lines span:nth-child(3) { bottom: 0; }

.menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    z-index: 1900;
    opacity: 0; visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; padding-top: 80px; 
}

.overlay-close {
    position: absolute; top: 2rem; right: 2rem;
    background: transparent; border: none;
    font-size: 3.5rem; line-height: 1; color: var(--primary);
    cursor: pointer; transition: transform 0.2s; z-index: 2001;
    font-family: var(--font-main); font-weight: 200;
}
.overlay-close:hover { color: var(--danger); transform: rotate(90deg); }

.menu-scroll-container {
    flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
    overflow-y: auto; width: 100%; scrollbar-width: none;
}
.menu-scroll-container::-webkit-scrollbar { display: none; }

.menu-links { 
    display: flex; flex-direction: column; gap: 0.8rem; 
    width: 100%; max-width: 400px; padding: 1rem;
    transform: translateY(30px); transition: transform 0.4s;
}

.menu-link {
    display: flex; align-items: center; gap: 1rem;
    font-size: 1.2rem; font-weight: 700; 
    color: var(--primary); text-decoration: none;
    padding: 1rem 1.5rem; border-radius: 18px;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
    opacity: 0; transform: translateX(-20px);
    transition: all 0.2s;
}
.menu-link:hover { transform: translateY(-3px) !important; box-shadow: 0 10px 25px rgba(0,0,0,0.08); border-color: var(--accent); }
.nav-icon { width: 22px; height: 22px; stroke-width: 2.5px; opacity: 0.6; }

.menu-link.highlight { background: var(--primary); color: white; }
.menu-link.highlight .nav-icon { stroke: white; opacity: 1; }
.menu-link.highlight:hover { background: #1e293b; border-color: transparent; }

.menu-link.logout { color: #ef4444; border-color: #fee2e2; }
.menu-link.logout .nav-icon { stroke: #ef4444; }

.mobile-lang-switch { text-align: center; margin-bottom: 1rem; font-weight: 700; color: #cbd5e1; }
.mobile-lang-switch a { text-decoration: none; color: #94a3b8; margin: 0 5px; }
.mobile-lang-switch a.active { color: var(--primary); font-weight: 900; border-bottom: 2px solid var(--accent); }

.menu-legal {
    flex-shrink: 0; padding: 2rem 1rem;
    text-align: center; font-size: 0.85rem; font-weight: 500; color: #94a3b8;
    background: transparent; opacity: 0; transition: opacity 0.5s;
}
.menu-legal a { color: inherit; text-decoration: none; margin: 0 8px; transition: color 0.2s; }
.menu-legal a:hover { color: var(--primary); }

body.menu-open { overflow: hidden; }
body.menu-open .menu-overlay { opacity: 1; visibility: visible; }
body.menu-open .menu-links { transform: translateY(0); }
body.menu-open .menu-link { animation: slideInNav 0.5s forwards; animation-delay: calc(0.06s * var(--i)); }
body.menu-open .menu-legal { animation: fadeInLegal 0.6s forwards 0.4s; }

@keyframes slideInNav { to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInLegal { to { opacity: 1; } }

body.menu-open .nav-trigger, 
body.menu-open .logo-pill, 
body.menu-open .lang-pill { opacity: 0; pointer-events: none; transform: scale(0.5); transition: all 0.3s; }

/* --- 4. COMPONENTS --- */
.btn {
    background: var(--primary); color: white; border: 2px solid transparent;
    padding: 0.75rem 1.5rem; border-radius: 50px; cursor: pointer;
    font-weight: 700; font-size: 0.95rem; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    transition: all 0.15s; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0,0,0,0.15); background: #1e293b; color: #fff;}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-outline { background: transparent; color: var(--primary); border: 2px solid #e2e8f0; box-shadow: none; }
.btn-outline:hover { border-color: var(--primary); background: transparent; color: var(--primary); }

.input {
    border: 2px solid #e2e8f0; padding: 0.85rem; border-radius: 12px;
    font-size: 1rem; transition: border-color 0.2s; outline: none; font-family: inherit;
    background: white; width: 100%;
}
.input:focus { border-color: var(--accent); }

.card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

.status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.status-badge.online { background: #dcfce7; color: #166534; }
.status-badge.offline { background: #f1f5f9; color: #64748b; }
.status-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; display: inline-block; animation: pulse-green 2s infinite; }

/* --- 5. AD DETAIL & GALLERY --- */
.ad-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 1000px) { 
    .ad-grid { grid-template-columns: 1fr; } 
    .ad-grid > div:nth-child(2) { order: -1; } 
}
.sticky-desktop { position: sticky; top: 100px; z-index: 10; }
@media (max-width: 1000px) { .sticky-desktop { position: static !important; } }

.gallery-container { margin-bottom: 2rem; }
.hero-wrapper {
    position: relative; border-radius: 24px; overflow: hidden;
    background: #f1f5f9; height: 500px; border: 1px solid #e2e8f0;
    cursor: zoom-in; box-shadow: inset 0 0 20px rgba(0,0,0,0.03);
    margin-bottom: 1rem; touch-action: pan-y; user-select: none;
}
.hero-img {
    width: 100%; height: 100%; object-fit: contain; display: block;
    transform: translateX(0); opacity: 1;
    transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}
.hero-img.slide-out-left { transform: translateX(-30px); opacity: 0; }
.hero-img.slide-in-right { transform: translateX(30px); opacity: 0; }
.hero-img.slide-out-right { transform: translateX(30px); opacity: 0; }
.hero-img.slide-in-left { transform: translateX(-30px); opacity: 0; }

.gallery-scroll {
    display: flex; 
	gap: 1rem; 
	overflow-x: scroll; 
	scroll-behavior: smooth; 
	padding: 4px;
	max-width: 768px;
    scrollbar-width: thin; 
	scrollbar-color: #cbd5e1 transparent;
}
.gallery-thumb {
    width: 100px; height: 80px; flex-shrink: 0; border-radius: 12px;
    background-size: cover; background-position: center; cursor: pointer;
    border: 2px solid transparent; transition: all 0.2s; opacity: 0.7;
}
.gallery-thumb:hover, .gallery-thumb.active { opacity: 1; border-color: var(--accent); transform: translateY(-2px); }

.caption-pill {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.75); color: white;
    padding: 8px 24px; border-radius: 50px; font-size: 0.95rem; font-weight: 500;
    backdrop-filter: blur(8px); box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    pointer-events: none; white-space: nowrap; max-width: 90%;
    overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity 0.3s, transform 0.3s;
}
.caption-pill.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(0,0,0,0.05);
    color: var(--primary); font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 5; transition: all 0.2s; opacity: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.hero-wrapper:hover .slider-btn { opacity: 1; }
.slider-btn:hover { background: white; transform: translateY(-50%) scale(1.1); }
.sb-prev { left: 15px; padding-right: 2px; } 
.sb-next { right: 15px; padding-left: 2px; }
.zoom-indicator {
    position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.3); color: white;
    padding: 6px; border-radius: 8px; pointer-events: none; backdrop-filter: blur(4px);
    opacity: 0; transition: opacity 0.2s;
}
.hero-wrapper:hover .zoom-indicator { opacity: 1; }
@media (max-width: 768px) {
    .slider-btn { opacity: 0.8 !important; width: 36px; height: 36px; font-size: 1.2rem; }
    .hero-wrapper { height: 350px; }
}

/* --- 6. LIGHTBOX --- */
.lightbox-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); z-index: 3000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
    backdrop-filter: blur(10px);
}
.lightbox-overlay.active { opacity: 1; pointer-events: all; }
.lightbox-content { position: relative; max-width: 95vw; max-height: 90vh; }
.lightbox-img { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: 8px; box-shadow: 0 0 50px rgba(0,0,0,0.5); }
.lb-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); color: white; border: none;
    width: 60px; height: 60px; border-radius: 50%; font-size: 2rem;
    cursor: pointer; display: grid; place-items: center; transition: all 0.2s; z-index: 10;
}
.lb-btn:hover { background: rgba(255,255,255,0.25); transform: translateY(-50%) scale(1.1); }
.lb-prev { left: 20px; } .lb-next { right: 20px; }
.lb-close { top: 20px; right: 20px; bottom: auto; transform: none; background: transparent; font-size: 3rem; line-height: 1; }
.lb-close:hover { color: var(--danger); transform: rotate(90deg); }

/* --- 7. UPLOAD & MEDIA ITEMS (UPDATED FOR TOOLBAR) --- */
.upload-zone {
    border: 2px dashed #cbd5e1; padding: 2.5rem; border-radius: 16px;
    text-align: center; cursor: pointer; background: #f8fafc;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
}
.upload-zone:hover { 
    border-color: var(--accent); background: #f1f5f9; transform: scale(1.01); 
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
}
.upload-zone:active { transform: scale(0.98); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-top: 1.5rem; }

.media-item {
    background: #fff; border-radius: 12px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); border: 1px solid #e2e8f0;
    position: relative; overflow: hidden; display: flex; flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.media-item:hover { transform: translateY(-3px); box-shadow: 0 10px 15px rgba(0,0,0,0.08); }
.media-item.dragging { opacity: 0.4; border: 2px dashed var(--accent); transform: scale(0.95); }
.media-item.loading { opacity: 0.8; pointer-events: none; }
.media-item.error { border: 2px solid var(--danger); background: #fef2f2; }

/* Preview Area */
.media-preview-wrap {
    position: relative; width: 100%; aspect-ratio: 4/3; background: #f1f5f9; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.media-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* New Toolbar */
.media-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.4rem; background: #f8fafc; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0;
}

.media-btn {
    position: static; /* Reset absolute */
    width: 32px; height: 32px;
    background: transparent; color: #64748b;
    border: none; border-radius: 4px; 
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s;
}
.media-btn:hover { background: #e2e8f0; color: var(--primary); }
.media-btn.btn-media-del:hover { background: #fee2e2; color: var(--danger); }
.media-btn.drag-handle { cursor: grab; }
.media-btn.drag-handle:active { cursor: grabbing; }

/* Meta & Caption */
.media-meta { padding: 0.6rem; }
.media-caption { 
    width: 100%; border: none; background: transparent;
    padding: 4px; font-size: 0.85rem; outline: none; 
    border-bottom: 1px solid transparent; transition: border 0.2s;
}
.media-caption:focus { border-bottom-color: var(--accent); }
.media-caption::placeholder { color: #cbd5e1; }

.upload-progress-bg { height: 4px; background: #e2e8f0; width: 100%; position: absolute; bottom: 0; left: 0; }
.upload-progress-bar { height: 100%; background: var(--success); width: 0%; transition: width 0.2s ease-out; }
.media-error-msg { color: var(--danger); font-size: 0.75rem; font-weight: 700; padding: 0.5rem; text-align: center; background: #fee2e2; }

/* Spinner */
.rotate-spinner {
    position: absolute; inset: 0; background: rgba(255,255,255,0.8);
    display: flex; align-items: center; justify-content: center;
    z-index: 10; font-size: 1.5rem; color: var(--accent);
    animation: spin 1s linear infinite;
}

/* --- 8. MAP & HOME SEARCH STYLES --- */
.fs-map { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: 0; }

/* FIX: animation with translate */
@keyframes fadeInUpCentered { 
    from { opacity: 0; transform: translate(-50%, 20px); } 
    to { opacity: 1; transform: translate(-50%, 0); } 
}

.home-overlay { 
    position: absolute; bottom: 3rem; left: 50%; transform: translateX(-50%); 
    width: 95%; max-width: 850px; z-index: 10; 
    animation: fadeInUpCentered 0.8s ease-out; 
}

.search-bar {
    background: white; border-radius: 50px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.15); display: flex; align-items: center; padding: 0.5rem;
    border: 1px solid rgba(0,0,0,0.05); transition: transform 0.3s, box-shadow 0.3s;
}
.search-bar:focus-within { transform: translateY(-2px); box-shadow: 0 25px 50px rgba(0,0,0,0.2); border-color: var(--accent); }

.sb-group {
    display: flex; align-items: center; padding: 0.5rem 1rem;
    position: relative; transition: background 0.2s; border-radius: 30px;
}
.sb-group:hover { background: #f1f5f9; }
.sb-group.grow { flex: 1; }
.sb-group.small { width: 140px; flex-shrink: 0; }

.sb-icon { font-size: 1.2rem; margin-right: 12px; opacity: 0.5; }
.sb-field { display: flex; flex-direction: column; justify-content: center; width: 100%; }
.sb-label { font-size: 0.65rem; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.sb-input { border: none; background: transparent; padding: 0; font-size: 0.95rem; color: var(--text); outline: none; width: 100%; font-weight: 500; }
.sb-input::placeholder { color: #cbd5e1; font-weight: 400; }

.sb-divider { width: 1px; height: 30px; background: #e2e8f0; margin: 0 5px; }

.sb-btn {
    background: var(--accent); color: white; border: none; cursor: pointer;
    border-radius: 50px; padding: 0.8rem 1.8rem; font-weight: 700; font-size: 1rem;
    display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.2s; margin-left: 0.5rem;
}
.sb-btn:hover { transform: scale(1.05); box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5); }
.sb-btn:active { transform: scale(0.95); }
.btn-icon { font-size: 1.2rem; }

.locate-pill {
    background: white; color: var(--text); border: none; padding: 0.6rem 1.2rem; border-radius: 50px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.locate-pill:hover { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0,0,0,0.15); color: var(--accent); }

@media (max-width: 768px) {
    .home-overlay { bottom: 2rem; width: 92%; }
    .search-bar { flex-direction: column; border-radius: 24px; padding: 1rem; gap: 0.5rem; align-items: stretch; }
    .sb-divider { display: none; }
    .sb-group { width: 100% !important; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 0.8rem; }
    .sb-btn { margin-left: 0; margin-top: 0.5rem; justify-content: center; padding: 1rem; border-radius: 12px; width: 100%; }
    .sb-label { display: none; }
    .sb-input { font-size: 1rem; }
}

.map-pin { width: 40px; height: 40px; background: white; border: 2px solid white; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 4px 10px rgba(0,0,0,0.3); overflow: hidden; cursor: pointer; transition: transform 0.2s, z-index 0.2s; position: relative; }
.map-pin img { width: 100%; height: 100%; object-fit: cover; transform: rotate(45deg); }
.map-pin:hover { transform: scale(1.1) rotate(-45deg); z-index: 999 !important; }
.map-cluster { width: 40px; height: 40px; background: var(--accent); color: white; border: 2px solid white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.custom-popup .leaflet-popup-content-wrapper { background: transparent; box-shadow: none; padding: 0; }
.custom-popup .leaflet-popup-content { margin: 0 !important; width: 320px !important; }
.custom-popup .leaflet-popup-tip { background: white; }
.popup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: white; padding: 16px; border-radius: 20px; box-shadow: 0 20px 50px -10px rgba(0,0,0,0.2); max-height: 350px; overflow-y: auto; }
.popup-item { background: #f8fafc; border-radius: 12px; overflow: hidden; cursor: pointer; border: 1px solid #e2e8f0; transition: transform 0.2s; animation: popIn 0.5s forwards; }
.popup-item:hover { transform: scale(1.05); border-color: var(--accent); }
.popup-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.popup-item-info { padding: 8px; }
.popup-item-title { font-size: 0.8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.popup-item-price { font-size: 0.75rem; color: var(--accent); font-weight: 600; }

/* --- 9. ADMIN STYLES --- */
.admin-table { width: 100%; min-width: 600px; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 1rem; background: #f8fafc; border-bottom: 2px solid #e2e8f0; }
.admin-table td { padding: 1rem; border-bottom: 1px solid #f1f5f9; }
.admin-table tr:hover { background: #f8fafc; }
.media-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); position: relative; border: 3px solid #f59e0b; transition: all 0.2s; }
.media-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.media-img-wrap { height: 220px; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.media-controls { display: flex; gap: 0.5rem; padding: 0.75rem; background: white; border-top: 1px solid #f1f5f9; }
.mc-btn { flex: 1; border: none; padding: 0.6rem; border-radius: 8px; cursor: pointer; font-weight: 800; }
.btn-ok { background: #dcfce7; color: #166534; }
.btn-no { background: #fee2e2; color: #b91c1c; }

/* --- 10. MODAL --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 2000;
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(5px); animation: fadeIn 0.2s;
}
.modal-overlay.active { display: flex; }
.modal-card {
    background: white; padding: 2rem; border-radius: 20px;
    width: 90%; max-width: 450px; position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); animation: popIn 0.3s;
}
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #94a3b8; }

/* --- 11. MY ADS REQUESTS --- */
.req-container { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #f1f5f9; }
.req-bubble { display: inline-block; background: #ef4444; color: white; font-size: 0.75rem; font-weight: 800; padding: 2px 8px; border-radius: 10px; margin-left: 8px; animation: pulse-red 2s infinite; }
.req-item { background: #f8fafc; padding: 1rem; border-radius: 12px; margin-bottom: 0.5rem; border: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 0.5rem; }
.req-meta { font-size: 0.85rem; color: #64748b; display: flex; justify-content: space-between; }
.req-contact { font-weight: 700; color: var(--primary); font-size: 1.1rem; }

/* --- 12. CATEGORY PILLS --- */
.cat-suggestions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; min-height: 40px; }
.cat-pill { padding: 0.5rem 1rem; border-radius: 50px; background: #f1f5f9; border: 1px solid #e2e8f0; color: #64748b; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 5px; animation: popIn 0.3s; }
.cat-pill:hover { background: #e2e8f0; color: var(--primary); }
.cat-pill.active { background: var(--accent); color: white; border-color: var(--accent); box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3); }
.cat-remove { font-size: 1.1rem; line-height: 0.8; margin-left: 4px; opacity: 0.8; }
.cat-remove:hover { opacity: 1; }
.cat-badge { display: inline-block; padding: 4px 10px; border-radius: 8px; background: #eff6ff; color: var(--accent); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-right: 0.5rem; letter-spacing: 0.5px; }

/* --- ANIMATIONS --- */
@keyframes popIn { 0% { transform: scale(0.9); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { transform: translateX(-100%) rotate(45deg); } 100% { transform: translateX(100%) rotate(45deg); } }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* --- AD DETAIL RESPONSIVE FIXES --- */

.ad-body-card { padding: 2rem; }
.sidebar-card, .safety-card { padding: 1.5rem; }
.map-card { padding: 0; height: 220px; overflow: hidden; position: relative; }
#detail-map { width: 100%; height: 100%; z-index: 1; background: #f1f5f9; }

.ad-description-text { line-height: 1.8; color: #334155; white-space: pre-wrap; margin-top: 2rem; }
.ad-legal-box { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid #f1f5f9; font-size: 0.85rem; color: #94a3b8; }

.share-btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.share-btn { font-size: 0.9rem; justify-content: center; padding: 0.6rem; }

.report-fab {
    position: fixed; bottom: 2rem; right: 2rem; width: 60px; height: 60px;
    border-radius: 50%; background: #ef4444; color: white; border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); font-size: 1.5rem;
    cursor: pointer; z-index: 99; display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s;
}

/* MOBILE BREAKPOINT */
@media (max-width: 1000px) {
    .ad-grid { 
        grid-template-columns: 1fr; /* Stapelt Sidebar unter Content */
        gap: 1.5rem; 
    }
    
    .ad-grid > div:nth-child(2) { 
        order: 2; /* Sidebar nach unten */
    }

    .ad-main-content {
        order: 1;
    }

    .hero-wrapper {
        height: 350px; /* Kleinere Höhe auf Handy */
        border-radius: 0; /* Full-bleed Look auf Handy */
        margin-left: -1.5rem; /* Gleicht Container Padding aus */
        margin-right: -1.5rem;
        width: calc(100% + 3rem);
        border-left: none;
        border-right: none;
    }

    .gallery-scroll {
        max-width: 100%;
        padding-bottom: 10px;
    }

    .ad-body-card {
        padding: 1.5rem !important;
        margin-top: -1rem; /* Zieht Content leicht unters Bild */
        border-radius: 20px 20px 18px 18px;
    }

    .report-fab {
        width: 50px; height: 50px; bottom: 1.5rem; right: 1.5rem;
    }

    h1 { font-size: 1.5rem !important; }
}

@media (max-width: 480px) {
    .share-btn-grid {
        grid-template-columns: 1fr; /* Buttons untereinander auf ganz kleinen Handys */
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* Container-Struktur */
.ad-grid { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; align-items: start; }
.ad-main-content { min-width: 0; }
.ad-body-card { padding: 2.5rem; }

/* Ad Info Styles */
.ad-title-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; flex-wrap: wrap; gap: 10px; }
.ad-title { margin: 0; line-height: 1.2; font-size: 2rem; }
.ad-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 1.5rem; }
.ad-price { font-size: 2.2rem; font-weight: 800; color: var(--accent); }
.ad-price-type { color: #64748b; font-weight: 600; }
.ad-meta-row { display: flex; gap: 2rem; margin-bottom: 2rem; color: #64748b; font-size: 0.9rem; flex-wrap: wrap; }
.ad-description-text { line-height: 1.8; color: #334155; white-space: pre-wrap; margin-top: 2rem; font-size: 1.05rem; }
.ad-legal-box { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid #f1f5f9; font-size: 0.85rem; color: #94a3b8; }

/* Immo Specs */
.ad-specs-grid { margin-top: 1.5rem; padding: 1.5rem; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5rem; }
.spec-label { color: #64748b; font-weight: 700; text-transform: uppercase; font-size: 0.7rem; }
.spec-val { font-weight: 600; }
.nk-list { list-style: none; padding: 0; margin: 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Sidebar & Map */
.sidebar-card, .safety-card { padding: 1.5rem; margin-bottom: 1.5rem; }
.share-btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.share-btn { font-size: 0.9rem; justify-content: center; }
.map-card { padding: 0; height: 250px; overflow: hidden; }
#detail-map { width: 100%; height: 100%; }
.safety-list { padding-left: 1.2rem; font-size: 0.85rem; color: #475569; line-height: 1.6; margin: 0; }

/* Mobile Breakpoints */
@media (max-width: 1024px) {
    .ad-grid { grid-template-columns: 1fr; gap: 2rem; }
    .ad-main-content { order: 1; }
    .sticky-desktop { order: 2; position: static !important; }
    .hero-wrapper { height: 350px; border-radius: 0; margin-left: -1.5rem; margin-right: -1.5rem; width: calc(100% + 3rem); }
}