/*
Theme Name: TheGrowPedia
Theme URI: https://thegrowpedia.com
Author: Alex Carter
Author URI: https://thegrowpedia.com/about
Description: A clean, fast theme for houseplant care guides.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: thegrowpedia
*/

/* =============================================
   RESET & VARIABEL
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --font-utama: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-artikel: 'Merriweather', 'Georgia', serif;

    --warna-teks: #1a1a1a;
    --warna-teks-muted: #6b7280;
    --warna-latar: #f8faf8;
    --warna-putih: #ffffff;
    --warna-primer: #1a7a50;
    --warna-primer-hover: #155f3e;
    --warna-primer-light: #e8f5ee;
    --warna-border: #e5e7eb;
    --warna-border-light: #f0f0f0;

    --lebar-konten: 1100px;
    --lebar-artikel: 780px;
    --radius-border: 10px;
    --radius-border-sm: 6px;
    --bayangan-sm: 0 1px 4px rgba(0,0,0,0.06);
    --bayangan: 0 4px 16px rgba(0,0,0,0.07);
    --bayangan-hover: 0 8px 24px rgba(0,0,0,0.1);
}

/* =============================================
   BASE
   ============================================= */
html, body {
    font-family: var(--font-utama);
    background-color: var(--warna-latar);
    color: var(--warna-teks);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-utama);
    font-weight: 700;
    line-height: 1.3;
    color: var(--warna-teks);
}

/* =============================================
   LAYOUT UTAMA
   ============================================= */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    flex: 1;
    max-width: var(--lebar-konten);
    width: 92%;
    margin: 36px auto;
}

/* =============================================
   HEADER & NAVIGASI
   ============================================= */
.main-header {
    width: 100%;
    background-color: var(--warna-putih);
    border-bottom: 1px solid var(--warna-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--bayangan-sm);
}

.nav-container {
    max-width: var(--lebar-konten);
    width: 92%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}

.site-title {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.site-title a { color: inherit; text-decoration: none; }
.site-title .grow-color { color: #091c7a; }
.site-title .pedia-color { color: #1a7a50; }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 6px;
}
.main-nav a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--warna-teks-muted);
    padding: 6px 12px;
    border-radius: var(--radius-border-sm);
    transition: background 0.2s, color 0.2s;
}
.main-nav a:hover {
    color: var(--warna-primer);
    background: var(--warna-primer-light);
    text-decoration: none;
}

/* =============================================
   HOMEPAGE — PAGE HEADER
   ============================================= */
.page-header {
    background: linear-gradient(135deg, #e8f5ee 0%, #f0faf5 100%);
    border: 1px solid #c8e8d8;
    border-radius: var(--radius-border);
    padding: 36px 40px;
    margin-bottom: 36px;
}

.page-title {
    font-size: 1.9rem;
    margin: 0 0 8px;
    color: var(--warna-teks);
}

.page-description {
    font-size: 1rem;
    color: var(--warna-teks-muted);
    margin: 0;
}

/* =============================================
   HOMEPAGE — ARTICLE GRID
   ============================================= */
.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

@media (min-width: 640px) {
    .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .article-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================
   ARTICLE CARD
   ============================================= */
.article-card {
    background-color: var(--warna-putih);
    border-radius: var(--radius-border);
    border: 1px solid var(--warna-border);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bayangan-hover);
}

.article-card-image-wrap { display: block; overflow: hidden; }

.article-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.article-card:hover .article-card-image {
    transform: scale(1.03);
}

.article-card-content {
    padding: 20px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--warna-primer);
    background: var(--warna-primer-light);
    padding: 3px 9px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.article-card-title {
    font-size: 1.05rem;
    margin: 0 0 10px;
    line-height: 1.45;
}
.article-card-title a {
    color: var(--warna-teks);
}
.article-card-title a:hover { color: var(--warna-primer); }

.article-card-excerpt {
    font-size: 0.88rem;
    color: var(--warna-teks-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.article-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--warna-border-light);
    padding-top: 14px;
    margin-top: auto;
}

.article-card-date {
    font-size: 0.8rem;
    color: var(--warna-teks-muted);
}

.article-card-link {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--warna-primer);
}
.article-card-link:hover { text-decoration: underline; }

/* =============================================
   SINGLE ARTICLE
   ============================================= */
.article-full {
    max-width: var(--lebar-artikel);
    margin: 0 auto;
}

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--warna-teks-muted);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.breadcrumbs a { color: var(--warna-teks-muted); }
.breadcrumbs a:hover { color: var(--warna-primer); }
.breadcrumbs .sep { color: #ccc; margin: 0 2px; }

.article-header-full {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--warna-border);
}

.article-category-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--warna-primer);
    background: var(--warna-primer-light);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.article-title-full {
    font-size: 2.4rem;
    line-height: 1.25;
    margin: 0 0 20px;
}

.article-meta-full {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.88rem;
    color: var(--warna-teks-muted);
    flex-wrap: wrap;
}
.article-meta-full .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-image-header {
    width: 100%;
    border-radius: var(--radius-border);
    margin-bottom: 36px;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* =============================================
   ARTICLE CONTENT (TIPOGRAFI)
   ============================================= */
.article-content {
    font-family: var(--font-artikel);
    font-size: 1.1rem;
    line-height: 1.85;
    color: #222;
}

.article-content h2 {
    font-family: var(--font-utama);
    font-size: 1.65rem;
    margin-top: 2.2em;
    margin-bottom: 0.75em;
    padding-bottom: 0.4em;
    border-bottom: 2px solid var(--warna-primer-light);
}
.article-content h3 {
    font-family: var(--font-utama);
    font-size: 1.25rem;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
}
.article-content p { margin-bottom: 1.5em; }
.article-content ul, .article-content ol {
    padding-left: 1.6em;
    margin-bottom: 1.5em;
}
.article-content li { margin-bottom: 0.4em; }
.article-content strong { font-weight: 700; }
.article-content em { font-style: italic; }
.article-content blockquote {
    border-left: 4px solid var(--warna-primer);
    padding: 1em 1.5em;
    margin: 2em 0;
    font-style: italic;
    color: #555;
    background: var(--warna-primer-light);
    border-radius: 0 var(--radius-border-sm) var(--radius-border-sm) 0;
}
.article-content a {
    color: var(--warna-primer);
    text-decoration: underline;
    text-decoration-color: rgba(26,122,80,0.4);
}
.article-content a:hover {
    text-decoration-color: var(--warna-primer);
}

/* =============================================
   AUTHOR BOX
   ============================================= */
.author-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--warna-putih);
    border: 1px solid var(--warna-border);
    border-radius: var(--radius-border);
    padding: 24px 28px;
    margin-top: 48px;
}

.author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--warna-primer-light);
}

.author-avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--warna-primer-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--warna-primer);
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--warna-teks-muted);
    margin-bottom: 4px;
}

.author-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--warna-teks);
    margin-bottom: 8px;
}

.author-bio {
    font-size: 0.9rem;
    color: var(--warna-teks-muted);
    line-height: 1.65;
}

/* =============================================
   HALAMAN STATIS (page.php)
   ============================================= */
.page-body-wrap {
    max-width: 800px;
    margin: 0 auto;
    background: var(--warna-putih);
    padding: 44px 48px;
    border-radius: var(--radius-border);
    border: 1px solid var(--warna-border);
}

.page-body {
    font-family: var(--font-artikel);
    font-size: 1.05rem;
    line-height: 1.85;
    color: #222;
}
.page-body h2 {
    font-family: var(--font-utama);
    font-size: 1.5rem;
    margin-top: 2em;
    margin-bottom: 0.75em;
}
.page-body p { margin-bottom: 1.4em; }
.page-body ul, .page-body ol {
    padding-left: 1.5em;
    margin-bottom: 1.4em;
}

/* =============================================
   FOOTER
   ============================================= */
.main-footer {
    background-color: #1a1f2e;
    color: #9ca3af;
    padding: 44px 0 28px;
    margin-top: 60px;
    font-size: 0.88rem;
}

.footer-container {
    max-width: var(--lebar-konten);
    width: 92%;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.footer-brand .site-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
}
.footer-brand .grow-color { color: #93c5fd; }
.footer-brand .pedia-color { color: #6ee7b7; }
.footer-brand p {
    font-size: 0.85rem;
    color: #9ca3af;
    max-width: 260px;
    line-height: 1.6;
}

.footer-nav h4 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #e5e7eb;
    margin-bottom: 14px;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-nav a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-nav a:hover { color: #6ee7b7; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    text-align: center;
    color: #6b7280;
    font-size: 0.82rem;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .article-title-full { font-size: 1.8rem; }
    .article-content { font-size: 1rem; }
    .author-box { flex-direction: column; align-items: center; text-align: center; }
    .page-body-wrap { padding: 28px 24px; }
    .footer-top { flex-direction: column; gap: 28px; }
}

@media (max-width: 576px) {
    .nav-container { flex-direction: column; height: auto; padding: 14px 0; gap: 10px; }
    .main-nav ul { justify-content: center; flex-wrap: wrap; gap: 4px; }
    .page-header { padding: 24px 22px; }
    .page-title { font-size: 1.5rem; }
}
