/* css/pages/blog.css */

/* === GENERAL PAGE & HEADER STYLES === */
.page-main-content {
    padding: 2rem 0 3rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, #eee);
}

.page-header h1 {
    font-size: clamp(2.2rem, 6vw, 3rem);
    color: var(--dark-color);
}

.page-header h1 .fas {
    margin-right: 1rem;
    color: var(--primary-color);
}

.page-header .page-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    color: var(--text-muted);
    font-style: italic;
    max-width: 650px;
    margin: 0 auto;
}


/* === BLOG LISTING PAGE STYLES === */
.blog-listing-section {
    /* This is the main wrapper for the grid on blog.html */
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Single column on mobile */
    gap: 2.5rem;
    /* Increased gap for better spacing */
}

/* Two columns on tablets */
@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Three columns on desktop */
@media (min-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.blog-card-image-link {
    display: block;
}

.blog-card-image-link img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    /* Ensures image covers the area without distortion */
    display: block;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image-link img {
    transform: scale(1.05);
    /* Subtle zoom effect on hover */
}


.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Makes sure the content area grows to fill space */
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    /* Allow meta items to wrap if needed */
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-meta .fas {
    margin-right: 0.35rem;
}

.blog-card-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    flex-grow: 1;
    /* Pushes the button to the bottom */
}

.blog-card-title a {
    color: var(--dark-color);
    text-decoration: none;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.blog-card .btn {
    align-self: flex-start;
    /* Align "Read More" button to the left */
}


/* === SINGLE BLOG POST PAGE STYLES === */
.blog-post-article {
    max-width: 800px;
    /* Constrain width for readability */
    margin: 0 auto;
}

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

.blog-post-header .post-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.blog-post-header h1 {
    font-size: clamp(2rem, 6vw, 3.2rem);
}

.blog-post-header .post-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-muted);
    font-style: italic;
    max-width: 700px;
    margin: 1rem auto 0 auto;
}

.post-feature-image {
    width: 100%;
    max-height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: var(--box-shadow);
}

.post-feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h2 {
    margin-top: 2.5rem;
    font-size: 1.8rem;
}

.post-content h3 {
    margin-top: 2rem;
    font-size: 1.5rem;
}

.post-content p,
.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
}

.post-content a {
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--primary-color-dark);
}

.post-content a:hover {
    background-color: var(--light-color);
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.post-content .content-image {
    margin: 2.5rem 0;
}

.post-content .content-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
}

.post-content .content-image figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    font-style: italic;
}