/* --- 1. RESET & VARIABLES --- */
:root {
    --text-dark: #1e293b;
    --text-grey: #64748b;
    --primary: #4f46e5;    /* Indigo */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.8);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: #f1f5f9;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden; /* Mencegah scroll samping */
}

/* --- 2. DEKORASI BACKGROUND (Fokus di KANAN Layar) --- */
/* Karena konten di KIRI, hiasan kita taruh di KANAN agar seimbang */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    top: 5%;
    right: -5%; /* Pojok Kanan Atas */
    width: 600px;
    height: 600px;
    background: #c7d2fe; /* Biru Muda */
}

.blob-2 {
    bottom: -10%;
    right: 10%; /* Bawah Tengah Kanan */
    width: 400px;
    height: 400px;
    background: #e9d5ff; /* Ungu Muda */
    animation-delay: 2s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 20px); } /* Gerak ke kiri dikit */
    100% { transform: translate(0, 0); }
}

/* --- 3. LAYOUT CONTAINER (POSISI KIRI) --- */
.app-container {
    width: 100%;
    max-width: 700px; /* Lebar konten tetap rapi */
    
    /* LOGIKA POSISI KIRI */
    margin-left: 8%;  /* Jarak dari sisi kiri layar (Desktop) */
    margin-right: auto; 
    
    padding: 4rem 0;
    position: relative;
    z-index: 1;
}

/* --- 4. HEADER --- */
.main-header {
    text-align: left;
    margin-bottom: 3rem;
    padding-right: 1rem;
}

.pill-badge {
    display: inline-block;
    background: var(--text-dark);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 1.2rem;
    letter-spacing: 0.5px;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    background: -webkit-linear-gradient(45deg, #1e293b, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lecturer-box {
    display: inline-flex;
    flex-direction: column;
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.lecturer-box .label { font-size: 0.75rem; text-transform: uppercase; color: var(--text-grey); font-weight: 700; }
.lecturer-box .value { font-weight: 600; font-size: 1rem; }

.desc {
    color: var(--text-grey);
    font-size: 1.05rem;
    max-width: 500px;
}

/* --- 5. DAFTAR MATERI (GLASS CARDS) --- */
.content-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.card-wrapper {
    /* Efek Kaca */
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow);
}

/* --- UPDATE BAGIAN CARD HEADER (FIX TOMBOL) --- */
.card-header {
    padding: 1.5rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem; /* Jarak aman antara teks dan tombol */
}

.header-left {
    flex: 1; /* Mengambil sisa ruang */
}

.header-left h3 { 
    font-size: 1.1rem; 
    font-weight: 700; 
    margin-bottom: 4px;
    line-height: 1.3;
}
.header-left .date { 
    font-size: 0.85rem; 
    color: var(--text-grey); 
    display: block; 
}

/* --- UPDATE TOMBOL PANAH (FIX BULAT) --- */
.icon-btn {
    /* KUNCI SUPAYA TIDAK PENYOK: */
    flex-shrink: 0; 
    width: 44px;
    height: 44px;
    
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    
    display: flex; 
    align-items: center; 
    justify-content: center;
    
    font-weight: 700; 
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Styling untuk SVG di dalam tombol */
.icon-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}


/* --- KONTEN (HIDDEN) --- */
.card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
    background: rgba(255,255,255,0.4);
}

.body-inner {
    padding: 0 2rem 2rem 2rem;
    color: #334155;
    font-size: 1rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 1.5rem;
}

.body-inner p { margin-bottom: 1rem; }
.body-inner ul { padding-left: 1.2rem; margin-bottom: 1rem; }
.note-box {
    background: linear-gradient(to right, #e0e7ff, rgba(255,255,255,0));
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
    font-weight: 500;
    color: #312e81;
}

/* --- ACTIVE STATE --- */
.card-wrapper.active {
    transform: translateX(10px); /* Geser sedikit ke KANAN saat aktif */
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary);
    z-index: 10;
    box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.2);
}

.card-wrapper.active .icon-btn {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: rotate(180deg); /* Putar tombol 180 derajat */
}

/* Reset rotasi pada SVG agar tidak dobel putar */
.card-wrapper.active .icon-btn svg {
    transform: none;
}

/* --- FOOTER --- */
.glass-footer {
    margin-top: 4rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.5);
    
    font-size: 0.85rem;
    color: var(--text-grey);
}

.dot { color: var(--primary); font-weight: bold; }

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
    .app-container {
        margin: 0 auto; /* Tengah di HP */
        padding: 3rem 1.5rem;
        max-width: 100%;
    }
    
    .page-title { font-size: 2.5rem; }
    
    .card-wrapper.active {
        transform: scale(1.02); /* Zoom dikit di HP */
    }
    
    /* Blob lebih transparan di HP agar teks terbaca */
    .blob { opacity: 0.5; }
    .blob-1 { right: -20%; }
}
