/* ============================================
   Blog Listing Page Styles
   Styles for /blog (article list). Uses CSS
   variables from style.css. Load after style.css.
   ============================================ */

.blog-page {
    padding: 120px 0 80px;
    background-color: var(--bg-light);
    margin-top: 70px;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-header {
    text-align: center;
    margin-bottom: 4rem;
}

.blog-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.blog-header p {
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto;
}

.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Card image: mobile-first — preserve 1:1 aspect so image is never cropped (card images are square) */
.blog-card picture {
    display: block;
    width: 100%;
}

.blog-card-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.blog-card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-card-date {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.blog-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-card-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.blog-card-link:hover {
    color: var(--primary-dark);
}

.blog-card-link::after {
    content: '→';
    margin-left: 0.5rem;
    transition: var(--transition);
}

.blog-card-link:hover::after {
    transform: translateX(5px);
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Tablet and desktop: horizontal card layout, fixed image column */
@media (min-width: 769px) {
    .blog-card {
        flex-direction: row;
    }
    .blog-card picture {
        width: auto;
        flex-shrink: 0;
    }
    .blog-card-image {
        width: 400px;
        min-width: 300px;
        max-width: 400px;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2rem;
    }
}
