/* Variables & Reset */
:root { 
    --primary: #007bff; 
    --dark: #1a202c; 
    --light: #f8fafc; 
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.04);
}

/* 1. Smooth Scroll & Global Fix */
html {
    scroll-behavior: smooth;
}

body { 
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; 
    margin: 0; 
    background: var(--light); 
    color: var(--dark); 
    line-height: 1.7; 
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 25px; }

/* Header & Navigation - Glassmorphism */
header { 
    background: rgba(255, 255, 255, 0.9); 
    backdrop-filter: blur(10px); /* Efek blur kaca */
    border-bottom: 1px solid var(--border-color); 
    padding: 12px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: var(--shadow-soft);
}

header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--dark); text-decoration: none; letter-spacing: -0.5px; }
.logo span { color: var(--primary); }
.menu a { text-decoration: none; color: #4a5568; margin-left: 20px; font-weight: 600; font-size: 0.95rem; transition: 0.2s; }
.menu a:hover { color: var(--primary); }

/* Typography */
h1 { font-size: 2.8rem; font-weight: 800; color: #111; margin-bottom: 25px; line-height: 1.1; letter-spacing: -1px; }

/* 2. Scroll Margin & Heading Style */
h2, h3 { 
    scroll-margin-top: 100px; 
    color: #1a202c;
    font-weight: 700;
}
h2 { font-size: 1.8rem; margin-top: 50px; margin-bottom: 15px; }
h3 { margin-top: 35px; font-size: 1.4rem; }

/* Grid & Cards - Modern Look */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 30px; }
.card { 
    background: var(--white); 
    padding: 22px; 
    border-radius: 12px; 
    box-shadow: var(--shadow-soft); 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    border: 1px solid var(--border-color); 
}
.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 12px 25px rgba(0,0,0,0.08); 
    border-color: var(--primary); 
}
.card a { text-decoration: none; color: var(--primary); font-weight: 600; }

/* 3. Table of Contents (TOC) - PREMIUM & LIGHTWEIGHT */
.toc-box { 
    background: #ffffff; 
    border: 1px solid var(--border-color); 
    border-left: 5px solid var(--primary); /* Aksen warna tebal di kiri */
    border-radius: 14px; 
    margin: 35px 0; 
    padding: 25px;
    display: inline-block;
    min-width: 350px;
    box-shadow: var(--shadow-soft);
}

.toc-box strong { 
    font-size: 1.15rem; 
    color: #1a202c; 
    display: flex;
    align-items: center;
    margin-bottom: 18px; 
    letter-spacing: -0.2px;
}

/* Icon kecil sebelum tulisan Contents */
.toc-box strong::before {
    content: "";
    width: 6px;
    height: 18px;
    background: var(--primary);
    display: inline-block;
    margin-right: 12px;
    border-radius: 10px;
}

.toc-box ul { 
    list-style: none; /* Kita pakai numbering manual via CSS agar rapi */
    padding: 0; 
    margin: 0; 
    counter-reset: item;
}

.toc-box ul li { 
    margin-bottom: 12px;
    position: relative;
    padding-left: 30px;
}

/* Custom Numbering yang keren */
.toc-box ul li::before {
    content: counter(item);
    counter-increment: item;
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.9rem;
    opacity: 0.6;
}

.toc-box ul li a { 
    color: #4a5568; 
    text-decoration: none; 
    font-size: 1rem; 
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.toc-box ul li a:hover { 
    color: var(--primary); 
    transform: translateX(6px); /* Geser halus saat di-hover */
}

/* Content Area */
.content-area { 
    background: var(--white); 
    padding: 50px; 
    border-radius: 16px; 
    margin-top: 25px; 
    box-shadow: var(--shadow-soft); 
    border: 1px solid var(--border-color);
}
.main-text { font-size: 1.125rem; color: #2d3748; line-height: 1.85; }
.main-text p { margin-bottom: 25px; }

/* Related Section */
.related-section { margin-top: 65px; border-top: 1px solid var(--border-color); padding-top: 40px; }
.related-section h3 { margin-bottom: 25px; font-size: 1.6rem; }

/* Pagination & Buttons */
.pagination { margin: 55px 0; text-align: center; }
.btn { 
    background: var(--primary); 
    color: var(--white); 
    padding: 14px 35px; 
    border-radius: 50px; /* Round button */
    text-decoration: none; 
    font-weight: 700; 
    display: inline-block; 
    transition: all 0.3s; 
    border: none;
    cursor: pointer;
}
.btn:hover { 
    background: #006ae6; 
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,123,255,0.4); 
}

/* Footer */
footer { background: #0f172a; color: #94a3b8; padding: 60px 0; margin-top: 100px; text-align: center; }
.footer-links { margin-bottom: 20px; }
.footer-links a { color: #64748b; text-decoration: none; margin: 0 12px; font-weight: 500; }
.footer-links a:hover { color: var(--white); }

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.1rem; letter-spacing: -0.5px; }
    .content-area { padding: 25px; }
    .toc-box { width: 100%; min-width: 0; display: block; }
    .grid { grid-template-columns: 1fr; }
    h2, h3 { scroll-margin-top: 90px; }
}