:root {
    --primary-color: #fc7a00; /* Coral untuk elemen utama */
    --secondary-color: #ffefd5; /* Peach Puff untuk latar belakang */
    --accent-color: #4682b4; /* Steel Blue untuk aksen */
    --text-color: #333; /* Hitam gelap untuk teks */
    --light-color: #ffffff; /* Putih untuk elemen ringan */
    --pp-purple: #861a54;
    --pp-blue: #054f7d;
    --pp-ltblue: #0081a2;
    --sp-yellow: #9b39c2;
}

* {
    transition: all 0.3s ease; /* Setel transisi untuk semua elemen */
}

html {
    scroll-behavior: smooth;
}

/* General Styles */
body {
    font-family: "Poppins", sans-serif;
    margin: 0;
    padding: 0;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    color: #222;
    border-radius: 0 0 24px 24px;
    padding: 20px 8vw 14px 8vw;
    position: sticky;
    top: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.3s;
}

.h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    margin: 0 0 12px 0;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

nav ul {
    display: flex;
    gap: 32px;
    padding: 0;
    margin: 0;
    list-style: none;
}

nav ul li {
    display: block2;
}

nav ul li a {
    color: #222;
    font-weight: 500;
    font-size: 1.08rem;
    text-decoration: none;
    padding: 6px 0 4px 0;
    border-bottom: 2.5px solid transparent;
    transition:
        border-color 0.22s,
        color 0.22s;
    border-radius: 3px;
}

nav ul li a:hover,
nav ul li a:focus {
    color: #fc7a00;
    border-bottom: 2.5px solid #fc7a00;
    background: rgba(252, 122, 0, 0.08);
}

/* Main Sections */
main {
    max-width: 980px;
    margin: 36px auto 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 100px;
}

/* Section umum */
main section {
    /* background: rgba(255, 255, 255, 0.98); */
    background-color: var(--card-bg);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(70, 130, 180, 0.06);
    padding: 34px 32px 30px 32px;
    margin-bottom: 0;
    transition: box-shadow 0.24s;
    position: relative;
}

/* Heading section */
main section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 0;
    text-align: center;
    color: var(--h2-color);
    letter-spacing: 1px;
    margin-bottom: 25px;
}

/* Paragraf section */
main section p {
    color: var(--text-color);
    font-size: 1.08rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

/* Timeline */
#timeline-embed {
    margin: 22px 0 0 0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(70, 130, 180, 0.09);
    height: 500px;
    transition: all 3s ease;
}

/* Map */
#map-container {
    text-align: center;
    /* background: linear-gradient(101deg, #fbeee6 80%, #e3f1fa 100%); */
    margin: 28px auto 0 auto;
    padding: 34px 10px 30px 10px;
    border-radius: 17px;
    box-shadow: 0 2px 12px rgba(252, 122, 0, 0.07);
    margin-bottom: 40px;
}

#map {
    width: 100%;
    max-width: 800px;
    height: 370px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(70, 130, 180, 0.09);
}

/* Gallery section */
#gallery {
    /* background: linear-gradient(120deg, #fff8f0 60%, #e7f3fe 100%); */
    box-shadow: 0 3px 18px rgba(252, 122, 0, 0.04);
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.gallery-item {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(70, 130, 180, 0.07);
    padding: 10px 10px 16px 10px;
    max-width: 230px;
    flex: 1 1 220px;
    transition:
        box-shadow 0.18s,
        transform 0.18s;
}
.gallery-item p {
    color: #222;
}
.gallery-item:hover {
    box-shadow: 0 8px 32px rgba(252, 122, 0, 0.13);
    transform: translateY(-6px) scale(1.03);
}
.gallery img {
    width: 100%;
    border-radius: 11px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(70, 130, 180, 0.08);
    transition:
        box-shadow 0.16s,
        transform 0.16s;
}
.gallery img:hover {
    box-shadow: 0 8px 32px rgba(70, 130, 180, 0.18);
    transform: scale(1.05);
}

/* Footer */
footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 20px;
}

.footer-container div {
    max-width: 300px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin: 5px 0;
}

.footer-social a {
    font-size: 25px;
    justify-content: space-between;
    padding: 5px;
}

.footer-links a,
.footer-social a {
    color: #ffd700;
    text-decoration: none;
}

.footer-social i {
    filter: grayscale(100%);
}

.social1 i:hover {
    color: magenta;
    filter: grayscale(0%);
    transition: all 0.1s ease-in-out;
    transform: scale(1.5);
}

.social2 i:hover {
    color: white;
    filter: grayscale(0%);
    transition: all 0.1s ease-in-out;
    transform: scale(1.5);
}

.social3 i:hover {
    color: blue;
    filter: grayscale(0%);
    transition: all 0.1s ease-in-out;
    transform: scale(1.5);
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    background-color: #111;
    padding: 15px 10px;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #444;
    background: #111;
    padding: 10px;
}

:root {
    --h2-color: #222;
    --bg-color: #f9f9f9;
    --text-color: #333;
    --card-bg: #ffffff;
    --nav-bg: #222;
    --nav-text: white;
    --hover-color: #d3d3d3;
}

/* Dark Mode */
.dark-mode {
    --h2-color: #fff;
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --nav-bg: #000;
    --nav-text: #ffffff;
}

/* Terapkan Warna */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

header,
footer {
    background-color: var(--nav-bg);
    color: var(--nav-text);
}

nav ul li a {
    color: var(--nav-text);
}

nav ul li a:hover {
    color: var(--hover-color);
}

section {
    background: var(--card-bg);
}

/* From Uiverse.io by anandita-3217 */
.switch {
    /* border: 2px solid rebeccapurple; */
    font-size: 17px;
    position: absolute;
    top: 20px;
    right: 20px;
    display: inline-block;
    width: 3.5em;
    height: 2em;
}
.switch input {
    /* all: unset; */
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    background-color: #2185d6;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
    transition: 0.4s;
    border-radius: 30px;
    box-shadow: 0 0 0 rgba(33, 133, 214, 0);
    transition: all 0.4s ease;
}
.slider:hover {
    box-shadow: 0 0 15px rgba(33, 133, 214, 0.5);
}

.slider::before {
    position: absolute;
    content: "";
    height: 1.4em;
    width: 1.4em;
    border-radius: 50%;
    left: 10%;
    bottom: 15%;
    box-shadow: inset 15px -4px 0px 15px #fdf906;
    background-color: #28096b;
    transition: all 0.4s ease;
    transform-origin: center;
}
.slider:hover::before {
    transform: rotate(45deg);
}
.clouds_stars {
    position: absolute;
    content: "";
    border-radius: 50%;
    height: 10px;
    width: 10px;
    left: 70%;
    bottom: 50%;
    background-color: #fff;

    transition: all 0.3s;
    box-shadow:
        -12px 0 0 0 white,
        -6px 0 0 1.6px white,
        0.3px 16px 0 white,
        -6.5px 16px 0 white;
    filter: blur(0.55px);
}
.switch input:checked ~ .clouds_stars {
    transform: translateX(-20px);
    height: 2px;
    width: 2px;
    border-radius: 50%;
    left: 80%;
    top: 15%;
    background-color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    box-shadow:
        -7px 10px 0 #fff,
        8px 15px 0 #fff,
        -17px 1px 0 #fff,
        -20px 10px 0 #fff,
        -7px 23px 0 #fff,
        -15px 25px 0 #fff;
    filter: none;
    animation: twinkle 2s infinite;
}
.switch input:checked + .slider {
    background-color: #28096b !important;
}
.switch input:checked + .slider::before {
    transform: translateX(100%);
    box-shadow: inset 8px -4px 0 0 #fff;
}
.switch input:checked + .slider:hover::before {
    transform: translateX(100%) rotate(-45deg);
}
@keyframes twinkle {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Efek hover */
#dark-mode-toggle:hover {
    transform: scale(1.1);
}

/* Efek saat tombol diklik */
#dark-mode-toggle:active {
    transform: scale(0.9) rotate(30deg);
}

/* Mode gelap */
.dark-mode {
    background: #222;
    color: #fff;
}

body.dark-mode header {
    background-image: linear-gradient(
        to right,
        var(--pp-blue),
        var(--pp-ltblue),
        var(--sp-yellow),
        var(--pp-purple),
        var(--pp-blue)
    );
    background-size: 400% 400%;
    animation: linearGradient 15s ease-in-out infinite;
}

@keyframes linearGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animasi transisi mode gelap */
.dark-mode #dark-mode-toggle {
    background: #333;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

/* Container card */
.card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

/* Desain card */
.card {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 300px;
    transition: transform 0.3s ease;
}

/* Efek hover */
.card:hover {
    transform: scale(1.05);
}

/* Tombol dalam card */
.button-link {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 15px;
    background: #007bff;
    color: var(--nav-text);
    text-decoration: none;
    font-size: 14px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.button-link:hover {
    background: #0056b3;
}

/* Responsive */
@media (max-width: 900px) {
    main {
        max-width: 98vw;
        padding: 0 5vw;
        gap: 20px;
    }
    main section {
        padding: 22px 8vw 18px 8vw;
    }
    #timeline-embeb #map {
        width: 100%;
        height: 400px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    header {
        padding: 19px 5vw 15px 5vw;
        border-radius: 0 0 16px 16px;
        position: relative;
        height:;
    }
    .h1 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    nav ul {
        gap: 14px;
    }
    .switch {
        top: 10px;
        right: 10px;
        transform: scale(0.87);
    }
    .card-container {
        flex-direction: column;
        align-items: center;
        font-size: 14px;
    }
    .card {
        font-size: 14px;
    }
    main {
        padding: 0 2vw;
        gap: 14px;
    }
    main section {
        padding: 14px 4vw 10px 4vw;
        border-radius: 12px;
    }
    .gallery {
        gap: 10px;
    }
    .gallery-item {
        max-width: 98vw;
        padding: 5px 4px 9px 4px;
    }
    .card {
        padding: 13px 8px;
        border-radius: 9px;
    }
    body.dark-mode #gallery {
        background: #1e1e1e;
        color: #fff;
    }
    body.dark-mode .gallery-item {
        box-shadow: 0 3px 18px rgba(252, 122, 0, 0.04);
        background: linear-gradient(101deg, #fbeee6 80%, #e3f1fa 100%);
        color: #222;
    }
}
