/* Base styles that apply to all screen sizes */
body {
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

#header {
    transition: background-color 300ms ease;
}

/* Blog detail container */
.blog-detail {
    width: 100%;
    align-items: center;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.19);
    margin: 20px 0;
    color: black;
    box-sizing: border-box;
}

.blog-detail-content {
    all: unset;
}

.blog-detail h1,
.blog-detail h2,
.blog-detail h3,
.blog-detail h4,
.blog-detail h5,
.blog-detail h6 {
    color: black;
    word-wrap: break-word;
}

.blog-detail img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* Blog meta section (header area) */
.blog_meta {
    width: 100%;
    max-width: 1300px;
    padding: 0 20px;
    margin-top: 100px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.blog_meta_title h1 {
    color: #ffffff;
    font-family: var(--poppins);
    font-weight: 700;
    font-size: 32px;
    margin-right: 20px;
}

.blog_details_main {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.blog_details_heading {
    min-height: 300px;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.blog_meta_img {
    height: 280px;
    width: 380px;
    max-width: 100%;
    overflow: hidden;
    border-radius: 10px;
    margin: 0 auto;
}

.blog_meta_img img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

/* Blog main content area */
.blog_main_container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.blog_main_content {
    width: 100%;
    max-width: 1300px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Related blog section */
.related_blog {
    width: 28%;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
}

.blogs-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    overflow: hidden;
}

.related_blogs_heading {
    color: black;
    font-family: var(--poppins);
    font-size: 32px;
    font-weight: 600;
    margin-top: 30px;
}

/* Related blog cards */
.blogs_card_insights {
    width: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    background-color: #272727;
    overflow: hidden;
    margin-top: 20px;
    height: 300px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.blogs_card_insights:hover {
    transform: translateY(-5px);
}

.blog_image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px 10px 0px 0px;
    transition: all 300ms;
    object-position: top;
}

.blog_image:hover {
    transform: scale(1.03);
}

.blog_title {
    color: white;
    margin-top: 10px;
    margin-bottom: 8px;
}

.blog_content {
    padding: 20px;
    overflow: hidden;
}

.blog_content h3 {
    font-family: var(--poppins);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
}

.blog_description {
    color: white;
    font-family: var(--heading-font);
    font-size: 14px;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

.blog-full_content {
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blog-full_content p {
    line-height: 1.6;
}

.blog-full_content img {
    max-width: 100%;
    height: auto;
}

@media screen and (min-width: 1024px) {
    .blogs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-detail {
        width: 70%;
    }
    
    .blogs_card_insights {
        height: 300px;
    }
}

@media screen and (max-width: 1023px) {
    .blog_main_content {
        flex-direction: column;
    }
    
    .blog-detail {
        width: 100%;
        margin: 20px 0;
    }
    
    .related_blog {
        width: 100%;
    }
    
    .blog_meta {
        flex-direction: column;
        text-align: center;
        margin-top: 80px;
    }
    
    .blog_meta_title {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .blog_meta_title h1 {
        margin-right: 0;
        font-size: 28px;
    }
    
    .blog_meta_img {
        height: 240px;
        width: 320px;
    }
    
    .blog_details_heading {
        height: auto;
        padding-bottom: 30px;
    }
    
    .blogs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .blogs_card_insights {
        height: 280px;
    }
}

/* Mobile Styles (up to 767px) */
@media screen and (max-width: 767px) {
    .blog_meta_title h1 {
        font-size: 24px;
    }
    
    .blog_meta_img {
        height: 200px;
        width: 260px;
    }
    
    .blog-detail {
        padding: 20px 15px;
    }
    
    .related_blogs_heading {
        font-size: 24px;
        margin-top: 20px;
    }
    
    .blogs-grid {
        grid-template-columns: 1fr;
    }
    
    .blogs_card_insights {
        height: 260px;
    }
    
    .blog_content h3 {
        font-size: 16px;
    }
    
    .blog_description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .blog_content {
        padding: 15px;
    }
    
    .blog_image {
        height: 140px;
    }
}