/* Map Container Layout */
.neighborhood-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    margin-top: 50px;
}

.map-wrapper {
    flex: 1;
    min-width: 350px;
    max-width: 600px;
    /* Adjust based on map size */
    position: relative;
    padding: 20px;
}

.pledge-wrapper {
    flex: 1;
    min-width: 350px;
    max-width: 500px;
}

/* SVG Map Styles */
.bukgu-map {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

.map-region {
    fill: rgba(255, 255, 255, 0.12);
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 1.5;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    transform-origin: center;
}

.map-region:hover {
    fill: rgba(255, 255, 255, 0.25);
    stroke: rgba(255, 200, 200, 0.6);
    stroke-width: 2;
    transform: scale(1.02);
    z-index: 10;
}

.map-region.active {
    fill: rgba(230, 30, 43, 0.7);
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 2;
    filter: drop-shadow(0 5px 20px rgba(230, 30, 43, 0.5));
    transform: scale(1.03);
    z-index: 20;
}

.region-label {
    pointer-events: none;
    font-size: 16px;
    font-weight: 700;
    fill: rgba(255, 255, 255, 0.9);
    text-anchor: middle;
    transition: all 0.3s ease;
    opacity: 1;
}

.map-region:hover+.region-label {
    fill: #fff;
    font-weight: 800;
}

.map-region.active+.region-label {
    fill: #fff;
    font-weight: 800;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

/* Pledge Details Panel */
.pledge-panel {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.pledge-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.panel-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

.panel-subtitle {
    font-size: 1rem;
    color: #666;
    margin-top: 5px;
}

.panel-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Custom Pledge List in Panel */
.panel-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.panel-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: #444;
    line-height: 1.6;
}

.panel-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    top: 2px;
    color: #e63946;
    font-weight: bold;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 40px 0;
}

/* Tooltip for map (optional) */
.map-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 100;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .neighborhood-container {
        flex-direction: column;
        align-items: center;
    }

    .map-wrapper,
    .pledge-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .pledge-panel {
        padding: 20px;
    }
}