/* ===================================
   Blog Page Styles
   =================================== */

/* Blog Container */
.blog-archive .blog-container,
.single-post .single-post-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===================================
   Blog Archive Header
   =================================== */
.blog-archive .blog-header {
    text-align: center;
    margin-bottom: 48px;
}

.blog-archive .blog-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px 0;
}

.blog-archive .blog-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===================================
   Blog Layout (Main + Sidebar)
   =================================== */
.blog-archive .blog-layout {
    display: grid;
    grid-template-columns: 1fr 285px;
    gap: 40px;
    align-items: start;
}

.blog-archive .blog-main {
    min-width: 0;
}

/* ===================================
   Sidebar
   =================================== */
.blog-archive .blog-sidebar {
    position: sticky;
    top: 120px;
}

.blog-archive .sidebar-widget {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.blog-archive .widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 20px 0;
}

/* Search Widget */
.blog-archive .search-widget .search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.blog-archive .search-widget .search-input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: border-color 0.2s ease;
}

.blog-archive .search-widget .search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.blog-archive .search-widget .search-input::placeholder {
    color: #999;
}

.blog-archive .search-widget .search-button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: color 0.2s ease;
}

.blog-archive .search-widget .search-button:hover {
    color: var(--primary-color);
}

/* Categories Widget */
.blog-archive .categories-widget .categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-archive .categories-widget .categories-list li {
    border-bottom: 1px solid #f0f0f0;
}

.blog-archive .categories-widget .categories-list li:last-child {
    border-bottom: none;
}

.blog-archive .categories-widget .categories-list a {
    display: block;
    padding: 12px 0;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.blog-archive .categories-widget .categories-list a:hover {
    color: var(--primary-color);
}

.blog-archive .categories-widget .categories-list li.current a {
    color: var(--primary-color);
    font-weight: 600;
}

.blog-archive .categories-widget .no-categories {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 8px 0;
}

/* ===================================
   Blog Grid
   =================================== */
.blog-archive .blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ===================================
   Post Card
   =================================== */
.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.post-card .post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Post Card Image */
.post-card .post-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f5f5f5;
}

.post-card .post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card .post-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

/* Post Card Content */
.post-card .post-card-content {
    padding: 20px;
}

.post-card .post-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    justify-content: space-between;
}

.post-card .post-card-category {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.15);
    padding: 4px 10px;
    border-radius: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    max-width: 50%;
}

.post-card .post-card-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.post-card .post-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .post-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 50px 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .post-card-readmore {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    transition: color 0.2s ease;
    position: absolute;
    bottom: 20px;
}

.post-card:hover .post-card-readmore {
    color: var(--secondary-color);
}

/* ===================================
   Blog Pagination
   =================================== */
.blog-archive .blog-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.blog-archive .blog-pagination .nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.blog-archive .blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.blog-archive .blog-pagination .page-numbers:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.blog-archive .blog-pagination .page-numbers.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* No Posts */
.blog-archive .no-posts {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

.blog-archive .no-posts h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0 0 12px 0;
}

.blog-archive .no-posts p {
    color: var(--text-muted);
    margin: 0 0 24px 0;
}

.blog-archive .no-posts .btn-back-home {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

/* ===================================
   Single Post
   =================================== */
.single-post .post-article {
    max-width: 800px;
    margin: 0 auto;
}

/* Featured Image */
.single-post .post-featured-image {
    margin-bottom: 32px;
    border-radius: 16px;
    overflow: hidden;
}

.single-post .post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Header */
.single-post .post-header {
    margin-bottom: 32px;
}

.single-post .post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.single-post .post-category {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.15);
    padding: 6px 14px;
    border-radius: 4px;
}

.single-post .post-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.single-post .post-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}

/* Post Content */
.single-post .post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.single-post .post-content p {
    margin: 0 0 1.5em 0;
}

.single-post .post-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2em 0 1em 0;
}

.single-post .post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5em 0 0.75em 0;
}

.single-post .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
}

.single-post .post-content ul,
.single-post .post-content ol {
    margin: 0 0 1.5em 1.5em;
}

.single-post .post-content li {
    margin-bottom: 0.5em;
}

.single-post .post-content blockquote {
    margin: 1.5em 0;
    padding: 20px 24px;
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
}

.single-post .post-content blockquote p {
    margin: 0;
}

/* Post Footer */
.single-post .post-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.single-post .post-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.single-post .tags-label {
    font-weight: 600;
    color: var(--text-dark);
}

.single-post .tag-link {
    padding: 4px 12px;
    background: #f0f0f0;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.single-post .tag-link:hover {
    background: var(--primary-color);
    color: white;
}

.single-post .post-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.single-post .share-label {
    font-weight: 600;
    color: var(--text-dark);
}

.single-post .share-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.single-post .share-whatsapp {
    background: #25D366;
}

.single-post .share-facebook {
    background: #1877F2;
}

.single-post .share-twitter {
    background: #000;
}

.single-post .share-btn:hover {
    transform: scale(1.1);
}

/* Post Navigation */
.single-post .post-navigation {
    max-width: 800px;
    margin: 48px auto 0;
    padding-top: 32px;
    border-top: 1px solid #e0e0e0;
}

.single-post .post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.single-post .post-navigation .nav-previous,
.single-post .post-navigation .nav-next {
    flex: 1;
}

.single-post .post-navigation .nav-next {
    text-align: right;
}

.single-post .post-navigation a {
    text-decoration: none;
    display: block;
}

.single-post .post-navigation .nav-subtitle {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.single-post .post-navigation .nav-title {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    transition: color 0.2s ease;
}

.single-post .post-navigation a:hover .nav-title {
    color: var(--primary-color);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 991px) {
    .blog-archive .blog-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .blog-archive .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .blog-archive .sidebar-widget {
        margin-bottom: 0;
    }

    .blog-archive .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {

    .blog-archive .blog-container,
    .single-post .single-post-container {
        padding: 24px 16px;
    }

    .blog-archive .blog-header {
        margin-bottom: 32px;
    }

    .blog-archive .blog-title {
        font-size: 1.8rem;
    }

    .blog-archive .blog-sidebar {
        grid-template-columns: 1fr;
    }

    .blog-archive .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .single-post .post-title {
        font-size: 1.5rem;
    }

    .single-post .post-content {
        font-size: 1rem;
    }

    .single-post .post-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .single-post .post-navigation .nav-links {
        flex-direction: column;
    }

    .single-post .post-navigation .nav-next {
        text-align: left;
    }
}