@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Playfair+Display:ital,wght@0,400;1,400&display=swap");

:root {
    --blue: #1a56db;
    --blue-dark: #1341b0;
    --blue-light: #e8f0fe;
    --blue-soft: #f0f5ff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg: #f8fafc;

    --biru: #035f9c;
    --biru-dark: #00375b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--text);
    background: #f8fafc;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6,
.hero-title,
.section-title,
.info-title,
.chart-card-title,
.cat-name {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
}

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
    margin-top: 0;
    padding: 100px 80px 80px; /* background-image: url("/images/hero-gradient.png"); */
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #f8fafc; /* fallback */
    min-height: 620px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
}

.hero::before {
    content: "";
    position: absolute;
    left: -150px;
    top: -150px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.05) 0%,
        transparent 65%
    );
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -180px;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(147, 197, 253, 0.08) 0%,
        transparent 65%
    );
    pointer-events: none;
}

.hero-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-deco span {
    position: absolute;
    border-radius: 12px;
    opacity: 0.06;
    background: #1a56db;
}

.hero-deco span:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 8%;
    top: 15%;
    transform: rotate(15deg);
}
.hero-deco span:nth-child(2) {
    width: 50px;
    height: 50px;
    left: 12%;
    top: 55%;
    transform: rotate(-10deg);
}
.hero-deco span:nth-child(3) {
    width: 60px;
    height: 60px;
    left: 5%;
    top: 75%;
    transform: rotate(30deg);
}

.hero-content {
    flex: 1 1 400px;
    max-width: 520px;
    z-index: 2;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(26, 86, 219, 0.08);
    border: 1px solid rgba(26, 86, 219, 0.15);
    border-radius: 40px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--biru);
    margin-bottom: 28px;
    font-family: "Plus Jakarta Sans", sans-serif;
}

/* Font "Data Statistik" → hitam */
.hero-title {
    font-family: "Montserrat", sans-serif;

    font-size: 54px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: 2px;
    color: var(--biru);
}

/* Font "Kabupaten Kutai Timur" → biru tua */
.hero-title span {
    font-family: "Literature", serif;

    color: var(--biru);
    font-size: 46px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 2px;
}

.hero-desc {
    font-size: 16px;
    color: #475569;
    line-height: 1.7;
    max-width: 440px;
    margin-bottom: 36px;
    font-family: "Plus Jakarta Sans", sans-serif;

    text-align: justify;
    text-justify: inter-word;
}

.hero-btns {
    display: flex;
    gap: 16px;
    align-items: center;
}

.hero-chart {
    flex: 1 1 380px;
    max-width: 700px;
    background: #fff;
    border-radius: 28px;
    border: 1px solid rgba(26, 86, 219, 0.1);
    padding: 28px;
    box-shadow: 0 20px 40px rgba(26, 86, 219, 0.12);
    z-index: 2;
}

.hero-chart-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    font-family: "Montserrat", sans-serif;
}

.hero-chart-sub {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 20px;
    font-family: "Plus Jakarta Sans", sans-serif;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--biru);
    color: #fff;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.2s;
    box-shadow: 0 8px 24px rgba(26, 86, 219, 0.3);
    border: none;
    cursor: pointer;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.btn-primary:hover {
    background: var(--biru);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(26, 86, 219, 0.4);
    color: #fff;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.8);
    color: #1e293b;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 15px;
    border: 1.5px solid #e2e8f0;
    transition: all 0.2s;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.btn-secondary:hover {
    background: #fff;
    border-color: var(--biru);
    color: var(--biru);
    transform: translateY(-2px);
}

/* ── SEARCH ────────────────────────────────────────────────── */
.search-section {
    padding: 32px 80px 0;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 14px 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s;
    max-width: 800px;
    margin: 0 auto;
}

.search-bar:focus-within {
    border-color: var(--blue);
    box-shadow: 0 4px 20px rgba(26, 86, 219, 0.1);
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--text);
    background: transparent;
}

.search-bar input::placeholder {
    color: #94a3b8;
}
.search-bar i {
    font-size: 22px;
    color: var(--muted);
}

/* ── CATEGORIES ────────────────────────────────────────────── */
.categories {
    padding: 40px 80px;
}

.section-title {
    text-align: center;
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 40px;
    letter-spacing: -1px;
}

.cat-hint {
    text-align: center;
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 28px;
    font-weight: 500;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    max-width: 1000px;
    margin: 0 auto;
}

.cat-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text);
}

.cat-card:hover,
.cat-card.active {
    border-color: var(--biru);
    background: var(--blue-soft);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(26, 86, 219, 0.15);
}

.cat-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
    transition: all 0.2s;
}

.cat-card:hover .cat-icon,
.cat-card.active .cat-icon {
    background: #fff;
    transform: scale(1.05);
}

.cat-name {
    font-size: 15px;
    font-weight: 400;
    color: var(--biru);
    font-family: "Plus Jakarta Sans", sans-serif;
}

/* ── DATA SECTION ──────────────────────────────────────────── */
.data-section {
    padding: 60px 80px;
    background: var(--bg);
}

.title-main {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 42px;
    /* color: #1e3a8a; */
    /* color: #1f6d8cb1; */
    color: #035f9c;

    letter-spacing: 1px;
}

.title-accent {
    font-family: "Literature", serif;
    font-style: italic;
    font-weight: 400;
    font-size: 36px;
    /* color: #1f6d8cb1; */
    color: #035f9c;

    /* color: #1e3a8a; */
}

@media (max-width: 768px) {
    .title-main {
        font-size: 28px;
        text-align: center;
    }

    .title-accent {
        font-size: 24px;
        text-align: center;
    }
}

.charts-wrapper {
    overflow: hidden;
}

.charts-track {
    display: flex;
    gap: 24px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Khusus chart di HERO dibuat lebih kecil */
.hero-chart .chart-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 18px; /* lebih kecil dari 24px */
    padding: 16px; /* lebih kecil dari 24px */
    min-width: 260px; /* lebih kecil dari 340px */
    flex-shrink: 0;
    cursor: default;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

/* Judul card hero */
.hero-chart .chart-card-title {
    font-size: 13px;
    margin-bottom: 2px;
}

/* Subjudul */
.hero-chart .chart-card-sub {
    font-size: 11px;
    margin-bottom: 10px;
}

/* Area chart */
.hero-chart .chart-canvas-wrap {
    height: 180px;
}

.chart-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    min-width: 340px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.chart-card:hover {
    border-color: var(--blue);
    box-shadow: 0 8px 24px rgba(26, 86, 219, 0.12);
    transform: translateY(-2px);
}

.chart-card-title {
    font-size: 14px;
    font-weight: 200;
    color: var(--text);
    margin-bottom: 4px;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.chart-card-sub {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 16px;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.chart-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 36px;
}

.nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 18px;
}

.nav-btn:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    transform: scale(1.05);
}

.dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.dot.active {
    background: var(--blue);
    width: 28px;
    border-radius: 20px;
}

/* ── INFO SECTION ──────────────────────────────────────────── */
.info-section {
    padding: 60px 80px 80px;
}

.info-title {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.info-sub {
    text-align: center;
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 48px;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.info-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.2s;
}

.info-card:hover {
    border-color: var(--blue);
    box-shadow: 0 8px 28px rgba(26, 86, 219, 0.12);
    transform: translateY(-2px);
}

.info-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 12px;
    font-family: "Playfair Display", serif;
}

.info-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.info-card.highlight {
    background: var(--blue-soft);
    border-color: var(--blue);
    grid-column: span 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.info-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .hero,
    .search-section,
    .categories,
    .data-section,
    .info-section {
        padding-left: 40px;
        padding-right: 40px;
    }
    .hero {
        padding-top: 120px;
        padding-bottom: 60px;
    }
    .hero-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
    }
    .hero-content {
        max-width: 680px;
        flex: 1 1 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-tag {
        align-self: center;
    }
    .hero-title,
    .hero-title span {
        text-align: center;
    }
    .hero-desc {
        max-width: 600px;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-btns {
        justify-content: center;
    }
    .hero-chart {
        width: 100%;
        max-width: 680px;
        flex: 1 1 100%;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .hero,
    .search-section,
    .categories,
    .data-section,
    .info-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    .hero-title {
        font-size: 40px;
    }
    .hero-title span {
        font-size: 34px;
    }
    .hero-chart {
        padding: 20px;
    }
    .cat-grid {
        grid-template-columns: 1fr 1fr;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .info-card.highlight {
        grid-column: span 1;
        flex-direction: column;
    }
}

/* ── SECTION WRAPPER ──────────────────────────── */
.data-section {
    padding: 80px 0 40px;
    text-align: center;
    background: #ffffff;
    overflow: hidden;
}

.btn-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    background: var(--blue-soft);
    color: var(--biru);
    border: none;
    padding: 8px 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-family: "Plus Jakarta Sans", sans-serif;
}
.btn-search:hover {
    background: var(--biru-dark);
    color: #fff;
}

/* ── SECTION HEADER ───────────────────────────── */
.section-header {
    max-width: 1200px;
    margin: 0 auto 48px;
    padding: 0 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 24px;
    text-align: center;
}

.section-header h2 {
    text-align: center;
}

.section-header .btn-search {
    margin-top: 0;
}

/* ── CAROUSEL VIEWPORT ────────────────────────── */
.charts-slider {
    position: relative;
    width: 100%;
    overflow: visible; /* kiri kanan overflow kelihatan */
}

.charts-viewport {
    overflow: hidden;
    width: 100%;
}

/* Track: kartu-kartu berada di sini */
.charts-track {
    display: flex;
    gap: 24px;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    /* padding kiri/kanan agar kartu aktif pertama & terakhir
       selalu tampil tepat di tengah viewport */
    padding: 20px calc((100vw - 640px) / 2) 22px;
    will-change: transform;
}

/* ── CHART CARD ───────────────────────────────── */
.chart-card {
    flex: 0 0 640px; /* lebar tetap besar */
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 28px 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition:
        transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.45s ease;

    /* State default: non-active (sedikit mengecil & blur) */
    transform: scale(0.88);
    opacity: 0.55;
    filter: blur(0.5px);
    cursor: pointer;
}

/* Kartu aktif (tengah) */
.chart-card.is-active {
    transform: scale(1);
    opacity: 1;
    filter: none;
    box-shadow:
        0 6px 20px rgba(26, 86, 219, 0.08),
        0 1px 6px rgba(0, 0, 0, 0.05);
    cursor: default;
}

/* ── CARD HEADER ─────────────────────────────── */
.chart-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.chart-card-title {
    /* font-family: "Montserrat", sans-serif; */

    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* .chart-card-period-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e40af;
    background: linear-gradient(90deg, #eff6ff, #ffffff);
    padding: 6px 12px;
    border-radius: 10px;
    width: fit-content;
} */

.chart-card-period-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--biru-dark);
}

.badge-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
/* Badge indikator (sub-label) */
.chart-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    color: var(--biru-dark);
    font-size: 10.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
}

.chart-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── CARD META ───────────────────────────────── */
.chart-card-sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 11.5px;
    color: #94a3b8;
}
.chart-card-sub span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.chart-card-sub i {
    font-size: 13px;
    color: #cbd5e1;
}

/* ── LEGEND ──────────────────────────────────── */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}

.chart-legend:empty {
    display: none;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #475569;
    font-weight: 500;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── CHART CANVAS AREA ───────────────────────── */
.chart-canvas-wrap {
    position: relative;
    height: 220px;
    margin-top: 4px;
}

/* ── NAV BAR ─────────────────────────────────── */
.chart-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 8px;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-btn:hover {
    background: var(--biru);
    border-color: var(--biru);
    color: #fff;
    box-shadow: 0 4px 16px rgba(26, 86, 219, 0.28);
}

/* Dots */
.dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

.chart-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.chart-dot.active {
    background: var(--biru);
    width: 24px;
    border-radius: 4px;
}

/* ── NO DATA ─────────────────────────────────── */
.chart-empty-msg {
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
    padding: 60px 0;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 1024px) {
    .chart-card {
        flex: 0 0 520px;
    }
    .section-header {
        padding: 0 32px;
    }
}

@media (max-width: 768px) {
    .data-section {
        padding: 60px 0 80px;
    }
    .section-header {
        padding: 0 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    .chart-card {
        flex: 0 0 calc(100vw - 48px);
    }
    .chart-card.is-active {
        transform: scale(1);
    }
    .chart-card {
        transform: scale(0.92);
    }
    .chart-canvas-wrap {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .chart-card {
        flex: 0 0 calc(100vw - 40px);
        padding: 20px;
    }
    .chart-canvas-wrap {
        height: 160px;
    }
}
