.content {
    background-color: #ffffff;
}
.content-container {
    padding: 10px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: 940px;            
    max-height: 1000px;      
}
.judul {
    text-align: center;
    padding: 15px;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 700;
    color: #263238;
    border-bottom: 2px solid #e0e0e0;
}


.grid-container {
    display: grid;
    grid-template-columns: 2fr 1fr; /* kiri: 2 bagian, kanan: 1 bagian */
    gap: 24px;
}

/* Bagian kiri tetap */
.left-container {
    display: grid;
    grid-template-rows: auto 1fr; /* sensor + grafik */
    gap: 24px;
}

/* Bagian kanan: 2 bagian atas-bawah */
.right-container {
    display: grid;
    grid-template-rows: 1fr 1fr; /* atas dan bawah */
    gap: 24px;
    width: 100%;
    margin-left: auto;
}

/* Grid sensor */
.sensor-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 sensor sejajar */
    gap: 24px;
}

/* Sub Container Style */
.sub1-container,
.sub2-container,
.sub3-container,
.sub4-container,
.sub5-container,
.sub6-container {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}
.sub5-container{
    max-height: 350px;
}

/* Hover effect */
.sub1-container:hover,
.sub2-container:hover,
.sub3-container:hover,
.sub4-container:hover,
.sub5-container:hover,
.sub6-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Judul di dalam sub container */
.sub1-container h3,
.sub2-container h3,
.sub3-container h3,
.sub4-container h3,
.sub5-container h3,
.sub6-container h3 {
    margin-bottom: 15px;
    font-size: 24px;
    color: #37474f;
    text-align: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/* Tempat konten di dalam sub container */
.sub1-container .content,
.sub2-container .content,
.sub3-container .content,
.sub4-container .content,
.sub5-container .content,
.sub6-container .content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    color: #ffffff;
    font-size: 18px;
}

.icon-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px; /* sedikit lebih kecil agar tidak terlalu renggang */
    background-color: white;
    padding: 10px 20px;
    border-radius: 20px;
    width: 100%;
    max-width: 320px;
    height: 150px;
    margin: 0 auto; /* tengah otomatis jika perlu */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon {
    font-size: 60px;
    color: #4a90e2;
}

.value {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.unit {
    font-size: 16px;
    color: #777;
    line-height: 1.2;
}

.data-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.data-group {
    margin-bottom: 10px;
}


.bahaya-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 30px;
    padding: 0 10px;
}

.bahaya-box {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: clamp(14px, 2vw, 18px);
    text-align: center;
    min-width: 80px;
    background-color: #ffffff;
    color: #333333;
    border: 2px solid #dddddd;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Aktif (terdeteksi) */
.bahaya-box.bahaya-aktif-normal {
    background-color: #1abc9c;
    color: white;
    border-color: #1abc9c;
}

.bahaya-box.bahaya-aktif-siaga {
    background-color: #f39c12;
    color: white;
    border-color: #f39c12;
}

.bahaya-box.bahaya-aktif-waspada {
    background-color: #d35400;
    color: white;
    border-color: #d35400;
}

.bahaya-box.bahaya-aktif-awas {
    background-color: #c0392b;
    color: white;
    border-color: #c0392b;
}



.trend-list {
    list-style-type: none;
    padding-left: 0;
    margin-top: 10px;
}

.trend-list li {
    margin-bottom: 8px;
    padding: 10px 12px;
    background-color: #ffffff; /* ubah dari #f5f5f5 ke putih */
    border-left: 4px solid #4a90e2;
    border-radius: 6px;
    font-size: 16px;
    color: #37474f;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}
.trend-list li:hover {
    background-color: #e0f0ff;
}

.sub4-container {
    max-height: 491px;
}

.sub4-container .content {
    width: 100%;
    padding: 0; /* opsional, jika tidak ingin padding di dalamnya */
    margin: 0;
    box-sizing: border-box;
}

.sub6-container {
    max-height: 600px;
    overflow-y: auto;
    position: relative;
    top: -65px; /* Geser ke atas */
}

.deskripsi-level{
    margin-top:40px;
}

.deskripsi-level h4 {
    margin-top: 0;
    font-size: 17px;
    margin-bottom: 12px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;
    color: #222;
}

.deskripsi-level p {
    margin: 15px 0;
    font-size: 12px;
    line-height: 1.4;
}

.deskripsi-level p strong {
    display: inline-block;
    width: 80px;
    color: #111;
}
@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: 1fr; /* ubah dari 2 kolom menjadi 1 */
    }

    .left-container,
    .right-container {
        grid-template-rows: unset;
        gap: 16px;
    }

    .sensor-container {
        grid-template-columns: 1fr; /* stack sensor vertikal */
    }

    .sub4-container,
    .sub5-container,
    .sub6-container {
        max-height: unset;
    }

    .sub6-container {
        top: 0; /* hilangkan pergeseran */
    }

    .icon-value {
        flex-direction: column;
        height: auto;
        gap: 12px;
        padding: 16px;
    }

    .icon {
        font-size: 40px;
    }

    .value {
        font-size: 32px;
    }

    .unit {
        font-size: 14px;
        text-align: center;
    }

    canvas {
        width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 600px) {
    .judul h2 {
        font-size: 22px;
    }

    .bahaya-container {
        flex-direction: column;
        align-items: center;
    }

    .bahaya-box {
        width: 100%;
        max-width: 300px;
    }

    .trend-list li {
        font-size: 14px;
    }

    .deskripsi-level p {
        font-size: 11px;
    }

    .grid-container {
        gap: 16px;
    }

    .sub1-container h3,
    .sub2-container h3,
    .sub3-container h3,
    .sub4-container h3,
    .sub5-container h3,
    .sub6-container h3 {
        font-size: 20px;
    }
}

.grafik-box {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding: 10px;
    box-sizing: border-box;
    height: 375px; /* ⬅️ Tambahkan ini agar grafik punya tinggi tetap */
}

canvas {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px) {
    .content-container {
        height: auto !important;      /* ⬅️ override tinggi tetap */
        max-height: unset !important; /* ⬅️ hapus batas tinggi */
        min-height: unset !important;
    }
}


