/* ======================================================================= */
/* FILE: /css/style.css (LENGKAP & FINAL)                                  */
/* ======================================================================= */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 25px rgba(0,0,0,0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header & Navigasi */
header {
    background: var(--card-bg);
    padding: 1rem 0;
    text-align: center;
    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: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
}

header nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

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

/* Bagian Utama */
main {
    width: 100%;
}

.section {
    padding: 4rem 0;
}

.section-title, .page-title {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
}

.page-title {
    font-size: 3rem;
}

.page-subtitle {
    max-width: 600px;
    margin: -2rem auto 3rem;
    text-align: center;
    font-size: 1.1rem;
    color: #6c757d;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 0;
    background-color: #e9ecef;
}

.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: #495057;
}

/* Layout Grid & Card */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card h3 {
    font-family: 'Poppins', sans-serif;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card.placeholder {
    text-align: center;
    color: #6c757d;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Tombol */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.view-all-container {
    text-align: center;
    margin-top: 2.5rem;
}

/* Layout Daftar */
.list-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.2s, border-color 0.2s;
}

.list-item:hover {
    background-color: #f1f3f5;
    border-color: #adb5bd;
}

.list-item h3 {
    margin: 0 0 0.5rem;
}

.list-item p {
    margin: 0;
    color: #6c757d;
}

/* Halaman Detail & Artikel */
.content-section {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.article-content {
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.article-meta {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 2rem;
    text-align: center;
}

.article-content h3 {
    font-family: 'Poppins', sans-serif;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content ul {
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Alat Spesifik */
.generator-section { text-align: center; margin-bottom: 2rem; }
.palette-container { display: flex; flex-direction: column; height: 70vh; max-height: 500px; border-radius: 12px; overflow: hidden; margin-bottom: 2rem; box-shadow: var(--shadow-md); }
.color-box { flex: 1; display: flex; align-items: flex-end; justify-content: center; position: relative; transition: flex 0.2s; }
.color-box:hover .hex-code { opacity: 1; transform: translateY(0); }
.hex-code { background-color: rgba(0, 0, 0, 0.7); color: white; padding: 8px 14px; border-radius: 8px; font-weight: 700; cursor: pointer; margin-bottom: 1.5rem; opacity: 0; transform: translateY(10px); transition: opacity 0.2s, transform 0.2s; backdrop-filter: blur(5px); }
.tooltip { position: absolute; background-color: #28a745; color: white; padding: 8px 15px; border-radius: 6px; bottom: 85px; left: 50%; transform: translateX(-50%); opacity: 0; transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: none; font-weight: bold; }
.tooltip.visible { opacity: 1; transform: translateX(-50%) translateY(-10px); }

.converter-container { background: var(--card-bg); padding: 2.5rem; border-radius: 12px; max-width: 500px; margin: 2rem auto; border: 1px solid var(--border-color); }
.converter-input { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: center; }
.converter-input label { font-weight: bold; }
.converter-input input { flex-grow: 1; padding: 0.8rem; border: 1px solid var(--border-color); border-radius: 8px; }
.converter-output { text-align: center; font-size: 1.2rem; }
.converter-output strong { font-size: 1.5rem; color: var(--primary-color); display: block; margin-top: 0.5rem; }

.word-counter-container { max-width: 800px; margin: 0 auto 2rem; }
.word-counter-container textarea { width: 100%; box-sizing: border-box; min-height: 250px; padding: 1.5rem; border: 1px solid var(--border-color); border-radius: 12px; font-size: 1rem; margin-bottom: 1.5rem; resize: vertical; }
#counter-results { display: flex; justify-content: space-around; background: var(--card-bg); padding: 1.5rem; border-radius: 12px; box-shadow: var(--shadow-sm); text-align: center; }
#counter-results span { font-size: 1.1rem; color: #6c757d; }
#counter-results strong { display: block; font-size: 1.5rem; color: var(--text-color); margin-top: 0.25rem; }

/* Footer */
footer {
    background-color: #343a40;
    color: #adb5bd;
    padding: 2.5rem 0;
    text-align: center;
    margin-top: 2rem;
}

footer nav {
    margin-bottom: 1rem;
}

footer nav a {
    color: #f8f9fa;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.2s;
}

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

/* Aturan Responsif */
@media (min-width: 768px) {
    .palette-container {
        flex-direction: row;
        height: 35vh;
        min-height: 280px;
    }

    .color-box:hover {
        flex: 1.5;
    }
}