/* ============================================
   BELANJA PINTAR - MODERN CSS STYLESHEET
   Smart Shopping Guide Blog System
   ============================================ */

/* ===== CSS VARIABLES / DESIGN TOKENS ===== */
:root {
    /* Colors */
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    
    --text-primary: #000000;
    --text-secondary: #374151;
    --text-muted: #666666;
    --text-light: #999999;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    --border: #e5e7eb;
    --border-dark: #d1d5db;
    
    --accent-blue: #3b82f6;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    
    /* Typography */
    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 22px;
    --font-size-2xl: 28px;
    --font-size-3xl: 32px;
    --font-size-4xl: 42px;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 30px;
    --space-3xl: 40px;
    
    /* Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    
    /* Shadow */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== BASE STYLES ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: var(--font-size-base);
}

/* ===== HEADER / NAVIGATION ===== */
header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: var(--space-lg) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2xl);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.logo-text h1 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.logo-text p {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin: 0;
}

nav ul {
    list-style: none;
    display: flex;
    gap: var(--space-2xl);
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: color var(--transition-base);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width var(--transition-base);
}

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

nav a:hover::after {
    width: 100%;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: var(--space-3xl) 0;
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.hero h1 {
    font-size: var(--font-size-4xl);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    font-weight: 700;
    line-height: 1.2;
}

.hero p {
    font-size: var(--font-size-lg);
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

.hero .btn {
    display: inline-block;
    padding: var(--space-lg) var(--space-2xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.hero .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== SEARCH BOX ===== */
.search-box {
    margin-bottom: var(--space-2xl);
}

.search-box form {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.search-box input {
    width: 100%;
    max-width: 400px;
    padding: var(--space-lg) var(--space-xl);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-family: var(--font-sans);
    transition: all var(--transition-base);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2xl);
    position: relative;
    padding-bottom: var(--space-lg);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 2px;
}

/* ===== CATEGORIES SECTION ===== */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

.category-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
}

.category-card:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.category-card a {
    text-decoration: none;
    color: inherit;
}

.category-icon {
    font-size: 32px;
    margin-bottom: var(--space-md);
    display: block;
}

.category-card h3 {
    font-size: var(--font-size-base);
    margin: 0;
    font-weight: 600;
}

/* ===== ARTICLES GRID ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-3xl);
}

.article-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
    border-color: var(--primary);
}

.article-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    object-fit: cover;
    transition: transform var(--transition-base);
}

.article-card:hover .article-image {
    transform: scale(1.05);
}

.article-content {
    padding: var(--space-xl);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-block;
    font-size: var(--font-size-xs);
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    width: fit-content;
    font-weight: 600;
}

.article-card h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    line-height: 1.4;
}

.article-card p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    line-height: 1.5;
    flex-grow: 1;
}

.article-meta {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    margin-bottom: var(--space-md);
    display: flex;
    gap: var(--space-md);
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.read-more:hover {
    color: var(--primary-dark);
    transform: translateX(4px);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: var(--space-md) var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
}

.pagination a:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary);
}

.pagination .active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary);
}

/* ===== NO ARTICLES MESSAGE ===== */
.no-articles {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: var(--text-muted);
}

/* ===== FOOTER ===== */
footer {
    background: var(--text-primary);
    color: white;
    padding: var(--space-3xl) 0 var(--space-lg);
    margin-top: var(--space-3xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-section h4 {
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-base);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--space-md);
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color var(--transition-base);
}

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

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: var(--space-lg);
    text-align: center;
    font-size: var(--font-size-xs);
    color: #999999;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: var(--space-lg);
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-lg);
    }

    .hero h1 {
        font-size: var(--font-size-2xl);
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }

    .categories {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .search-box input {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero {
        padding: var(--space-2xl) 0;
    }

    .hero h1 {
        font-size: var(--font-size-2xl);
    }

    .hero p {
        font-size: var(--font-size-base);
    }

    nav ul {
        gap: var(--space-md);
    }

    nav a {
        font-size: var(--font-size-xs);
    }

    .article-card {
        border-radius: var(--radius-md);
    }

    .article-content {
        padding: var(--space-lg);
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.article-card {
    animation: fadeIn 0.6s ease-out;
}

.section-title {
    animation: slideInLeft 0.6s ease-out;
}

/* ===== UTILITIES ===== */
.btn {
    display: inline-block;
    padding: var(--space-lg) var(--space-2xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

/* ===== PRINT STYLES ===== */
@media print {
    header,
    footer,
    .pagination {
        display: none;
    }

    .article-card {
        break-inside: avoid;
    }
}
