/* Blog Archives Grid (Desktop/Tablet) */
@media (min-width: 769px) {
    .ast-container .ast-row {
        display: flex;
        flex-wrap: wrap;
    }
    
    #primary {
        width: 70%;
        padding-right: 30px;
    }
    
    #secondary {
        width: 30%;
        padding-left: 0;
    }

    /* Target Astra's native post wrapper */
    .ast-archive-post,
    .blog .site-main > article, 
    .archive .site-main > article, 
    .search-results .site-main > article {
        width: calc(50% - 15px);
        margin-right: 30px;
        margin-bottom: 30px;
        display: inline-block;
        vertical-align: top;
    }
    
    .ast-archive-post:nth-child(2n),
    .blog .site-main > article:nth-child(2n), 
    .archive .site-main > article:nth-child(2n), 
    .search-results .site-main > article:nth-child(2n) {
        margin-right: 0;
    }
}

/* Article Card Styling - Stronger Selectors */
article.post.ast-archive-post,
body.blog article.post, 
body.archive article.post,
body.search-results article.post {
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(84, 89, 95, 0.08) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    overflow: hidden !important;
    padding: 0 !important; /* Remove Astra default padding */
    display: flex !important;
    flex-direction: column !important;
}

article.post.ast-archive-post:hover,
body.blog article.post:hover, 
body.archive article.post:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(84, 89, 95, 0.12) !important;
}

/* Featured Image */
.post-thumb img,
.ast-blog-featured-section img {
    width: 100% !important;
    height: 240px !important;
    object-fit: cover !important;
    border-radius: 8px 8px 0 0 !important;
    margin-bottom: 0 !important;
}

/* Typography & Content */
.post-content.ast-archive-post-content,
.entry-header {
    padding: 1.5em 1.5em 0.5em !important;
}

.entry-title {
    font-size: 1.35rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.5em !important;
}

.entry-title a {
    color: #54595F !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.entry-title a:hover {
    color: #6EC1E4 !important;
}

.entry-meta {
    font-size: 0.85rem !important;
    color: #61CE70 !important;
    margin-bottom: 1em !important;
    padding: 0 1.5em !important;
}

.entry-meta a {
    color: #61CE70 !important;
}

.entry-meta a:hover {
    color: #6EC1E4 !important;
}

.entry-content {
    padding: 0 1.5em 1.5em !important;
    color: #7A7A7A !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    flex-grow: 1 !important;
}

/* Read More Button */
.ast-button, .button, .read-more {
    display: inline-block !important;
    background-color: #6EC1E4 !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease !important;
    font-weight: 600 !important;
    margin: 0 1.5em 1.5em !important;
}

.ast-button:hover, .button:hover, .read-more:hover {
    background-color: #61CE70 !important;
    color: #ffffff !important;
}

/* Sidebar Customization */
.widget-area .widget {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(84, 89, 95, 0.05);
    margin-bottom: 30px;
}

.widget-title {
    color: #54595F;
    font-size: 1.2rem;
    border-bottom: 2px solid #6EC1E4;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

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

.widget ul li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: #7A7A7A;
    text-decoration: none;
    transition: color 0.2s ease;
}

.widget ul li a:hover {
    color: #61CE70;
}

/* Single Post Readability enhancements */
.single-post .entry-content {
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
    color: #54595F !important;
    padding: 0 !important;
}

.single-post article.post {
    padding: 30px !important;
    box-shadow: 0 4px 12px rgba(84, 89, 95, 0.08) !important;
    border-radius: 8px !important;
    background: #ffffff !important;
}

.single-post .entry-title {
    font-size: 2.5rem !important;
    color: #54595F !important;
    margin-bottom: 0.5em !important;
}
