/* Regionen-Seite Styles */
.regionen-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 30px;
}

@media (min-width: 992px) {
    .regionen-container {
        grid-template-columns: 1fr 1fr;
    }
}

.intro {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #555;
}

/* Karte Container */
.karte-container {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #eaeaea;
}

.karte-container h2 {
    margin-top: 0;
    color: #0066cc;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 10px;
}

.karte-hinweis {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95em;
    color: #666;
    border-left: 4px solid #0066cc;
}

.svg-karte {
    width: 100%;
    height: 500px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.karte-ladehinweis {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #eaeaea;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* SVG Region Styles */
.region-path {
    fill: #e9ecef;
    fill-opacity: 0.4;
    stroke: #fff;
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-path:hover {
    fill-opacity: 0.7;
    stroke-width: 3;
    stroke: #0066cc;
}

.region-path.highlighted {
    fill-opacity: 0.9;
    stroke-width: 4;
    stroke: #ff6b6b;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.2));
}

/* Region Labels */
.region-label {
    font-family: Arial, sans-serif;
    text-shadow: 1px 1px 2px white, -1px -1px 2px white, 1px -1px 2px white, -1px 1px 2px white;
    pointer-events: none;
}

/* Legende */
.karte-legende {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.legende-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.legende-farbe {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
}

/* Regionen Liste */
.regionen-liste {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #eaeaea;
}

.regionen-liste h2 {
    margin-top: 0;
    color: #0066cc;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 10px;
}

.filter-optionen {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.filter-btn.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* Regionen Grid */
.regionen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.regionen-karte {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
    cursor: pointer;
}

.regionen-karte:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #0066cc;
}

.regionen-header {
    padding: 15px;
    border-bottom: 1px solid #eaeaea;
}

.regionen-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
    color: #333;
}

.regionen-typ {
    display: inline-block;
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    color: #666;
    font-weight: 600;
}

.regionen-body {
    padding: 15px;
}

.regionen-beschreibung {
    margin: 0 0 15px 0;
    font-size: 0.95em;
    line-height: 1.5;
    color: #555;
    height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.regionen-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.stat {
    flex: 1;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8em;
    color: #888;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.3em;
    font-weight: 700;
    color: #333;
}

.regionen-link {
    display: block;
    text-align: center;
    padding: 10px;
    background: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}

.regionen-link:hover {
    background: #0052a3;
}

/* Tooltip */
.region-tooltip {
    position: absolute;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border: 1px solid #ddd;
    z-index: 1000;
    max-width: 300px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.region-tooltip h3 {
    margin: 0 0 8px 0;
    color: #0066cc;
    font-size: 1.1em;
}

.region-tooltip p {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    line-height: 1.4;
    color: #555;
}

.tooltip-stats {
    display: flex;
    gap: 10px;
    font-size: 0.85em;
    color: #666;
}

.tooltip-stats span {
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .regionen-grid {
        grid-template-columns: 1fr;
    }
    
    .svg-karte {
        height: 400px;
    }
    
    .filter-optionen {
        justify-content: center;
    }
}