﻿:root {
    --blog-primary-color: #2c3e50;
    --blog-secondary-color: #3498db;
    --blog-accent-color: #e74c3c;
    --blog-light-color: #ecf0f1;
    --blog-dark-color: #2c3e50;
    --blog-text-color: #333;
    --blog-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --blog-transition: all 0.3s ease;
}

/* Page Header */
.page-header {
    margin: 30px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.page-title {
    font-size: 28px;
    color: var(--blog-primary-color);
    margin-bottom: 10px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    color: #777;
    font-size: 14px;
}

    .breadcrumb a {
        color: var(--blog-secondary-color);
        transition: var(--blog-transition);
    }

        .breadcrumb a:hover {
            color: var(--blog-primary-color);
        }

    .breadcrumb i {
        margin: 0 10px;
        font-size: 12px;
    }

/* Blog Layout */
.blog-page {
    display: flex;
    gap: 30px;
    margin: 40px 0;
}

.blog-sidebar {
    flex: 0 0 280px;
}

.blog-main {
    flex: 1;
}

/* Filter Sidebar */
.filter-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--blog-shadow);
    position: sticky;
    top: 100px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

    .filter-header h3 {
        color: var(--blog-primary-color);
        font-size: 18px;
    }

.clear-filters {
    background: none;
    border: none;
    color: var(--blog-accent-color);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--blog-transition);
}

    .clear-filters:hover {
        color: #c0392b;
    }

.filter-group {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.filter-title {
    padding: 15px;
    background: #f9f9f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--blog-transition);
}

    .filter-title:hover {
        background: #f0f0f0;
    }

    .filter-title.active {
        background: var(--blog-light-color);
    }

    .filter-title h4 {
        margin: 0;
        font-size: 14px;
        color: var(--blog-primary-color);
    }

.filter-content {
    padding: 15px;
    display: none;
}

.filter-group:first-child .filter-content {
    display: block;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.filter-checkbox {
    margin-left: 10px;
}

.filter-option label {
    cursor: pointer;
    font-size: 14px;
}

.apply-filters {
    width: 100%;
    padding: 12px;
    background: var(--blog-secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--blog-transition);
    margin-top: 20px;
}

    .apply-filters:hover {
        background: #2980b9;
    }

/* Blog Header */
.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--blog-shadow);
}

.blog-info {
    color: #777;
    font-size: 14px;
}

.blog-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Blog Card - Unified Styles */
.blog-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    transition: var(--blog-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

    .blog-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }

.blog-image {
    height: 180px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .blog-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-image i {
    font-size: 48px;
    color: var(--blog-secondary-color);
}

.blog-category {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--blog-secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.blog-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--blog-primary-color);
    font-size: 18px;
    line-height: 1.4;
}

.blog-excerpt {
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
    line-height: 1.6;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 14px;
    margin-top: auto;
}

.blog-date, .blog-read-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Read More Button - Unified Styles */
.read-more {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--blog-secondary-color);
    color: white;
    font-weight: 600;
    border-radius: 25px;
    transition: var(--blog-transition);
    position: relative;
    overflow: hidden;
    text-align: center;
}

    .read-more::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        transition: left 0.5s;
    }

    .read-more:hover::before {
        left: 100%;
    }

    .read-more:hover {
        background: #2980b9;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

/* Loading Animation */
.skeleton-card {
    min-height: 350px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 20px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.load-more-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--blog-transition);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

    .load-more-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 7px 20px rgba(46, 204, 113, 0.4);
        background: linear-gradient(135deg, #27ae60, #219653);
    }

    .load-more-btn:active {
        transform: translateY(1px);
    }

    .load-more-btn:disabled {
        background: #bdc3c7;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    .load-more-btn .spinner {
        display: none;
        width: 18px;
        height: 18px;
        border: 2px solid transparent;
        border-top: 2px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    .load-more-btn.loading .spinner {
        display: block;
    }

    .load-more-btn.loading .btn-text {
        display: none;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Hidden Element */
#pagepostcontent {
    display: none;
}


/* Responsive */
@media (max-width: 768px) {
    .blog-page {
        flex-direction: column;
    }

    .blog-sidebar {
        flex: none;
        margin-bottom: 20px;
    }

    .blog-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .filter-section {
        position: static;
    }

}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

}
