/**
 * Homepage Blog Section Styles
 * File: /wp-content/themes/astra-child/assets/css/home-merged.css
 */

/* Blog Section Base */
.hsd-home-blog {
    padding: 4rem 0;
    background: #ffffff;
}

.hsd-home-blog .hsd-section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #111827;
    font-weight: 700;
}

/* Category Chips Row */
.hsd-blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hsd-category-chip {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 24px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.hsd-category-chip:hover {
    background: #22c55e;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(34, 197, 94, 0.2);
}

/* Blog Grid */
.hsd-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Post Card */
.hsd-post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.hsd-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.hsd-post-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Post Card Image */
.hsd-post-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
}

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

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

.hsd-post-card-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dcfce7 0%, #86efac 100%);
}

/* Post Card Content */
.hsd-post-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.hsd-post-category-chip {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #22c55e;
    color: #ffffff;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

.hsd-post-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post Card Meta */
.hsd-post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.hsd-post-card-meta time {
    color: #6b7280;
}

.hsd-post-meta-separator {
    color: #d1d5db;
}

.hsd-post-read-time {
    color: #6b7280;
}

/* Blog Actions */
.hsd-blog-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.hsd-btn-primary {
    display: inline-block;
    background: #22c55e;
    color: #ffffff;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: 2px solid #22c55e;
}

.hsd-btn-primary:hover {
    background: #16a34a;
    border-color: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.hsd-btn-text {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.hsd-btn-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #22c55e;
    transition: width 0.3s ease;
}

.hsd-btn-text:hover {
    color: #22c55e;
}

.hsd-btn-text:hover::after {
    width: 100%;
}

/* Empty State */
.hsd-blog-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.hsd-blog-empty p {
    font-size: 1.125rem;
    margin: 0;
}

/* Responsive Design */

/* Tablet - 2 columns */
@media (max-width: 1024px) and (min-width: 640px) {
    .hsd-blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .hsd-home-blog .hsd-section-title {
        font-size: 1.75rem;
    }
}

/* Mobile - 1 column */
@media (max-width: 639px) {
    .hsd-home-blog {
        padding: 3rem 0;
    }
    
    .hsd-home-blog .hsd-section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .hsd-blog-categories {
        gap: 0.5rem;
        margin-bottom: 2rem;
    }
    
    .hsd-category-chip {
        padding: 0.375rem 1rem;
        font-size: 0.8125rem;
    }
    
    .hsd-blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hsd-post-card-image {
        height: 180px;
    }
    
    .hsd-post-card-content {
        padding: 1.25rem;
    }
    
    .hsd-post-card-title {
        font-size: 1.125rem;
    }
    
    .hsd-post-card-excerpt {
        font-size: 0.875rem;
    }
    
    .hsd-blog-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hsd-btn-primary {
        width: 100%;
        text-align: center;
    }
}

/* Accessibility improvements */
.hsd-post-card-link:focus {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

.hsd-category-chip:focus,
.hsd-btn-primary:focus,
.hsd-btn-text:focus {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .hsd-home-blog {
        display: none;
    }
}