/**
 * Global Stylesheet for Lensa Natura Theme.
 * * 1. Font Definitions & Body Base
 * 2. GLOBAL THEME MODES (Dark & Light Variables)
 * 3. General Animations & Backgrounds
 *
 * @package Lensa_Natura
 * @since 2.2.0 (Split from main.css)
 */

/* ==========================================================================
   1. Font Definitions & Body Base
   ========================================================================== */

/* Mengimpor font dari Google Fonts (fallback jika enqueue gagal) */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Poppins:wght@400;500;600;900&display=swap');

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-heading {
    font-family: 'Playfair Display', serif;
}

.font-body {
    font-family: 'Poppins', sans-serif;
}

/* ==========================================================================
   2. GLOBAL THEME MODES (GELAP & TERANG)
   ========================================================================== */

/* Variabel Warna Utama */
:root {
    /* Light Mode Defaults (Abu-abu Terang + Teks Hitam) */
    --color-bg-primary: #f8f8f8; /* Abu-abu terang kustom */
    --color-bg-secondary: #f3f4f6; /* Abu-abu terang */
    --color-text-primary: #1f2937; /* Teks gelap (HITAM KASAR) */
    --color-text-secondary: #4b5563;
    --color-emerald-base: #10b981;
    --color-shadow-base: rgba(0,0,0,0.1);
    --color-border-base: #e5e7eb;
}

/* Dark Mode Overrides (Abu-abu Gelap + Teks Putih Kehijauan) */
.dark-mode {
    --color-bg-primary: #191919; /* ABU-ABU GELAP KUSTOM */
    --color-bg-secondary: #2c2c2c; /* Abu-abu gelap sekunder */
    --color-text-primary: #e5e7eb; /* FIX KRITIS: Teks putih terang (gray-200) */
    --color-text-secondary: #a0a0a0;
    --color-emerald-base: #34d399;
    --color-shadow-base: rgba(255,255,255,0.15);
    --color-border-base: #4a4a4a;
}

/* Terapkan ke elemen utama (TERMASUK #page) */
/* PERUBAHAN KRITIS: Tambahkan !important agar warna background dinamis selalu diterapkan ke body dan #page */
.light-mode body,
.light-mode #page {
    background-color: var(--color-bg-primary) !important;
}
.dark-mode body,
.dark-mode #page {
    background-color: var(--color-bg-primary) !important;
}


/* Global fix untuk kelas dinamis */
.site-title, .page-text-color, .text-primary-dynamic { color: var(--color-text-primary) !important; }
.text-secondary-dynamic { color: var(--color-text-secondary) !important; }
.text-secondary { color: var(--color-text-secondary) !important; }

/* Background Dinamis Khusus (Halaman Archive/Shop) */
.archive-premium-background, .single-post-background {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
    transition: filter 0.5s ease;
}

/* Latar Belakang Default (Homepage) */
/* --- PERUBAHAN: HAPUS BACKGROUND IMAGE UNTUK HOMEPAGE --- */
.home-page::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Hapus image URL, ganti dengan warna solid BG Primary */
    background-image: none; 
    background-color: var(--color-bg-primary);
    
    background-size: cover;
    background-position: center 75%; 
    background-attachment: fixed;
    z-index: -1;
    /* Hapus filter karena sudah menggunakan warna solid */
    filter: none !important;
    transition: filter 0.5s ease;
}

/* Efek Mode Gelap */
.dark-mode .archive-premium-background {
    filter: brightness(0.2) saturate(0.9); /* Lebih gelap, sedikit saturasi kebiruan */
}

/* Efek Mode Terang (Default) */
.light-mode .archive-premium-background {
    filter: brightness(0.6) saturate(1.2); /* Lebih cerah */
}

/* Fixes & Overrides */
/* Menggunakan var(--color-bg-primary) untuk latar belakang arsip/blog */
.blog, .archive, .search { background-color: var(--color-bg-primary) !important; }
.blog #page, .archive #page, .search #page,
.blog #content, .archive #content, .search #content,
.blog .site-main, .archive .site-main, .search .site-main {
    background: transparent !important;
}

/* PERBAIKAN: Memastikan teks di halaman arsip/kategori terlihat */
.category h2,
.archive h2 {
    color: var(--color-text-primary); /* Judul seperti "Pilih Kategori" menjadi warna dinamis */
}
.category .subcategory-card h3 {
    color: white !important; /* Memaksa judul kartu subkategori menjadi putih */
}

.text-shadow-lg { text-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.text-shadow { text-shadow: 0 2px 8px rgba(0,0,0,0.5); }


/* ==========================================================================
   3. General Animations
   ========================================================================== */
.fade-in-section, .fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-section.is-visible, .fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInSmooth {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
