:root {
    --bg-color: #0f172a;
    --text-main: #e2e8f0;
    --accent: #06b6d4; /* Cyan futuristic */
    --accent-glow: rgba(6, 182, 212, 0.5);
    --glass-bg: rgba(15, 23, 42, 0.6);
}

body {
    margin: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color); color: var(--text-main); scroll-behavior: smooth;
}

/* Glassmorphism Navbar */
nav {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: var(--glass-bg); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: center; padding: 15px 0;
}
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; }
nav a { color: #fff; text-decoration: none; font-weight: 500; transition: 0.3s; padding: 10px 15px; border-radius: 8px;}
nav a:hover { background: var(--accent); box-shadow: 0 0 15px var(--accent-glow); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-content {
    display: none; position: absolute; background: var(--glass-bg); backdrop-filter: blur(12px);
    min-width: 200px; box-shadow: 0px 8px 16px rgba(0,0,0,0.5); top: 100%; left: 0; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a { display: block; padding: 12px 16px; }

/* Fixed Header */
header {
    height: 70vh; background: url('assets/header-bg.jpg') no-repeat center center fixed;
    background-size: cover; display: flex; align-items: center; justify-content: center;
    position: relative;
}
header::after { /* Overlay gelap agar teks terbaca */
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}
header h1 { position: relative; z-index: 1; font-size: 3rem; text-shadow: 0 0 20px var(--accent-glow); }

/* Container & Cards */
.container { max-width: 1200px; margin: 50px auto; padding: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px; overflow: hidden; transition: 0.4s ease-in-out;
    cursor: pointer;
}
.card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px var(--accent-glow); border-color: var(--accent); }
/* Aturan Diperbarui untuk Menghindari Gambar Terpotong */
.card img {
    width: 100%;
    height: auto; /* Gambar akan menyesuaikan tinggi aslinya secara utuh */
    max-height: 400px; /* Batasi tinggi maksimum agar card tidak terlalu tinggi */
    object-fit: contain; /* Memastikan SELURUH gambar pas di dalam card, dengan padding jika perlu */
    display: block; /* Menghilangkan spasi kosong di bawah gambar */
    margin: 0 auto; /* Tengah-kan gambar di dalam card */
}

/* Meningkatkan Ukuran Teks agar Lebih Jelas */
.card-content {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05); /* Sedikit pemisah visual */
}

.card-content p {
    margin: 0;
    font-size: 1.1rem; /* Ukuran font sedikit lebih besar (sebelumnya default p) */
    font-weight: 500; /* Sedikit lebih tebal */
    color: var(--text-main);
    line-height: 1.4; /* Jarak antar baris yang lebih baik */
}

/* Tabel & Iframe */
table { width: 100%; border-collapse: collapse; margin-top: 20px; background: rgba(255,255,255,0.05); }
th, td { padding: 15px; border: 1px solid rgba(255,255,255,0.1); text-align: left; }
th { background: rgba(6, 182, 212, 0.2); }
iframe { width: 100%; height: 600px; border: none; border-radius: 10px; margin-top: 20px;}

footer { text-align: center; padding: 30px; background: #000; border-top: 1px solid var(--accent); margin-top: 50px;}

/* Layout Vertikal (Ke Bawah) untuk Beranda */
.stacked-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.card-full {
    background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px; 
    overflow: hidden; 
    transition: 0.4s ease-in-out;
    cursor: pointer;
}

.card-full:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px var(--accent-glow); 
    border-color: var(--accent); 
}

.card-full img { 
    width: 100%; 
    height: auto; /* Membuat gambar tampil full sesuai proporsi aslinya */
    display: block; 
}

/* Gaya untuk Halaman Perangkat Ajar (Accordion) */
.accordion-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.accordion-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.accordion-item summary {
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.8);
    transition: 0.3s;
    list-style: none; /* Hilangkan panah default */
    position: relative;
}

/* Panah custom */
.accordion-item summary::after {
    content: '▼';
    position: absolute;
    right: 20px;
    color: var(--accent);
    transition: 0.3s;
}

.accordion-item[open] summary::after {
    transform: rotate(180deg);
}

.accordion-item summary:hover {
    background: rgba(6, 182, 212, 0.2);
}

.accordion-content {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guru-link {
    display: inline-block;
    padding: 10px 15px;
    background: rgba(255,255,255,0.05);
    border-left: 4px solid var(--accent);
    color: var(--text-main);
    text-decoration: none;
    border-radius: 0 5px 5px 0;
    transition: 0.3s;
}

.guru-link:hover {
    background: rgba(6, 182, 212, 0.1);
    transform: translateX(5px);
    color: #fff;
}


/* Gaya Multi-Level / Nested Dropdown */
.nested-dropdown {
    position: relative;
}

.nested-dropdown-content {
    display: none;
    position: absolute;
    left: 100%; /* Membuka submenu ke arah kanan */
    top: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    min-width: 220px;
    box-shadow: 8px 8px 16px rgba(0,0,0,0.6);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Tampilkan submenu saat menu utama di-hover */
.nested-dropdown:hover .nested-dropdown-content {
    display: block;
}

/* Gaya List Link di Halaman Assessment */
.assessment-links-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.assessment-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease-in-out;
}

.assessment-button:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--accent-glow);
}