/* Styles specific to the blog index page content */

/* Blog Hero Section */
.blog-header {
    text-align: center;
    background: var(--box-gradient, linear-gradient(145deg, #bf73dd, #6E48AA));
    color: white;
    padding: 4rem 1rem; /* Vertical/horizontal padding */
    margin-bottom: 3rem; /* Space below the header */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    position: relative;
}

.blog-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 0.8rem;
    color: white;
    font-weight: 600;
}

.blog-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
    font-weight: 400;
}

/* Blog Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1rem; /* Add side padding for better mobile view */
    max-width: 1200px; /* Limit maximum width */
    margin: 0 auto; /* Center the grid */
}

/* Individual Article Card Styling */
.article-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px var(--shadow-light, rgba(0, 0, 0, 0.05));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--shadow, rgba(0, 0, 0, 0.1));
}

.article-image {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
}

.article-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-category {
    font-size: 0.8rem;
    color: var(--text-muted, var(--text));
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.article-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    color: var(--text);
    line-height: 1.3;
}

.article-excerpt {
    color: var(--text-muted, var(--text));
    opacity: 0.9;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted, var(--text));
    opacity: 0.7;
    margin-bottom: 1rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.article-link {
    display: inline-block;
    color: var(--accent-color, var(--text));
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
    margin-top: 0.5rem;
}

.article-link:hover {
    opacity: 0.8;
}

/* No-results message styling */
.no-articles-message {
    text-align: center;
    grid-column: 1 / -1;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 6px var(--shadow-light, rgba(0, 0, 0, 0.05));
}

.no-articles-message h2 {
    margin-bottom: 1rem;
    color: var(--text);
}

.no-articles-message p {
    color: var(--text-muted, var(--text));
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-header {
        padding: 3rem 1rem; /* Slightly smaller padding on mobile */
    }
    
    .blog-header h1 {
        font-size: clamp(1.8rem, 4.5vw, 2.2rem);
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .blog-header {
        padding: 2rem 1rem; /* Even smaller padding on tiny screens */
    }
    
    .article-title {
        font-size: 1.1rem;
    }
    
    .article-content {
        padding: 1rem;
    }
}