/* ============================================
   MAIN STYLESHEET - COMPLETE
   ============================================ */

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --success: #06d6a0;
    --danger: #ef476f;
    --warning: #ffd166;
    --dark: #1a1e2b;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #eef2f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.navbar {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary);
}

.logo img {
    max-height: 40px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-menu ul li {
    position: relative;
}

.nav-menu ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu ul li a:hover {
    color: var(--primary);
}

/* Dropdown */
.nav-menu ul li .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 10px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 99;
}

.nav-menu ul li:hover .dropdown {
    opacity: 1;
    visibility: visible;
}

.nav-menu ul li .dropdown li {
    display: block;
}

.nav-menu ul li .dropdown li a {
    display: block;
    padding: 10px 15px;
}

.nav-search form {
    display: flex;
}

.nav-search input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
    outline: none;
}

.nav-search button {
    padding: 8px 12px;
    background: var(--primary);
    border: none;
    border-radius: 0 8px 8px 0;
    color: white;
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: white;
    color: var(--primary);
}

/* ============================================
   CATEGORIES SECTION
   ============================================ */
.categories {
    padding: 60px 0;
    background: var(--light);
}

.categories h2 {
    text-align: center;
    margin-bottom: 40px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    padding: 30px;
    text-align: center;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.category-card i {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 15px;
}

.category-card h3 {
    color: var(--dark);
    font-size: 18px;
}

/* ============================================
   POSTS GRID
   ============================================ */
.posts {
    padding: 60px 0;
}

.posts h2 {
    text-align: center;
    margin-bottom: 40px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.post-image {
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 20px;
}

.post-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none;
    margin-bottom: 12px;
}

.post-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.post-content h3 a {
    text-decoration: none;
    color: var(--dark);
}

.post-content h3 a:hover {
    color: var(--primary);
}

.post-meta {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 12px;
}

.post-meta span {
    margin-right: 15px;
}

.read-more {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-top: 10px;
}
/* ============================================
   TAGS STYLES
   ============================================ */

/* Post Tags */
.post-tags {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #eef2f6;
    border-bottom: 1px solid #eef2f6;
}

.post-tags strong {
    margin-right: 10px;
}

.tag-link {
    display: inline-block;
    background: #f0f2f5;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #4361ee;
    text-decoration: none;
    margin: 0 5px 5px 0;
    transition: all 0.3s;
}

.tag-link:hover {
    background: #4361ee;
    color: white;
}

/* Post Categories */
.post-categories {
    margin: 15px 0;
}

.category-badge {
    display: inline-block;
    background: #e8f4fd;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #4361ee;
    text-decoration: none;
    margin: 0 5px 5px 0;
}

.category-badge:hover {
    background: #4361ee;
    color: white;
}
/* ============================================
   SINGLE POST
   ============================================ */
.single-post {
    padding: 40px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 14px;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--gray);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb i {
    font-size: 12px;
    color: var(--gray);
}

.breadcrumb span {
    color: var(--dark);
}

article h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.featured-image {
    margin-bottom: 30px;
}

.featured-image img {
    width: 100%;
    border-radius: 16px;
}

.post-content {
    font-size: 18px;
    line-height: 1.8;
}

.post-content h2 {
    margin: 30px 0 15px;
}

.post-content h3 {
    margin: 25px 0 12px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.share-buttons {
    margin: 40px 0;
    padding: 20px;
    background: var(--light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.share-buttons a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: transform 0.3s;
}

.share-buttons a:hover {
    transform: translateY(-2px);
}

.share-fb { background: #3b5998; }
.share-tw { background: #1da1f2; }
.share-li { background: #0077b5; }
.share-wa { background: #25d366; }

/* Related Posts */
.related-posts {
    margin: 50px 0;
}

.related-posts h3 {
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.related-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.related-card h4 {
    padding: 15px;
    font-size: 16px;
}

.related-card a {
    text-decoration: none;
    color: var(--dark);
}

/* Comments */
.comments {
    margin-top: 50px;
}

.comments h3 {
    margin-bottom: 20px;
}

.comment-form {
    background: var(--light);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 15px;
}

.comment-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
}

.comment {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.comment-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.comment-body strong {
    display: block;
    margin-bottom: 5px;
}

.comment-body span {
    font-size: 12px;
    color: var(--gray);
}

/* ============================================
   ARCHIVE PAGE
   ============================================ */
.archive-page {
    padding: 40px 0;
}

.archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.archive-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.post-count {
    color: var(--gray);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s;
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================
   SEARCH PAGE
   ============================================ */
.search-page {
    padding: 40px 0;
}

.search-header {
    text-align: center;
    margin-bottom: 30px;
}

.search-form {
    max-width: 500px;
    margin: 0 auto 40px;
}

.search-form form {
    display: flex;
}

.search-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
}

.search-form button {
    padding: 12px 24px;
    background: var(--primary);
    border: none;
    border-radius: 0 8px 8px 0;
    color: white;
    cursor: pointer;
}

.search-result {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.search-result h3 {
    margin-bottom: 10px;
}

.search-result h3 a {
    text-decoration: none;
    color: var(--dark);
}

.search-result .meta {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 10px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--dark);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about p {
    color: rgba(255,255,255,0.7);
    margin-top: 15px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.footer-links ul li a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-menu ul {
        flex-direction: column;
        align-items: center;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    article h1 {
        font-size: 28px;
    }
    
    .row {
        flex-direction: column;
    }
    
    .col-lg-8, .col-lg-4 {
        width: 100%;
    }
}

.row {
    display: flex;
    gap: 30px;
}

.col-lg-8 {
    flex: 2;
}

.col-lg-4 {
    flex: 1;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert.success {
    background: #d4edda;
    color: #155724;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
}
/* Tags Styles */
.post-tags { margin: 30px 0; padding: 15px 0; border-top: 1px solid #eef2f6; border-bottom: 1px solid #eef2f6; }
.post-tags strong { margin-right: 10px; }
.tag-link { display: inline-block; background: #f0f2f5; padding: 5px 12px; border-radius: 20px; font-size: 12px; color: #4361ee; text-decoration: none; margin: 0 5px 5px 0; }
.tag-link:hover { background: #4361ee; color: white; }
.widget-tags .tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud-link { display: inline-block; background: #f0f2f5; padding: 5px 12px; border-radius: 20px; font-size: 13px; color: #4361ee; text-decoration: none; }
.tag-cloud-link:hover { background: #4361ee; color: white; }
.tag-cloud-link .tag-count { font-size: 10px; opacity: 0.7; }