/**
 * =====================================================================
 * FRONTEND STYLESHEET
 * =====================================================================
 * @package    MyAwesomeCMS
 * @file       assets/css/frontend.css
 * @version    1.0.0
 * @website    https://aswelove.id
 * @author     Developer Team
 * 
 * ==================== PERINGATAN UNTUK DEVELOPER ====================
 * 1. Jangan ubah file ini tanpa pemahaman yang cukup!
 *    Backup dulu sebelum perubahan.
 * 2. Jika ingin menambahkan kode berikan keterangan atau notes yang jelas.
 * 3. Lakukan Pemrograman yang rapi ya teman-teman developerku.
 * =====================================================================
 * 
 * DESKRIPSI: CSS untuk tampilan frontend website (homepage, blog, single post)
 * =====================================================================
 */

/* ==================== RESET & VARIABLES ==================== */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #48bb78;
    --danger: #f56565;
    --dark: #1a1a2e;
    --light: #f7fafc;
    --gray: #718096;
    --gray-light: #e2e8f0;
    --gray-dark: #4a5568;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: var(--dark);
    line-height: 1.7;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.35rem; }

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

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

/* ==================== HEADER & NAVIGATION ==================== */
.site-header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo img {
    max-height: 50px;
    width: auto;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-tagline {
    font-size: 12px;
    color: var(--gray);
}

.main-nav ul {
    display: flex;
    gap: 32px;
    list-style: none;
}

.main-nav a {
    color: var(--gray-dark);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark);
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 24px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 32px;
}

/* ==================== CONTAINER & LAYOUT ==================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 16px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

/* ==================== BLOG GRID ==================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.blog-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.blog-card-image {
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.blog-card-content {
    padding: 24px;
}

.blog-card-title {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.blog-card-title a {
    color: var(--dark);
}

.blog-card-title a:hover {
    color: var(--primary);
}

.blog-card-meta {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
}

.blog-card-meta i {
    margin-right: 4px;
}

.blog-card-excerpt {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

/* ==================== SINGLE POST ==================== */
.post-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 24px;
    text-align: center;
}

.post-title {
    font-size: 3rem;
    max-width: 800px;
    margin: 0 auto 20px;
}

.post-meta {
    font-size: 14px;
    opacity: 0.9;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.post-content {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 24px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 32px 0;
}

.post-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.post-content h3 {
    margin-top: 32px;
    margin-bottom: 16px;
}

.post-content p {
    margin-bottom: 20px;
    color: var(--gray-dark);
}

.post-content ul, 
.post-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--light);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
}

.post-featured-image {
    max-width: 900px;
    margin: -40px auto 0;
    padding: 0 24px;
}

.post-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--gray-light);
    color: var(--gray-dark);
    transition: var(--transition);
}

.pagination a:hover,
.pagination .active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
}

/* ==================== SIDEBAR ==================== */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    padding: 60px 0;
}

.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-widget {
    background: var(--light);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 32px;
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-light);
}

.recent-posts-list {
    list-style: none;
}

.recent-posts-list li {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-light);
}

.recent-posts-list li:last-child {
    border-bottom: none;
}

.recent-posts-list a {
    color: var(--dark);
    font-weight: 500;
}

.recent-posts-list a:hover {
    color: var(--primary);
}

.recent-posts-date {
    font-size: 12px;
    color: var(--gray);
    display: block;
    margin-top: 4px;
}

/* ==================== FOOTER ==================== */
.site-footer {
    background: #1a1a2e;
    color: #a0aec0;
    padding: 48px 0 24px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-widget h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-widget p {
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    color: #a0aec0;
    font-size: 20px;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero-title { font-size: 2.5rem; }
    .post-title { font-size: 2rem; }
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    .main-nav {
        display: none;
        width: 100%;
    }
    .main-nav.active {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 16px;
        padding: 20px 0;
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .hero-section {
        padding: 60px 24px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .section {
        padding: 40px 0;
    }
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
}