/* =========================================
   REGIO.PHOTOGRAPHY - MASTER STYLESHEET (GLOBAL)
   ========================================= */

:root {
    --accent: #d63031;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-light: #f8f9fa;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body, html {
    margin: 0 !important; padding: 0 !important; width: 100vw !important; height: 100vh !important;
    font-family: var(--font-stack); color: var(--text-dark); overflow: hidden !important; 
}

#map { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; z-index: 1 !important; }


/* --- NAVIGATION --- */
.navbar {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    padding: 10px 20px; border-radius: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex; align-items: center; gap: 30px; z-index: 1000; border: 1px solid #f0f0f0; 
    width: max-content; max-width: 95vw; 
}

.nav-logo { margin: 0 !important; padding: 0 !important; display: flex; align-items: center; }
.nav-logo a { font-weight: 900 !important; font-size: 22px !important; letter-spacing: 1.5px; color: var(--text-dark); text-decoration: none; line-height: 1 !important; transition: opacity 0.2s ease; }
.nav-logo a:hover { opacity: 0.7; }

.nav-links { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; justify-content: center; }
.nav-links a { text-decoration: none; color: var(--text-light); font-size: 13px; font-weight: 600; transition: 0.2s; white-space: nowrap; }
.nav-links a:hover { color: var(--accent); }

.mode-toggle { display: flex; background: #f1f2f6; border-radius: 20px; padding: 3px; flex-wrap: wrap; justify-content: center; }
.toggle-btn { background: transparent; border: none; padding: 6px 15px; border-radius: 18px; font-size: 13px; font-weight: 700; color: var(--text-light); cursor: pointer; transition: 0.2s; white-space: nowrap; }
.toggle-btn.active { background: #ffffff; color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }


/* --- GLOBALE UI ELEMENTE --- */
.ui-container { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 1000; }

.ctrl-btn { 
    background: #ffffff; border: 1px solid #e1e1e1; padding: 12px 24px; border-radius: 30px; 
    font-family: inherit; font-size: 14px; font-weight: 700; color: var(--text-dark); cursor: pointer; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: transform 0.2s ease, box-shadow 0.2s ease; 
    display: flex; align-items: center; gap: 8px; 
}
.ctrl-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }

/* Reset Button (wird in mehreren Tabs verwendet) */
.action-reset-btn { 
    width: 100%; padding: 10px; border: 1px solid #ddd; background: #fff; 
    border-radius: 12px; cursor: pointer; font-weight: bold; color: var(--accent); 
    transition: background 0.2s, border-color 0.2s; margin-top: 10px; font-size: 13px; 
}
.action-reset-btn:hover { background: #f1f2f6; border-color: #ccc; }


/* --- MODAL & LOADER --- */
#modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
    background: rgba(0,0,0,0.4); z-index: 9999; display: none; 
    align-items: center; justify-content: center; 
}
.modal-box { background: #fff; padding: 25px; border-radius: 20px; width: 300px; text-align: center; }
.modal-btn { margin-top: 15px; background: var(--text-dark); color: #fff; border: none; padding: 10px; border-radius: 20px; width: 100%; font-weight: bold; cursor: pointer;}

#loader { 
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); 
    background: #fff; padding: 20px 30px; border-radius: 20px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); z-index: 2000; 
    display: none; flex-direction: column; align-items: center; gap: 15px; font-weight: 700; 
}
.spinner { width: 30px; height: 30px; border: 4px solid #f3f3f3; border-top: 4px solid var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Elevation Tooltip (wird global auf der Karte genutzt) */
.elevation-tooltip { 
    background: rgba(45, 52, 54, 0.95); color: #fff; border: none; border-radius: 6px; 
    font-size: 11px; font-weight: 700; padding: 5px 10px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); font-family: var(--font-stack); 
}
.elevation-tooltip.leaflet-tooltip-top:before { border-top-color: rgba(45, 52, 54, 0.95); }


/* --- STATIC PAGES (About/Legal) --- */
.page-scroll-container { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow-y: auto; background: #e9ecef; z-index: 500; padding: 100px 20px 60px 20px; }
.text-card { max-width: 800px; margin: 0 auto; background: #fff; padding: 50px; border-radius: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.05); line-height: 1.7; }
.text-card h1 { font-weight: 900; font-size: 32px; margin-bottom: 25px; color: var(--text-dark); letter-spacing: -0.5px; }
.text-card h2 { font-weight: 800; font-size: 16px; margin-top: 40px; margin-bottom: 15px; color: var(--accent); text-transform: uppercase; letter-spacing: 1px;}


/* --- LEAFLET OVERRIDES (Global Map Controls) --- */
.leaflet-control-layers { 
    border-radius: 15px !important; border: 1px solid #e1e1e1 !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important; font-family: var(--font-stack) !important; overflow: hidden; 
}
.leaflet-control-layers-toggle { width: 44px !important; height: 44px !important; }
.leaflet-control-layers-expanded { 
    padding: 10px 15px !important; background: rgba(255, 255, 255, 0.95) !important; 
    backdrop-filter: blur(10px) !important; font-size: 13px !important; font-weight: 600 !important; color: var(--text-dark) !important; 
}

/* Zoom-Buttons Styling */
.leaflet-control-zoom {
    border: none !important; box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    border-radius: 12px !important; overflow: hidden;
    margin-top: 10px !important; margin-left: 10px !important;
}
.leaflet-control-zoom-in, .leaflet-control-zoom-out {
    background: rgba(255, 255, 255, 0.95) !important; color: #2d3436 !important;
    width: 36px !important; height: 36px !important; line-height: 36px !important;
    font-size: 18px !important; font-weight: bold !important;
    border-bottom: 1px solid #eee !important; transition: background 0.2s;
}
.leaflet-control-zoom-in:hover, .leaflet-control-zoom-out:hover {
    background: #ffffff !important; color: var(--accent) !important;
}
.leaflet-control-zoom-out { border-bottom: none !important; }


/* --- FORUM STYLES --- */
.forum-thread-card {
    background: #fff; border: 1px solid #e1e1e1; padding: 15px; border-radius: 12px;
    margin-bottom: 12px; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.forum-thread-card:hover {
    border-color: #00b894; box-shadow: 0 4px 12px rgba(0, 184, 148, 0.1); transform: translateY(-2px);
}
.forum-post {
    background: #f8f9fa; border: 1px solid #eee; padding: 15px; border-radius: 12px; margin-bottom: 15px;
}
.forum-post-header {
    display: flex; justify-content: space-between; font-size: 11px; color: var(--text-light);
    margin-bottom: 8px; border-bottom: 1px solid #eee; padding-bottom: 5px;
}
.forum-post-content {
    font-size: 14px; color: var(--text-dark); white-space: pre-wrap; line-height: 1.5;
}


/* --- MOBILE RESPONSIVE --- */
@media (max-width: 600px) {
    .navbar { width: 90%; max-width: none; top: 10px; padding: 10px; flex-direction: column; gap: 10px; border-radius: 20px; }
    .nav-links { gap: 10px 15px; }
    
    #dashboard-container, #motiv-info-container { 
        top: auto !important; bottom: 20px !important; right: 50% !important; 
        transform: translateX(50%) !important; width: 95% !important; max-width: 400px !important; 
    }
    .leaflet-top { top: 140px !important; }
    .ui-container { bottom: auto !important; top: 200px !important; }
}

/* Responsive Bilder im Forum & Editor */
.ql-editor img, .forum-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}