/* individual_blogs.css */

/* Import the Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f2f5; /* Light grey background */
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main content container */
.blog-container {
    padding: 2rem 1rem; /* Padding around the main content */
    display: flex;
    justify-content: center; /* Center the article card */
    align-items: flex-start; /* Align to top */
    min-height: 100vh; /* Ensure it takes full viewport height */
}

/* Blog article card */
.blog-article {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
    max-width: 800px; /* Optimal width for readability */
    width: 100%; /* Ensures it takes full width on smaller screens */
    padding: 2.5rem; /* Generous internal padding */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 767px) {
    .blog-article {
        padding: 1.5rem; /* Reduce padding on smaller screens */
        border-radius: 0; /* No rounded corners on full-width mobile */
        box-shadow: none; /* No shadow on full-width mobile */
    }
}

/* Blog Post Title */
.blog-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    line-height: 1.3;
    text-align: center; /* Center the title */
}

@media (min-width: 768px) {
    .blog-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 767px) {
    .blog-title {
        font-size: 1.8rem;
    }
}

/* Author and Publication Date */
.blog-meta {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center; /* Center meta info */
    flex-wrap: wrap;
    gap: 0.75rem;
}

.blog-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-meta .meta-icon {
    width: 1rem;
    height: 1rem;
    color: #999;
}

.blog-meta .author-name {
    font-weight: 600;
    color: #444;
}

.blog-meta .meta-separator {
    color: #ccc;
}

/* Featured Image */
.featured-image {
    width: 100%;
    height: 300px; /* Image height */
    object-fit: cover;
    border-radius: 8px; /* Rounded corners for the image */
    margin-bottom: 2.5rem; /* Space below image */
    display: block;
}

@media (max-width: 767px) {
    .featured-image {
        height: 200px;
        border-radius: 0; /* No rounded corners on full-width mobile */
        margin-left: -1.5rem; /* Compensate for article padding */
        margin-right: -1.5rem; /* Compensate for article padding */
        width: calc(100% + 3rem); /* Make it truly full width relative to screen */
    }
}

/* Blog Post Content */
.blog-content {
    color: #333;
    line-height: 1.7;
    font-size: 1rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a202c;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 767px) {
    .blog-content h2 {
        font-size: 1.5rem;
    }
}

.blog-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
}

@media (max-width: 767px) {
    .blog-content h3 {
        font-size: 1.1rem;
    }
}

.blog-content ul,
.blog-content ol {
    list-style-position: outside;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-content ul li,
.blog-content ol li {
    margin-bottom: 0.7rem;
}

.conclusion-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #444;
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #eee;
}

/* Discover More Articles Section Styles */
.discover-more-blogs-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.discover-more-blogs-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 2.5rem;
}

@media (max-width: 767px) {
    .discover-more-blogs-section h2 {
        font-size: 1.6rem;
    }
}

.discover-blogs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto 2rem auto;
}

@media (max-width: 900px) {
    .discover-blogs-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        padding: 0 1rem;
    }
}

@media (max-width: 600px) {
    .discover-blogs-grid {
        grid-template-columns: 1fr;
    }
}

.discover-blog-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.discover-blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.discover-blog-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

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

.discover-blog-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discover-blog-card .card-date {
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.5rem;
}


/* Back to All Blogs Button */
.back-button-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.back-button {
    display: inline-block;
    background-color: #6b21a8; /* Purple button */
    color: #ffffff;
    font-weight: 500;
    padding: 0.9rem 2.2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.back-button:hover {
    background-color: #5a1a8c; /* Darker purple on hover */
    transform: translateY(-2px); /* Subtle lift effect */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}