/* =========================================================
   Kondisi Geografis & WebGIS DESTANA Desa Jimbaran
   ========================================================= */

.geo-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.geo-section-heading {
    margin-bottom: 1rem;
}

.geo-kicker {
    display: inline-block;
    margin-bottom: .45rem;
    color: var(--primary);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.admin-map-link {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    background: #eef2f7;
}

.admin-map-image {
    display: block;
    transition: transform .25s ease;
}

.admin-map-link:hover .admin-map-image {
    transform: scale(1.01);
}

.destana-card {
    overflow: visible;
}

.destana-status {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: .42rem .8rem;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
}

.map-help {
    padding: .8rem 1rem;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e3a5f;
    font-size: .86rem;
    line-height: 1.55;
}

#destana-map {
    width: 100%;
    height: 580px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #edf2f7;
    overflow: hidden;
    z-index: 1;
}

#destana-map .leaflet-control-layers {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 3px 16px rgba(0, 0, 0, .15);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

#destana-map .leaflet-popup-content-wrapper,
#destana-map .leaflet-popup-tip {
    box-shadow: 0 4px 18px rgba(0, 0, 0, .16);
}

#destana-map .leaflet-popup-content {
    margin: 14px 16px;
    line-height: 1.55;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: .82rem;
}

.map-popup-title {
    margin-bottom: 5px;
    color: #12372a;
    font-weight: 700;
}

.map-popup-row {
    margin-top: 2px;
}

.map-popup-source {
    display: block;
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: .72rem;
}

.map-legend {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafafa;
}

.legend-title {
    margin-bottom: .7rem;
    font-size: .82rem;
    font-weight: 700;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .6rem 1rem;
    color: #4b5563;
    font-size: .75rem;
}

.legend-grid span {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.legend-box,
.legend-dot,
.legend-line {
    display: inline-block;
    flex: 0 0 auto;
}

.legend-box {
    width: 15px;
    height: 11px;
    border: 1px solid rgba(0,0,0,.35);
    border-radius: 2px;
}

.risk-high {
    background: #d73027;
}

.risk-medium {
    background: #fbbf24;
}

.risk-low {
    background: #66bd63;
}

.threat-landslide {
    background: #7b3294;
}

.threat-wind {
    background: #f46d43;
}

.legend-line {
    width: 20px;
    height: 0;
    border-top: 4px solid #16a34a;
    border-radius: 5px;
}

.legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.legend-dot.tea {
    background: #dc2626;
    border: 2px solid #7f1d1d;
}

.legend-dot.tes {
    background: #f59e0b;
    border: 2px solid #92400e;
}

.destana-disclaimer {
    padding: 1rem 1.1rem;
    border: 1px solid #fde68a;
    border-radius: 10px;
    background: #fffbeb;
    color: #713f12;
    font-size: .82rem;
    line-height: 1.65;
}

.profile-sidebar {
    position: sticky;
    top: 88px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    #destana-map {
        height: 520px;
    }

    .profile-sidebar {
        position: static;
    }

    .legend-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .geo-card {
        padding: 1rem;
    }

    #destana-map {
        height: 470px;
        border-radius: 10px;
    }

    .legend-grid {
        grid-template-columns: 1fr;
    }
}
