/*
Theme Name: Herbalalami Theme
Theme URI: https://herbalalami.web.id
Author: Herbalalami Team
Author URI: https://herbalalami.web.id
Description: Premium SEO-Optimized WordPress Theme untuk website herbal dengan desain profesional, schema markup lengkap, dan responsive mobile-first.
Version: 1.1.0
Tested up to: 6.4
Requires PHP: 7.4
Text Domain: herbalalami
*/

/* ============================================
   1. CSS VARIABLES & DESIGN SYSTEM
   ============================================ */
:root {
    /* Primary Colors - Green Palette (Nature's Answer) */
    --primary-50: #f0fdf4;
    --primary-100: #dcfce7;
    --primary-500: #22c55e;
    --primary-600: #16a34a;
    /* Main Brand Color */
    --primary-700: #15803d;
    --primary-800: #166534;
    --primary-900: #14532d;

    /* Functional Colors */
    --accent-lime: #84cc16;
    --accent-red: #ef4444;
    --bg-light: #f9fafb;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --header-height: 80px;
    --container-max: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
    /* Gray-700 for better readability */
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: #111827;
    /* Gray-900 */
    line-height: 1.25;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-600);
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    max-width: var(--container-max);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* ============================================
   2. HEADER & NAV
   ============================================ */
.site-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.site-title {
    font-size: 1.5rem;
    color: var(--primary-800);
    margin: 0;
}

.main-navigation ul {
    display: none;
    list-style: none;
    gap: 2rem;
}

@media (min-width: 768px) {
    .main-navigation ul {
        display: flex;
    }

    .main-navigation a {
        font-weight: 500;
        font-size: 0.95rem;
        color: #4b5563;
    }

    .main-navigation a:hover {
        color: var(--primary-600);
    }
}

.btn-nav {
    background: var(--primary-600);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 5px;
    font-weight: 600;
}

.btn-nav:hover {
    background: var(--primary-700);
}

/* ============================================
   3. SINGLE POST LAYOUT ("Herbal Wisdom" Style)
   ============================================ */
.single-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

@media (min-width: 1024px) {
    .single-layout {
        grid-template-columns: 2fr 1fr;
        /* Content Left, Sidebar Right */
    }
}

/* Post Header */
.entry-header {
    margin-bottom: 2rem;
}

.entry-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 1rem;
}

.author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Featured Image */
.featured-image-wrapper {
    margin-bottom: 2rem;
}

.featured-image-wrapper img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

/* Content Styling */
.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

/* Key Takeaways Box (Green Box) */
.key-takeaways {
    background: var(--primary-50);
    border-left: 4px solid var(--primary-500);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.key-title {
    font-weight: 700;
    color: var(--primary-800);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.key-list {
    list-style: none !important;
    padding: 0 !important;
}

.key-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.key-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-600);
    font-weight: bold;
}

/* Sidebar & Widgets */
.sticky-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget-box {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.toc-widget h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-800);
}

.toc-list {
    list-style: none;
    padding: 0;
    font-size: 0.9rem;
}

.toc-list li {
    margin-bottom: 0.75rem;
    border-left: 2px solid #e5e7eb;
    padding-left: 1rem;
}

.toc-list li.active {
    border-color: var(--primary-500);
    color: var(--primary-700);
    font-weight: 500;
}

.toc-list a {
    color: #6b7280;
}

.toc-list a:hover {
    color: var(--primary-600);
}

/* Newsletter Widget */
.newsletter-widget {
    background: var(--primary-600);
    color: white;
    text-align: center;
}

.newsletter-widget h4 {
    color: white;
    margin-bottom: 0.5rem;
}

.newsletter-widget p {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.newsletter-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    border: none;
    margin-bottom: 0.75rem;
}

.newsletter-btn {
    width: 100%;
    background: #111827;
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* ============================================
   4. FRONTPAGE LAYOUT ("Herbal Niche" Style)
   ============================================ */
/* Hero */
.home-hero {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 4rem;
    padding: 4rem 0;
}

@media (min-width: 1024px) {
    .home-hero {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-text .highlight {
    color: var(--primary-500);
}

.search-box {
    display: flex;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    padding: 0.5rem;
    margin-top: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 0 1.5rem;
    outline: none;
}

.search-btn {
    background: var(--primary-500);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
}

.hero-visual img {
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Health Goals (Icon Grid) */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.health-goals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .health-goals-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.goal-card {
    background: white;
    padding: 2rem 1rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #f3f4f6;
    transition: transform 0.2s;
}

.goal-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-200);
}

.goal-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

/* Trending Products */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.product-badge {
    background: #facc15;
    color: #854d0e;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 1rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}

.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.check-price-btn {
    background: var(--primary-50);
    color: var(--primary-700);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Utility */
.mb-8 {
    margin-bottom: 2rem;
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-green {
    color: var(--primary-600);
    cursor: pointer;
}