/* Variables */
:root {
    --primary-color: #1a3c6e;
    --secondary-color: #f0a500;
    --text-color: #333;
    --background-color: #f5f7fa;
    --card-background: #ffffff;
    --primary-hover-color: #14305a;
}

/* Blog-specific styles that extend the main styles.css */
.blog-main {
    padding: 60px 0;
    background-color: var(--background-color);
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 36px;
}

.blog-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.blog-post-card {
    background-color: var(--card-background);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-5px);
}

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

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

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

.post-content {
    padding: 20px;
}

.post-title {
    margin: 0 0 10px;
    font-size: 24px;
}

.post-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: var(--secondary-color);
}

.post-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.category {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.category:hover {
    background-color: var(--primary-hover-color);
}

.post-excerpt {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    position: relative;
    padding-right: 20px;
}

.read-more:after {
    content: '→';
    position: absolute;
    right: 0;
    transition: transform 0.3s;
}

.read-more:hover:after {
    transform: translateX(5px);
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.blog-search {
    display: flex;
    gap: 10px;
}

.blog-search input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.blog-search button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.blog-search button:hover {
    background-color: var(--primary-hover-color);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list li.active a {
    color: #f0a500;
    font-weight: bold;
}

.category-list a {
    color: #333;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    transition: color 0.3s;
}

.category-list a:hover {
    color: var(--primary-color);
}

.category-list .count {
    color: #999;
    font-size: 12px;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.tag:hover,
.tag.active {
    background-color: var(--secondary-color);
    color: white;
}

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

.pagination-link,
.pagination-prev,
.pagination-next {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.pagination-link:hover,
.pagination-prev:hover,
.pagination-next:hover {
    background-color: #f0f0f0;
}

.pagination-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-ellipsis {
    color: #999;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 20px;
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    color: #666;
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin-left: 10px;
    color: #999;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* No posts message */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-posts h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

/* Error 404 */
.error-404 {
    text-align: center;
    padding: 60px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.error-404 h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 48px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #d89400;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 28px;
    }

    .post-title {
        font-size: 20px;
    }

    .blog-sidebar {
        grid-template-columns: 1fr;
    }

    .post-meta {
        font-size: 12px;
        gap: 10px;
        flex-direction: column;
        gap: 5px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .blog-main {
        padding: 40px 0;
    }

    .container {
        padding: 0 15px;
    }

    .post-content {
        padding: 15px;
    }

    .sidebar-widget {
        padding: 15px;
    }
}
