/* GLOBAL STYLE */
body {
    font-family: "Times New Roman", Times, serif;
    font-size: 15pt;
    line-height: 1.8;
    color: #222;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

/* HEADER LIGHT MODE */
header {
    text-align: center;
    padding: 50px 10%;
    background: linear-gradient(to bottom, #ffffff, #f2f2f2);
    border-bottom: 1px solid #ddd;
}

header h1 {
    font-size: 24pt;
    font-weight: bold;
    color: #222;
    margin-bottom: 10px;
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15);
}

header .subtitle {
    font-size: 12pt;
    color: #444;
    max-width: 850px;
    margin: auto;
    margin-top: 8px;
    line-height: 1.5;
}

/* HEADER DARK MODE */
.dark-mode header {
    background: linear-gradient(to bottom, #1b1b1b, #111);
    border-bottom: 1px solid #444;
}

.dark-mode header h1 {
    color: #ffffff;
    text-shadow: 0px 1px 4px rgba(255, 255, 255, 0.15);
}

.dark-mode header .subtitle {
    color: #dcdcdc;
}

/* SECTION */
.section {
    background-color: #ffffff;
    padding: 50px 12%;
    margin: 30px auto;
    border-radius: 8px;
    max-width: 1200px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.08);
}

/* HEADING */
.section h2 {
    text-align: center;
    font-size: 20pt;
    margin-top: 10px;
    margin-bottom: 25px;
    font-weight: bold;
}

.section h3 {
    text-align: left;
    font-size: 14pt;
    margin-top: 30px;
    margin-bottom: 10px;
    font-weight: bold;
}

/* PARAGRAPH */
.section p {
    text-align: justify;
    text-indent: 40px;
    line-height: 1.65;
    margin-bottom: 14px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* GAMBAR */
.img {
    display: block;
    margin: 20px auto;
    max-width: 95%;
    border-radius: 6px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.12);
}

/* SUB-CARD */
.sub-card {
    background: #fafafa;
    padding: 25px 20px;
    border-radius: 8px;
    margin-bottom: 35px;
    border: 1px solid #e5e5e5;
    box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.06);
}

/* Judul dalam sub-card */
.sub-card h3 {
    text-align: center;
    margin-bottom: 15px;
}

/* TABLE WRAPPER */
#tabel-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
}

#tabel-wrapper::-webkit-scrollbar {
    height: 8px;
}

#tabel-wrapper::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 5px;
}

.dark-mode #tabel-wrapper::-webkit-scrollbar-thumb {
    background: #555;
}

/* TABLE INSIDE */
#tabel-distribusi table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    margin: 0 auto;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

#tabel-distribusi table th {
    text-align: center;
    vertical-align: middle;
}

#tabel-distribusi table th {
    background-color: #efefef;
}

/* Zebra rows */
#tabel-distribusi table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* DARK MODE TABLE */
.dark-mode #tabel-distribusi table {
    background: #1e1e1e;
    box-shadow: 0px 2px 12px rgba(255, 255, 255, 0.08);
}

.dark-mode #tabel-distribusi table th {
    background-color: #333;
    color: #fff;
}

.dark-mode #tabel-distribusi table td {
    background-color: #222;
    color: #ddd;
}

.dark-mode #tabel-distribusi table tr:nth-child(even) {
    background-color: #262626;
}

@media (max-width: 768px) {

    #tabel-distribusi table {
        font-size: 8pt;
    }

    #tabel-distribusi table th,
    #tabel-distribusi table td {
        padding: 5px 7px;
        white-space: normal;
    }

    #tabel-wrapper {
        overflow-x: auto;
    }
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    color: #555;
    font-size: 11pt;
}

/* ANIMASI SCROLL HALUS */
.section,
.sub-card,
.img {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeIn 0.7s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark mode toggle button */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #444;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    z-index: 1000;
    transition: 0.3s;
}

.dark-mode-toggle:hover {
    background-color: #333;
}

/* DARK MODE */
.dark-mode {
    background-color: #121212;
    color: #e5e5e5;
}

.dark-mode .section {
    background-color: #1e1e1e;
    box-shadow: 0px 4px 15px rgba(255, 255, 255, 0.08);
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3 {
    color: #ffffff;
}

.dark-mode .sub-card {
    background-color: #2a2a2a;
    border-color: #444;
    box-shadow: 0px 2px 10px rgba(255, 255, 255, 0.08);
}

.dark-mode table th {
    background-color: #333 !important;
    color: #fff;
}

.dark-mode table td {
    background-color: #222;
    color: #ddd;
}

.dark-mode body {
    background-color: #121212;
}

#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 25px;
    font-size: 22px;
    background-color: #444;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    /* default hidden */
    z-index: 999;
    transition: 0.3s;
}

#scrollTopBtn:hover {
    background-color: #222;
}

/* DESKTOP */
@media (min-width: 1024px) {
    .img {
        max-width: 70%;
        margin: 20px auto;
    }
}

/* RESPONSIVE BREAKPOINT */
@media (max-width: 768px) {
    .section {
        padding: 20px 5%;
    }

    header {
        padding: 20px 5%;
    }

    header h1 {
        font-size: 16pt;
    }

    .section h2 {
        font-size: 16pt;
    }

    .section h3 {
        font-size: 13pt;
    }

    .img {
        max-width: 100%;
    }

    #tabel-distribusi table {
        font-size: 10pt;
    }

    .dark-mode-toggle {
        font-size: 12px;
        padding: 8px 10px;
    }

    #scrollTopBtn {
        font-size: 18px;
        padding: 8px 10px;
    }
}

/* RESPONSIVE FOR VERY SMALL SCREEN */
@media (max-width: 480px) {
    header h1 {
        font-size: 14pt;
    }

    .section p {
        font-size: 11pt;
        text-indent: 20px;
    }
}

/* search box */
.search-box {
    width: 60%;
    max-width: 400px;
    padding: 10px 14px;
    font-size: 12pt;
    border: 1px solid #bbb;
    border-radius: 6px;
    display: block;
    margin: 0 auto 20px auto;
}

.dark-mode .search-box {
    background: #222;
    color: #fff;
    border: 1px solid #555;
}

/* IMAGE ZOOM VIEWER */
.image-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: 0.25s ease;
}

.image-zoom-overlay.active {
    visibility: visible;
    opacity: 1;
}

.image-zoom-overlay img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 8px;
    box-shadow: 0px 0px 12px rgba(255, 255, 255, 0.2);
    animation: zoomIn 0.25s ease forwards;
}

@keyframes zoomIn {
    from {
        transform: scale(0.7);
        opacity: 0.5;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Cursor */
.img {
    cursor: zoom-in;
}