/* ====== BLOG HERO SECTION ====== */
.blog-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 0 0 20px 20px;
}

.blog-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.blog-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 25px;
    opacity: 0.9;
}

/* ====== BLOG CONTENT ====== */
.blog-content {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

.blog-main {
    flex: 2;
    order: 2; /* Move main content to right */
}

.blog-sidebar {
    flex: 1;
    order: 1; /* Move sidebar to left */
}

/* ====== BLOG POSTS GRID ====== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Always show 2 cards per row */
    gap: 30px;
    margin-bottom: 50px;
}

.post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: translateY(0);
}

.post-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.post-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.post-card:hover .post-image {
    transform: scale(1.1);
}

.post-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42, 125, 74, 0.3) 0%, rgba(31, 92, 55, 0.5) 100%);
    transition: all 0.4s ease;
}

.post-card:hover .post-image::after {
    background: linear-gradient(135deg, rgba(42, 125, 74, 0.5) 0%, rgba(31, 92, 55, 0.7) 100%);
}

.post-image i {
    z-index: 1;
    font-size: 3.5rem;
    transition: all 0.4s ease;
}

.post-card:hover .post-image i {
    transform: scale(1.2) rotate(5deg);
}

.post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--white);
    transition: all 0.3s ease;
}

.post-card:hover .post-content {
    background: linear-gradient(135deg, var(--white) 0%, var(--primary-light) 100%);
}

.post-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(42, 125, 74, 0.3);
}

.post-card:hover .post-category {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(42, 125, 74, 0.4);
}

.post-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--dark);
    flex-grow: 1;
    transition: all 0.3s ease;
}

.post-card:hover .post-title {
    color: var(--primary-dark);
    transform: translateX(5px);
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary);
}

.post-excerpt {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-card:hover .post-excerpt {
    color: var(--gray-dark);
    transform: translateX(5px);
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--gray-light);
    transition: all 0.3s ease;
}

.post-card:hover .post-meta {
    border-top-color: var(--primary-light);
    transform: translateX(5px);
}

.post-date {
    color: var(--gray);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.post-card:hover .post-date {
    color: var(--primary);
    font-weight: 600;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-light);
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(42, 125, 74, 0.2);
}

.read-more:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 125, 74, 0.4);
}

.read-more i {
    transition: all 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* ====== SIDEBAR ====== */
.sidebar-widget {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.sidebar-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-light);
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.sidebar-widget:hover h3 {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.sidebar-widget h3 i {
    color: var(--primary);
    transition: all 0.3s ease;
}

.sidebar-widget:hover h3 i {
    transform: scale(1.2);
}

.categories-list {
    list-style: none;
}

.categories-list li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-light);
    transition: all 0.3s ease;
}

.categories-list li:hover {
    transform: translateX(5px);
    border-bottom-color: var(--primary-light);
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    color: var(--gray-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.categories-list a:hover {
    color: var(--primary);
    font-weight: 600;
}

.categories-list .count {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.categories-list li:hover .count {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(42, 125, 74, 0.3);
}

.popular-posts {
    list-style: none;
}

.popular-post {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
    transition: all 0.3s ease;
}

.popular-post:hover {
    transform: translateX(5px);
    border-bottom-color: var(--primary-light);
}

.popular-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post-img {
    width: 70px;
    height: 70px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.popular-post:hover .popular-post-img {
    transform: scale(1.1) rotate(5deg);
}

.popular-post-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42, 125, 74, 0.3) 0%, rgba(31, 92, 55, 0.5) 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.popular-post:hover .popular-post-img::after {
    background: linear-gradient(135deg, rgba(42, 125, 74, 0.5) 0%, rgba(31, 92, 55, 0.7) 100%);
}

.popular-post-img i {
    z-index: 1;
    transition: all 0.3s ease;
}

.popular-post:hover .popular-post-img i {
    transform: scale(1.2);
}

.popular-post-content h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.popular-post:hover .popular-post-content h4 {
    color: var(--primary);
}

.popular-post-content h4 a {
    color: inherit;
    text-decoration: none;
}

.popular-post-content h4 a:hover {
    color: var(--primary-dark);
}

.popular-post-content .date {
    font-size: 0.8rem;
    color: var(--gray);
    transition: all 0.3s ease;
}

.popular-post:hover .popular-post-content .date {
    color: var(--primary);
    font-weight: 600;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form input {
    padding: 12px 15px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42, 125, 74, 0.1);
    transform: translateY(-2px);
}

.newsletter-form .btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(42, 125, 74, 0.3);
}

.newsletter-form .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(42, 125, 74, 0.4);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* ====== PAGINATION ====== */
.pagination {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
    gap: 5px;
}

.pagination a,
.pagination span {
    margin: 0 2px;
    padding: 12px 18px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    color: var(--gray-dark);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
}

.pagination a:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(42, 125, 74, 0.3);
}

.pagination .current {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 125, 74, 0.3);
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr); /* Maintain 2 cards on larger tablets */
    }
}

@media (max-width: 992px) {
    .blog-content {
        flex-direction: column;
    }
    
    .blog-main {
        order: 1; /* Main content first on mobile */
    }
    
    .blog-sidebar {
        order: 2; /* Sidebar after content on mobile */
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards on tablets */
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr; /* 1 card on mobile */
    }
    
    .blog-sidebar {
        grid-template-columns: 1fr; /* Single column sidebar on mobile */
    }
    
    .blog-hero h1 {
        font-size: 2.2rem;
    }
    
    .blog-hero p {
        font-size: 1.1rem;
    }
    
    .post-card:hover {
        transform: translateY(-10px) scale(1.01); /* Reduced pop effect on mobile */
    }
}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .post-content {
        padding: 20px;
    }
    
    .post-image {
        height: 180px;
    }
    
    .blog-hero {
        padding: 60px 0;
    }
    
    .blog-hero h1 {
        font-size: 1.8rem;
    }
}

/* Animation for card pop-up effect */
@keyframes cardPopUp {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: var(--shadow);
    }
    100% {
        transform: translateY(-15px) scale(1.02);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    }
}

.post-card {
    animation: none;
}

.post-card:hover {
    animation: cardPopUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Smooth transitions for all interactive elements */
.post-card,
.sidebar-widget,
.categories-list li,
.popular-post,
.read-more,
.pagination a,
.newsletter-form .btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effects for buttons throughout the blog */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(42, 125, 74, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}
/* ====== SINGLE POST STYLES ====== */

/* Single Post Hero */
.single-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--white);
    opacity: 0.8;
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 1;
}

.breadcrumb .separator {
    opacity: 0.6;
}

.breadcrumb .current {
    opacity: 1;
    font-weight: 600;
}

.post-header {
    text-align: center;
}

.post-header .post-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.post-header .post-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.post-meta i {
    font-size: 0.8rem;
}

/* Single Content Layout */
.single-content {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

.single-main {
    flex: 2;
}

.single-sidebar {
    flex: 1;
}

/* Post Content */
.post-content {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.featured-image {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
}

.post-featured-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.post-body {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--dark);
}

.post-body h2,
.post-body h3,
.post-body h4 {
    margin: 30px 0 15px;
    color: var(--dark);
}

.post-body h2 {
    font-size: 1.8rem;
}

.post-body h3 {
    font-size: 1.5rem;
}

.post-body h4 {
    font-size: 1.3rem;
}

.post-body p {
    margin-bottom: 20px;
}

.post-body ul,
.post-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--gray-dark);
    background: var(--primary-light);
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

/* Post Tags */
.post-tags {
    margin: 40px 0;
    padding-top: 30px;
    border-top: 1px solid var(--gray-light);
}

.tags-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-label {
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag {
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary);
    color: var(--white);
}

/* Share Buttons */
.post-share {
    margin: 40px 0;
    padding: 30px;
    background: var(--primary-light);
    border-radius: 12px;
    text-align: center;
}

.post-share h4 {
    margin-bottom: 20px;
    color: var(--dark);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.pinterest { background: #bd081c; }

/* Author Bio */
.author-bio {
    display: flex;
    gap: 20px;
    padding: 30px;
    background: var(--primary-light);
    border-radius: 12px;
    margin: 40px 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.author-info h4 {
    margin-bottom: 10px;
    color: var(--dark);
}

.author-info p {
    margin: 0;
    color: var(--gray-dark);
    line-height: 1.6;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid var(--gray-light);
    border-bottom: 1px solid var(--gray-light);
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous a,
.nav-next a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 8px;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.nav-next {
    text-align: right;
}

/* Related Posts */
.related-posts {
    margin: 60px 0;
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--dark);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.related-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.related-image {
    height: 120px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.related-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-icon {
    color: var(--primary);
    font-size: 2rem;
}

.related-content {
    padding: 20px;
}

.related-content .post-category {
    background: linear-gradient(135deg, #f8a735 0%, #e69520 100%);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
}

.related-content h4 {
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.4;
}

.related-content h4 a {
    color: var(--dark);
    text-decoration: none;
}

.related-content h4 a:hover {
    color: var(--primary);
}

.related-content .post-date {
    color: var(--gray);
    font-size: 0.8rem;
}

/* Comments */
.comments-section {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
}

/* Responsive Design */
@media (max-width: 992px) {
    .single-content {
        flex-direction: column;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .post-header .post-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .post-content {
        padding: 30px 20px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 15px;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .post-header .post-title {
        font-size: 1.6rem;
    }
    
    .post-body {
        font-size: 1rem;
    }
    
    .comments-section {
        padding: 20px;
    }
}