/* Hero Section */
.blog-hero {
    background-image: url('../images/blog.jpg'); /* Adjust the path as needed */
    background-size: cover;
    background-position: center;
    height: 50vh; /* Half the viewport height */
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
}

.blog-hero-overlay {
    background: rgba(0, 0, 0, 0.5); /* Add a dark overlay */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blog-hero h1 {
    font-size: 3rem;
    text-align: center;
    font-weight: bold;
    margin: 0;
}

/* Blog Introduction Section */
.blog-intro {
    background: #f9f9f9; /* Light gray background for contrast */
    padding: 2rem 1rem;
    text-align: center;
}

.blog-intro .intro-container {
    max-width: 800px;
    margin: 0 auto;
}

.blog-intro p {
    font-size: 1.2rem;
    color: #555;
    line-height: 1.6;
}

/* Blog Articles Section */
.blog-articles {
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive 3-column layout */
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
}

.article-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.5rem;
}

.article-card p {
    margin: 0 1rem 1rem;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
}

.article-card .read-more {
    display: inline-block;
    margin: 1rem 0;
    padding: 0.5rem 1.5rem;
    color: #fff;
    background: #007bff;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.article-card .read-more:hover {
    background: #0056b3;
}

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

/* Blog Article Detail */
.blog-container {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
}

.blog-article-box {
    max-width: 800px;
    width: 100%;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow: hidden;
    line-height: 1.6;
    text-align: left;
}

.blog-article-box h1,
.blog-article-box h2,
.blog-article-box h3 {
    margin-top: 20px;
    color: #333;
}

.blog-article-box p {
    margin-bottom: 20px;
    color: #555;
}

.blog-article-box img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 20px 0;
}

/* Back to Blog Button */
.back-to-blog {
    display: inline-block;
    margin-top: 20px;
    color: #007BFF;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.back-to-blog:hover {
    color: #0056b3;
}

/* Blog Header */
.blog-header {
    position: relative;
    height: 50vh; 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.blog-header h1 {
    font-size: 2.5rem;
    background-color: rgba(0, 0, 0, 0.5); /* Optional translucent background */
    padding: 10px 20px;
    border-radius: 5px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .articles-container {
        grid-template-columns: 1fr; /* Single column on smaller screens */
    }

    .blog-article-box {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .article-card h3 {
        font-size: 1.2rem;
    }
}


/* Back to Blog Button */
.back-to-blog {
    display: inline-block;
    margin-top: 0px;
    margin-bottom: 20px;
    color: #007BFF;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.back-to-blog:hover {
    background-color: #007BFF;
    color: white;
    text-decoration: none;
}

/* Blog Content Container */
.blog-content-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding: 20px;
}

.blog-article-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}
