/* MATERI.CSS - Fokus pada Tipografi dan Keterbacaan */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
body {
    background-image: url('img2.jpeg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: #eee;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    line-height: 1.7;
}
a {
    color: #eee;
    text-decoration: none;
}
header{
    
    width: 1140px;
    max-width: 80%;
    margin: auto;
    height: 50px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 100;
    
}
header a{
    margin-right: 40px;
}
header a:hover{
    color: #f15810;
}
.container-materi {
    width: 850px;
    max-width: 95%;
    margin: 100px auto;
    border-radius: 15px;
    border: 1px solid #444;
    background-image: linear-gradient(rgba(27, 25, 25, 0.8), rgba(0, 0, 0, 0.8)), url('img2.jpeg');
    padding: 50px;
    box-shadow: 0 0 40px rgba(255, 81, 0, 0.05);
}

/* Header Text */
.materi-header-text {
    text-align: center;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 30px;
    margin-bottom: 50px;
}

.materi-header-text h1 {
    font-size: 3rem;
    color: #f15810;
    margin: 10 px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 5px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}
.materi-header-text h2 {
    font-size: 2rem;
    color: #ccc;
    margin: 10px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 5px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

.subtitle {
    color: #888;
    letter-spacing: 2px;
    animation: fadeInUp 1.9s ease-out;
    margin-top: 10px;
}

/* Section Styling */
.section-title {
    color: #f15810;
    font-size: 1.6rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #333;
    margin-left: 20px;
}

.text-box {
    margin-bottom: 50px;
}

.text-box p {
    margin-bottom: 20px;
    color: #ccc;
}

/* Back Button */
.footer-action {
    text-align: center;
    margin-top: 60px;
}

.back-link {
    text-decoration: none;
    color: #fff;
    border: 1px solid #db5517;
    padding: 12px 40px;
    border-radius: 5px;
    transition: 0.4s;
    font-weight: 500;
}

.back-link:hover {
    background: #ff5100;
    box-shadow: 0 0 20px rgba(255, 81, 0, 0.4);
}
.materi-section, .text-box{
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}
.materi-section.show, .text-box.show{
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media screen and (max-width: 678px) {
    .container-materi { padding: 25px; margin-top: 70px; }
    .materi-header-text h1 { font-size: 1.8rem; }
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

nav {
    width: 1140px;
    max-width: 100%;
    margin: auto;
    display: flex;
    justify-content: space-between; /* Mendorong nav-left ke kiri, menu-toggle ke kanan */
    align-items: center;
}

.nav-left {
    display: flex;
    gap: 30px;
}

.nav-left a {
    color: #eee;
    text-decoration: none;
    font-weight: 500;
}

/* Tombol Hamburger di Kanan */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
    z-index: 100;
}

.menu-toggle span {
    width: 20px;
    height: 3px;
    background-color: #fafafa; /* Warna oranye sesuai tema */
    transition: 0.3s;
    border-radius: 2px;
}

/* Sidebar Menu */
/* Sidebar diubah menjadi Dropdown tepat di bawah hamburger */
.sidebar {
    position: absolute;
    top: 25px; /* Jarak dari atas (sesuaikan dengan tinggi header) */
    right: 0;   /* Menempel di sisi kanan */
    width: 46px;
    background-color: #1e1d1d;
    padding: 20px;
    border-radius: 20px; /* Opsional: agar sudutnya membulat */
    
    /* Efek Muncul: Kita gunakan opacity dan transform agar halus */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Saat Hamburger diklik, menu muncul tepat di bawahnya */
.sidebar.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Pastikan nav memiliki position relative agar sidebar menempel padanya */
nav {
    position: relative; 
    width: 1140px;
    max-width: 90%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Rapikan tampilan list di dalam dropdown */
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 15px;
}

.sidebar ul li:last-child {
    margin-bottom: 0;
}

.sidebar ul li a {
    font-size: 0.8rem !important;
    color: #f6f6f6 !important;
    font-weight: 500;
    /* Ukuran teks lebih kecil agar pas di kotak */
}

.sidebar ul li a:hover {
    color: #ff5100 !important;
}
/* Submenu Dropdown */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding-left: 15px;
}

.submenu.open {
    max-height: 200px;
    margin-top: 15px;
}

.submenu li {
    margin-bottom: 10px !important;
}

.submenu li a {
    font-size: 1rem !important;
    color: #ff5100 !important;
}

.arrow-icon {
    font-size: 0.8rem;
    transition: 0.3s;
}

/* Animasi Hamburger jadi X */
.menu-toggle.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }


/* foto peta */
.foto-peta-container {
    margin-top: 15px;
    max-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(72, 69, 69, 0.4);
}
.foto-peta {
    width: 100%;
    display: block;
    filter: grayscale(30%);
    transition: 0.4s;
}
.foto-peta:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}
.caption {
    text-align: center;
    font-size: 0.8rem;
    color: #ccc;
    padding: 8px 0;
    margin: 0;
}

/* foto populasi*/
.foto-populasi-container {
    margin-top: 15px;
    max-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(72, 69, 69, 0.4);
}
.foto-populasi {
    width: 100%;
    display: block;
    filter: grayscale(30%);
    transition: 0.4s;
}
.foto-populasi:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}
.caption {
    text-align: center;
    font-size: 0.8rem;
    color: #ccc;
    padding: 8px 0;
    margin: 0;
}

/* foto intelek */
.foto-intelek-container {
    margin-top: 15px;
    max-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(72, 69, 69, 0.4);
}
.foto-intelek {
    width: 100%;
    display: block;
    filter: grayscale(30%);
    transition: 0.4s;
}
.foto-intelek:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}
.caption {
    text-align: center;
    font-size: 0.8rem;
    color: #ccc;
    padding: 8px 0;
    margin: 0;
}
