/* ======================================================================= */
/* FILE: /css/style.css (V5 LENGKAP & FINAL - Perbaikan UI Total)          */
/* ======================================================================= */
:root {
    --primary-color: #8A2BE2; 
    --primary-hover: #9932CC; 
    --accent-color: #00BFFF;  
    --background-dark: #121212;
    --background-light: #1E1E1E;
    --text-color: #E0E0E0;
    --text-muted: #A0A0A0;
    --border-color: #333333;
    --shadow-glow: 0 0 25px rgba(138, 43, 226, 0.4);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Poppins', sans-serif;
}

/* Base Styles (Mobile First) */
html { 
    scroll-behavior: smooth; 
}

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    margin: 0;
    background-color: var(--background-dark);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-color);
}

/* Header & Mobile Navigation */
header {
    background-color: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--text-color);
}

header nav.desktop-nav {
    display: none;
}

#mobile-menu-button {
    display: block;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

nav#mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--background-light);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

nav#mobile-menu.active {
    display: block;
}

nav#mobile-menu a {
    display: block;
    text-align: center;
    padding: 0.8rem 1rem;
    color: var(--text-color);
    text-decoration: none;
}

nav#mobile-menu a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* AD-READY: Layout Utama (Konten + Sidebar) */
.page-layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.main-content {
    flex: 1;
    min-width: 0; 
}

.sidebar {
    width: 100%;
}

.sidebar-widget {
    background-color: var(--background-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.sidebar-widget-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin: 0 0 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin-bottom: 0.75rem;
}

.sidebar a {
    text-decoration: none;
    color: var(--text-muted);
}

.sidebar a:hover {
    color: var(--primary-color);
}

/* AD-READY: Placeholder Iklan */
.ad-placeholder {
    width: 100%;
    background-color: var(--background-light);
    border: 1px dashed var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    position: relative;
    margin: 2rem auto;
}
.ad-placeholder::before {
    content: "Advertisement";
    position: absolute;
    top: -20px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.ad-placeholder-top-banner { min-height: 100px; }
.ad-placeholder-sidebar { min-height: 250px; }
.ad-placeholder-in-article { min-height: 200px; max-width: 500px; }

/* Hero Section Animasi */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(-45deg, #121212, #1a1a2e, #2a1a2e, #121212);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

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

.hero h1 { font-family: var(--font-display); font-size: clamp(2.2rem, 8vw, 3.5rem); margin-bottom: 1rem; color: #fff; text-shadow: 0 0 10px rgba(138, 43, 226, 0.5); }
.hero .subtitle { font-size: 1.1rem; color: var(--text-color); max-width: 600px; margin: 0 auto; }

/* Bagian Halaman */
.section { padding: 2rem 0; }
.section-title, .page-title { font-family: var(--font-display); text-align: center; margin-top: 0; margin-bottom: 2rem; }
.section-title { font-size: 2rem; }
.page-title { font-size: 2.5rem; }
.page-subtitle { max-width: 600px; margin: -1.5rem auto 2rem; text-align: center; font-size: 1rem; color: var(--text-muted); }

/* Grid & Card */
.grid-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.card { background: var(--background-light); border-radius: 12px; padding: 1.5rem; text-decoration: none; color: var(--text-color); border: 1px solid var(--border-color); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-glow); border-color: var(--primary-color); }
.card h3 { font-family: var(--font-display); margin: 0 0 0.5rem; color: var(--accent-color); font-size: 1.2rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* Layout Daftar (Blog & Direktori) */
.list-layout { display: flex; flex-direction: column; gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.list-item { background: var(--background-light); border: 1px solid var(--border-color); border-radius: 12px; padding: 2rem; text-decoration: none; color: var(--text-color); box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.list-item:hover { transform: translateY(-5px) scale(1.02); border-color: var(--primary-color); box-shadow: var(--shadow-glow); }
.list-item h3 { margin: 0 0 0.5rem; font-family: var(--font-display); font-size: 1.5rem; color: var(--accent-color); }
.list-item p { margin: 0; color: var(--text-muted); font-size: 1rem; }

/* Halaman Detail & Artikel */
.content-section, .ai-tool-container { background: var(--background-light); padding: 1.5rem; border-radius: 12px; margin: 0 auto 2rem; border: 1px solid var(--border-color); }
.article-content { max-width: 750px; margin-left: auto; margin-right: auto; }
.article-meta { color: var(--text-muted); font-style: italic; margin-bottom: 2rem; text-align: center; }
.article-content h3 { font-family: var(--font-display); margin-top: 2.5rem; color: var(--accent-color); }

/* Tombol */
.btn { display: inline-block; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); color: #fff; border: none; padding: 12px 24px; font-size: 1rem; font-weight: 700; border-radius: 50px; cursor: pointer; text-decoration: none; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.view-all-container { text-align: center; margin-top: 2rem; }

/* Footer */
footer { background-color: #1E1E1E; color: var(--text-muted); padding: 2.5rem 0; text-align: center; margin-top: 2rem; border-top: 1px solid var(--border-color); }
footer nav { margin-bottom: 1rem; }
footer nav a { color: #f8f9fa; text-decoration: none; margin: 0 10px; }

/* Media Query untuk Tablet (mulai 768px) */
@media (min-width: 768px) {
    .container { padding: 0 2rem; }
    .section { padding: 3rem 0; }
    .section-title { font-size: 2.5rem; }
    .page-title { font-size: 3rem; }
    .page-subtitle { font-size: 1.1rem; }
    .grid-layout { grid-template-columns: repeat(2, 1fr); }
    .hero { padding: 5rem 0; }
    .content-section, .ai-tool-container { padding: 2.5rem; }
}

/* Media Query untuk Desktop (mulai 992px) */
@media (min-width: 992px) {
    #mobile-menu-button { display: none; }
    header nav.desktop-nav { display: block; }
    .page-layout { flex-direction: row; align-items: flex-start; }
    .main-content { flex: 1; }
    .sidebar { flex: 0 0 320px; }
    .grid-layout { grid-template-columns: repeat(3, 1fr); }
    .list-item h3 { font-size: 1.4rem; }
    .list-item p { font-size: 1rem; }
    #alat .grid-layout { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    #direktori-home .grid-layout { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}