/* Custom CSS for SIPEDAK Frontend */

:root {
    --blue-dark: #173270;
    --blue-soft: #2f58b5;
    --pink-main: #ef3f74;
    --bg-soft: #f5f7fb;
}

body {
    background: var(--bg-soft);
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* Mobile-first safe area for Bottom Navigation Bar */
@media (max-width: 767px) {
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 10px));
    }
}

.main-layout {
    min-height: 100vh;
}

.sidebar-link {
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: #fdf2f8;
    color: var(--pink-main);
}

.sidebar-link.active {
    background: #fdf2f8;
    color: var(--pink-main);
    border: 1px solid #fbcfe8;
}

.hero-banner {
    background: radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.2), transparent 45%), linear-gradient(125deg, #1b3678, #2a4fa5 58%, #385cc0);
    border-bottom-left-radius: 34px;
    border-bottom-right-radius: 34px;
    padding: 2.8rem 0 5rem;
    color: #fff;
}

.hero-chip {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.33);
    backdrop-filter: blur(8px);
}

.filter-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 20px 45px rgba(16, 34, 79, 0.14);
    border: 1px solid #e5eaf3;
}

.form-label {
    color: #4b5563;
    font-weight: 600;
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
    display: block;
}

.form-control {
    width: 100%;
    border: 1px solid #d9deea;
    border-radius: 12px;
    padding: 0.62rem 0.8rem;
    font-size: 0.88rem;
    color: #1f2937;
    background: #fbfcff;
}

.form-control:focus {
    outline: none;
    border-color: #ea4e86;
    box-shadow: 0 0 0 3px rgba(239, 63, 116, 0.14);
    background: #fff;
}

.btn-main {
    background: linear-gradient(135deg, #ec3f73, #dd2e66);
    color: #fff;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.62rem 1rem;
    border: 0;
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: #fff;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.62rem 1rem;
    border: 0;
}

.about-card,
.stats-card {
    border: 1px solid #e5eaf3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.population-chart {
    position: relative;
    width: 100%;
}

.population-chart-line {
    height: 320px;
}

.population-chart-donut {
    height: 320px;
}

.note-card {
    transition: all 0.3s;
    break-inside: avoid;
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.masonry-grid {
    column-count: 1;
    column-gap: 1.5rem;
}

@media (max-width: 767px) {
    .hero-banner {
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        padding-top: calc(1.2rem + 56px);
        padding-bottom: 2.5rem;
    }

    .filter-wrap {
        margin-top: -1.5rem;
    }

    .population-insight {
        overflow: hidden;
    }

    .population-chart-line {
        height: 260px;
    }

    .population-chart-donut {
        height: 280px;
    }
}

@media (min-width: 768px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .masonry-grid {
        column-count: 3;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}
