/* Main Blog Styles */
:root {
    --primary-color-rgb: 106, 141, 115;
}

/* Blog Page Header */
.page-header {
    background-color: var(--secondary-color);
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../images/blog-header.jpg');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    text-align: center;
    color: white;
    margin-top: 5rem;
}

.page-header h1 {
    margin-bottom: 15px;
    font-size: 2.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    max-width: 600px;
    margin: 0 auto 20px;
    font-size: 1.1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.filter-actions {
    margin-top: 25px;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* Blog Grid Layout */
.blog-content {
    padding: 60px 0;
    background-color: var(--light-color);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.blog-post {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

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

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.post-date {
    color: #777;
}

.post-category {
    margin-left: auto;
}

.post-category a {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 3px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease;
}

.post-category a:hover {
    background-color: var(--primary-color-dark);
    text-decoration: none;
}

.post-content h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-content h2:after {
    display: none;
}

.post-content h2 a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-content h2 a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.post-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.read-more {
    display: inline-block;
    font-weight: 500;
    position: relative;
    padding-right: 20px;
    color: var(--primary-color);
    align-self: flex-start;
    margin-top: auto;
}

.read-more::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: right 0.2s ease;
}

.read-more:hover {
    text-decoration: none;
}

.read-more:hover::after {
    right: -5px;
}

/* No Posts Message */
.no-posts {
    text-align: center;
    padding: 50px 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.no-posts p {
    margin-bottom: 15px;
    color: #666;
}

.no-posts a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Blog Sidebar */
.blog-sidebar {
    background-color: #f5f5f5;
    padding: 60px 0;
}

.sidebar-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.sidebar-section {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.sidebar-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.sidebar-section h3:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Search Box */
.search-form {
    width: 100%;
}

.search-input-container {
    display: flex;
    position: relative;
}

.search-input-container input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-family: 'Raleway', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.search-input-container button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: var(--primary-color);
    transition: color 0.2s ease;
}

.search-input-container button:hover {
    color: var(--primary-color-dark);
}

/* Categories List */
.categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories li {
    margin-bottom: 5px;
}

.categories li:last-child {
    margin-bottom: 0;
}

.categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: #555;
    border-bottom: 1px solid #eee;
    transition: color 0.2s ease;
}

.categories a:hover, 
.categories a.active {
    color: var(--primary-color);
    text-decoration: none;
}

.categories a span {
    color: #999;
    font-size: 0.85rem;
    background-color: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.categories a:hover span,
.categories a.active span {
    background-color: var(--primary-color);
    color: white;
}

/* Popular Posts */
.popular-post {
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.popular-post:last-child {
    margin-bottom: 0;
}

.popular-post:hover {
    transform: translateY(-3px);
}

.popular-post a {
    display: flex;
    gap: 15px;
    color: inherit;
    text-decoration: none;
}

.popular-post a:hover {
    text-decoration: none;
}

.popular-post-image {
    flex: 0 0 80px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.popular-post:hover .popular-post-image img {
    transform: scale(1.1);
}

.popular-post-title {
    flex: 1;
}

.popular-post-title h4 {
    font-size: 1rem;
    margin: 0 0 5px 0;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.popular-post a:hover .popular-post-title h4 {
    color: var(--primary-color);
}

.popular-post-title .post-date {
    font-size: 0.8rem;
}

/* Subscribe Form */
.subscribe {
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

.newsletter-form {
    display: grid;
    gap: 15px;
}

.newsletter-form input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.newsletter-form .btn {
    width: 100%;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
}

.pagination a, 
.pagination .current-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 40px;
    padding: 0 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination a {
    background-color: white;
    color: #555;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pagination a:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

.pagination .current-page {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.prev-page, 
.next-page {
    padding: 0 20px;
}

.page-dots {
    color: #999;
    padding: 0 5px;
}

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

@media (max-width: 768px) {
    .page-header {
        padding: 60px 0;
        margin-top: 4rem;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-content,
    .blog-sidebar {
        padding: 40px 0;
    }
    
    .sidebar-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .post-category {
        margin-left: 0;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .pagination a, 
    .pagination .current-page {
        height: 36px;
        min-width: 36px;
        padding: 0 12px;
        font-size: 0.9rem;
    }
}