/* Blog Page Styles */

/* Container */
.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar */
.blog-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    margin-bottom: 25px;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #2f2f42;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

/* Search Form */
.search-form {
    display: block;
}

.search-input-wrapper {
    display: flex;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.search-input-wrapper:focus-within {
    border-color: #2f2f42;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-btn {
    padding: 12px 12px;
    background: #2f2f42;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #1a1a2e;
}

/* Kategori List */
.kategori-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kategori-list li {
    margin-bottom: 8px;
}

.kategori-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.kategori-list a:hover,
.kategori-list a.active {
    background: #f0f0f8;
    color: #2f2f42;
    border-left-color: #2f2f42;
    font-weight: 600;
}

.kategori-list a i {
    width: 18px;
    height: 18px;
}

/* Main Content */
.blog-main {
    flex: 1;
    min-width: 0;
}

/* Search Result Info */
.search-result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.search-result-info p {
    margin: 0;
    color: #666;
}

.clear-search {
    color: #dc3545;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.clear-search:hover {
    text-decoration: underline;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.blog-kategori {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #2f2f42;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

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

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #888;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-title a {
    color: #2f2f42;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-title a:hover {
    color: #4a4a6a;
}

.blog-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2f2f42;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 12px;
}

/* Blog Empty */
.blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.blog-empty i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.blog-empty h3 {
    color: #2f2f42;
    margin-bottom: 10px;
}

.blog-empty p {
    color: #888;
}

/* Pagination */
.blog-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.blog-pagination nav {
    display: flex;
    gap: 8px;
}

/* Blog Detail Styles */
.blog-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

/* Breadcrumb */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 14px;
}

.breadcrumb-nav a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-nav a:hover {
    color: #2f2f42;
}

.breadcrumb-nav i {
    font-size: 12px;
    color: #999;
}

.breadcrumb-nav span {
    color: #2f2f42;
    font-weight: 500;
}

/* Blog Detail Wrapper */
.blog-detail-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Article */
.blog-article {
    flex: 1;
    min-width: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.article-featured-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #f5f5f5;
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.meta-item a {
    color: #2f2f42;
    text-decoration: none;
    font-weight: 500;
}

.meta-item a:hover {
    text-decoration: underline;
}

.article-content {
    padding: 30px;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: #2f2f42;
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

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

.article-content blockquote {
    border-left: 4px solid #2f2f42;
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: #666;
}

/* Share Section */
.article-share {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px 30px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.share-label {
    font-weight: 600;
    color: #2f2f42;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s, opacity 0.3s;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #000;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.copy {
    background: #6c757d;
}

/* Back Button */
.article-back {
    padding: 20px 30px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #2f2f42;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #1a1a2e;
    color: white;
}

/* Detail Sidebar */
.blog-detail-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

/* Recent Posts */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recent-post-item {
    display: flex;
    gap: 15px;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.recent-post-item:hover {
    background: #f8f9fa;
}

.recent-post-image {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2f2f42;
    margin-bottom: 5px;
    line-height: 1.4;
}

.recent-post-date {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.no-posts {
    color: #888;
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

/* Related Articles */
.related-articles {
    margin-top: 50px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #2f2f42;
    margin-bottom: 30px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Responsive */
@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .blog-wrapper {
        flex-direction: column;
    }

    .blog-sidebar {
        width: 100%;
        position: static;
    }

    .blog-detail-wrapper {
        flex-direction: column;
    }

    .blog-detail-sidebar {
        width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

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

    .blog-container,
    .blog-detail-container {
        padding: 20px 15px;
    }

    .article-featured-image {
        height: 250px;
    }

    .article-content {
        padding: 20px;
    }

    .article-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .breadcrumb-nav {
        flex-wrap: wrap;
    }

    .search-result-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .blog-meta {
        flex-direction: column;
        gap: 8px;
    }

    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
}
