/* =========================================
   BLOGS HERO
========================================= */

.blogs-hero {
    background: url('https://images.pexels.com/photos/1629236/pexels-photo-1629236.jpeg') center/cover no-repeat;
    position: relative;
    padding: 120px 0;
    text-align: center;
    color: #fff;
}

.blogs-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 25, 47, 0.75);
}

.blogs-hero .container {
    position: relative;
    z-index: 2;
}

.blogs-hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
}

.blogs-hero p {
    font-size: 18px;
    opacity: 0.9;
}


/* =========================================
   FEATURED SECTION
========================================= */

.featured-blog-section {
    padding: 80px 0 60px;
}

.featured-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.featured-blog-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    display: block;
}

.featured-blog-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.featured-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: #ffffff;
    padding: 25px 30px;
    border-radius: 14px;
    max-width: 85%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.featured-badge {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.featured-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #0f172a;
}

.meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #64748b;
}


/* =========================================
   RECENT POSTS SIDEBAR
========================================= */

.recent-posts {
    padding-top: 10px;
}

.recent-posts h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.recent-post-item {
    margin-bottom: 20px;
}

.recent-post-item a {
    text-decoration: none;
    color: #0f172a;
    font-weight: 500;
    display: block;
    transition: 0.3s;
}

.recent-post-item a:hover {
    color: #16a34a;
}

.recent-post-item span {
    font-size: 12px;
    color: #94a3b8;
}


/* =========================================
   ALL ARTICLES
========================================= */

.blogs-grid-section {
    padding: 40px 0 100px;
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 700;
}

/* =========================================
   ENHANCED ARTICLE CARDS
========================================= */

.blog-card {
    display: flex;
    gap: 25px;
    align-items: center;
    padding: 25px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

/* Green accent border animation */
.blog-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 2px solid #16a34a;
    opacity: 0;
    transform: scale(0.98);
    transition: all 0.35s ease;
}

/* Hover Effect */
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(22, 163, 74, 0.15);
}

.blog-card:hover::before {
    opacity: 1;
    transform: scale(1);
}

.blog-image-wrapper {
    width: 160px;
    height: 110px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.blog-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.blog-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.4;
}

.blog-content h3 a {
    text-decoration: none;
    color: #0f172a;
    transition: color 0.3s ease;
}

.blog-card:hover h3 a {
    color: #16a34a;
}

.blog-content p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 10px;
    line-height: 1.6;
}

.blog-meta {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    gap: 15px;
}


/* =========================================
   PAGINATION
========================================= */

.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination a {
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    transition: 0.3s;
}

.pagination a.active,
.pagination a:hover {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 992px) {

    .featured-layout {
        grid-template-columns: 1fr;
    }

    .featured-blog-card img {
        height: 300px;
    }

    .featured-content {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: -40px;
    }
}

@media (max-width: 768px) {

    .blogs-hero h1 {
        font-size: 32px;
    }

    .blog-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-image-wrapper {
        width: 100%;
        height: 200px;
    }

    .blog-image-wrapper img {
        border-radius: 12px;
    }
} 

.blog-card {
    display: flex;
    gap: 25px;
    align-items: center;
    padding-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;

    min-width: 0; /* 🔥 Important */
}

.blog-content {
    flex: 1;
    min-width: 0; /* 🔥 VERY IMPORTANT */
}

.blog-content h3,
.blog-content p {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.blog-meta {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;   /* 🔥 prevents overflow */
}

.blog-content {
    width: 100%;
}

/* ============================================= */
/* ===== PAGE LAYOUT GRID ====================== */
/* ============================================= */

.page-layout-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 60px;
}

.main-content-area {
    min-width: 0;
}

/* =========================================
   SIDEBAR LAYOUT
========================================= */

.sidebar-area {
    position: relative;
}

/* Sticky Sidebar */
.sidebar-area {
    position: sticky;
    top: 120px;
    align-self: start;
}

/* =========================================
   SIDEBAR CARD
========================================= */

.recent-posts-widget {
    position: relative;
    background: #ffffff;
    padding: 35px;
    border-radius: 18px;
    border: 1px solid rgba(34,197,94,0.4);
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    transition: 0.3s ease;
}

/* Strong Green Accent Strip */
.recent-posts-widget::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -1px;
    height: calc(100% + 2px);
    width: 5px;
    background: linear-gradient(180deg, #22c55e, #15803d);
    border-radius: 18px 0 0 18px;
}

/* =========================================
   WIDGET TITLE
========================================= */

.widget-title {
    font-family: 'Georgia', serif;
    font-size: 1.6rem;
    margin-bottom: 25px;
    color: #0f172a;
}

/* =========================================
   RECENT POST ITEMS
========================================= */

.recent-post-item {
    display: block;
    padding: 18px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    transition: all 0.3s ease;
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.5;
    margin-bottom: 6px;
    transition: 0.3s ease;
}

.recent-post-item .post-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Hover Interaction */
.recent-post-item:hover {
    padding-left: 10px;
    background: rgba(34,197,94,0.03);
    border-radius: 8px;
}

.recent-post-item:hover h4 {
    color: #16a34a;
}

.page-layout-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 60px;
}

.main-content-area {
    min-width: 0;
}


@media (max-width: 992px) {

    .page-layout-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-area {
        position: relative;
        top: auto;
        margin-top: 60px;
    }

    .recent-posts-widget::before {
        display: none;
    }
}


/* ============================================= */
/* ========= ON-SCROLL ANIMATION =============== */
/* ============================================= */

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}


.blog-content h3 a {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.blog-card {
    position: relative;
    z-index: 1;
}

.blog-content {
    position: relative;
    z-index: 2;
}
