/* --- BLOG SPECIFIC STYLES --- */
/* Single Post Styles */
.back-to-blog {
    display: inline-block;
    margin-bottom: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}
.back-to-blog:hover {
    color: var(--accent);
}
.blog-post {
	max-width: 800px;
	margin: 0 auto;
	padding: 40px 0;
	/* Prevents long words or strings from overflowing and breaking the layout */
	overflow-wrap: break-word;
}
.blog-post h1 { font-size: 2.5rem; margin-bottom: 20px; text-align: center; }
.blog-post h2 { font-size: 1.8rem; margin-top: 30px; margin-bottom: 15px; color: var(--primary); }
.blog-post p { margin-bottom: 15px; line-height: 1.7; }
.blog-post ul { list-style: disc; margin-left: 20px; margin-bottom: 15px; }
.blog-post ul li { margin-bottom: 8px; }
.blog-post strong { color: var(--primary); }

/* Blog Index/Grid Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}
.blog-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-card-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 10px;
}
.blog-card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary);
    text-transform: none;
}
.blog-card-readmore {
    margin-top: auto; /* Pushes to the bottom */
    font-weight: 700;
    color: var(--accent);
}

/* --- MOBILE RESPONSIVE for Blog --- */
@media (max-width: 768px) {
	.blog-post {
		/* Add horizontal padding on mobile to prevent text from touching screen edges */
		padding: 40px 24px;
	}
	.blog-post h1 { font-size: 1.8rem; }
	.blog-post h2 { font-size: 1.4rem; }
    .blog-grid {
        grid-template-columns: 1fr; /* Stack cards on mobile */
    }
}

/* Loader for infinite scroll */
.loader {
    text-align: center;
    padding: 20px;
    font-size: 1.2rem;
    color: var(--text-light);
    width: 100%;
    margin-top: 30px;
}