html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    color: #1e293b;
    background-color: #f8fafc;
}

/* ====================================================
   HERO SECTION
   ==================================================== */
.hero-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 30px 20px 20px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.d-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 1280px;
    width: 100%;
    margin: 30px auto 20px;
}

.main-blog-img {
    position: relative;
    width: 45%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-image {
    position: absolute;
    width: 75%;
    max-width: 380px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    z-index: 2;
    object-fit: cover;
}

.home-story-brush-patch {
    position: absolute;
    width: 90%;
    max-width: 440px;
    z-index: 1;
    opacity: 0.9;
}

#upper-sect {
    width: 55%;
    text-align: left;
}

.heading {
    font-weight: 800;
    color: #0f172a; 
    font-size: 2.4rem; 
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.causes-para {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #475569;
    margin: 0;
}

/* ====================================================
   MAIN BLOG GRID SECTION
   ==================================================== */
.blog-sect {    
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 20px 80px;
    box-sizing: border-box;
}

.blog-container {
    width: 100%;
    padding: 0;
    margin: 0;
}

.main-content-area {
    width: 100%;
    margin: 0;
    padding: 0;
}

.blog-list-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

/* ====================================================
   MODERN BLOG CARD (MATCHING USER SCREENSHOT)
   ==================================================== */
.blog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
    height: 100%;
    box-sizing: border-box;
    text-align: left;
    margin-bottom: 0;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1), 0 10px 15px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(255, 87, 34, 0.35);
}

/* Top Image with Overflow Hidden */
.image-div {
    order: 1;
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 0;
}

.blog-card:hover .blog-img {
    transform: scale(1.06);
}

/* Floating Category Tag (Top Left of Image) */
.domain {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #ff5722 !important;
    color: #ffffff !important;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 4px;
    text-transform: capitalize;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.35);
    letter-spacing: 0.3px;
    margin: 0;
    display: inline-block;
}

/* Date Row (Directly below Image) */
.blog-date {
    order: 2;
    background: transparent;
    padding: 16px 20px 2px;
    margin: 0;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.blog-date::before {
    content: "\f073";
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome", sans-serif;
    font-weight: 900;
    color: #ff5722;
    margin-right: 5px;
    font-size: 0.9rem;
    display: inline-block;
}

.blog-date .date {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin: 0;
    padding: 0;
    display: inline;
}

.blog-date .month {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    text-transform: none;
    display: inline;
}

/* Blog Content Details */
.blog-details {
    order: 3;
    padding: 2px 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.writer {
    order: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    margin: 0 0 10px 0;
}

.writer::before {
    content: "\f007";
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome", sans-serif;
    font-weight: 900;
    color: #ff5722;
    margin-right: 5px;
    font-size: 0.9rem;
    display: inline-block;
}

/* Blog Title */
.blog-title {
    order: 2;
    font-size: 1.18rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.42;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.2rem;
}

.blog-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.25s ease;
}

.blog-card:hover .blog-title a,
.blog-card:hover .blog-title {
    color: #ff5722;
}

/* Blog Summary / Info */
.blog-info {
    order: 3;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Hide old horizontal rule */
.blog-details hr, hr {
    display: none;
}

/* Read More Link */
.readmore {
    order: 4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #c2410c !important;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.25s ease;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    width: 100%;
}

.readmore:hover {
    color: #ff5722 !important;
    transform: translateX(4px);
}

.blog-card:hover .readmore {
    color: #ff5722 !important;
}

/* Hide unused sidebar if any */
.sidebar {
    display: none;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000; 
    overflow: hidden; 
}

.scroll-btn {
    background-color: #007bff; 
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%; 
    cursor: pointer;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.scroll-btn:hover {
    background-color: #0056b3; 
}

.scroll-btn i {
    font-size: 16px;
}

/* ====================================================
   RESPONSIVE DESIGN
   ==================================================== */
@media (max-width: 1100px) {
    .blog-list-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .d-flex {
        flex-direction: column;
        text-align: center;
        margin: 20px auto;
    }

    .main-blog-img {
        width: 100%;
        min-height: 260px;
    }

    #upper-sect {
        width: 100%;
        text-align: center;
    }

    .heading {
        font-size: 2rem;
    }

    .causes-para {
        font-size: 1rem;
    }
}

@media (max-width: 680px) {
    .blog-sect {
        padding: 15px 15px 60px;
    }

    .blog-list-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .heading {
        font-size: 1.7rem;
    }

    .image-div {
        height: 200px;
    }

    .blog-title {
        font-size: 1.1rem;
        min-height: auto;
    }
}
