/* Blogs Section */
.blogs-section {
    margin-top: -5rem;
    padding: 3rem 0;
    background: #fff;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 10px;
}

.blog-card {
    border: none;
    border-radius: 5px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 6px 24px rgba(31, 41, 55, 0.10);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    backdrop-filter: blur(2px);
}

.blog-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.18);
    background: #fff;
}

.blog-card-img-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #f59e0b;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    z-index: 2;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.07);
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.blog-card-body {
    padding: 1.5rem 1.2rem 2.5rem 1.2rem;
    text-align: left;
    position: relative;
    min-height: 180px;
}

.blog-card-text,
.blog-card-author,
.blog-card-date,
.blog-card-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #f59e0b;
    margin-bottom: 1rem;
    font-weight: 500;
    font-family: 'Montserrat';
}

.blog-card-author-img-wrapper {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    z-index: 3;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.13);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid #f59e0b;
}

.blog-card-author-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: none;
}

.blog-card-img-wrapper {
    position: relative;
}

.blog-card-link {
    position: absolute;
    right: 1.2rem;
    bottom: 1.2rem;
    font-family: 'Montserrat', sans-serif;
    background: transparent;
    border: 1px solid #f59e0b;
    color: #676767;
    border-radius: 16px;
    padding: 0.32rem 1.1rem 0.32rem 1rem;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.13);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.blog-card-link:hover {
    background: #f59e0b;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.18);
    text-decoration: underline;
}

.blog-card-link i {
    margin-left: 0.3rem;
    font-size: 1rem;
    transition: transform 0.2s;
}

.blog-card-link:hover i {
    transform: translateX(4px);
}

.blog-card-date {
    position: absolute;
    left: 1.2rem;
    bottom: 1.2rem;
    font-family: 'Montserrat', sans-serif;
    background: #f3f4f6;
    color: #4a4a4a;
    border-radius: 16px;
    padding: 0.32rem 1.1rem 0.32rem 1rem;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.07);
    letter-spacing: 0.01em;
    border: none;
    display: inline-block;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.2rem;
    border-top: 1px solid #f3f4f6;
    background: #fafbfc;
    min-height: 48px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    margin-top: 0.2rem;
}

.blog-card-link,
.blog-card-date {
    position: static;
    margin: 0;
    box-shadow: none;
}

/* Staggered animation for blog cards */
@keyframes cardFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    opacity: 0;
    animation: cardFadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: var(--card-delay, 0s);
}

.blog-card.animated {
    opacity: 1;
}

@media (max-width: 991px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .blog-card-footer {
        padding: 0.5rem 0.7rem;
        min-height: 38px;
    }

    .blog-card-link,
    .blog-card-date {
        font-size: 0.82rem;
        padding: 0.18rem 0.6rem 0.18rem 0.6rem;
        border-radius: 10px;
    }

    .blog-card-img-wrapper {
        height: 150px;
    }

    .blog-card-title {
        font-size: 0.9rem;
    }

    .blog-card-author {
        font-size: 0.85rem;
    }

    .blog-card-body {
        padding: 1rem 0.7rem 2.2rem 0.7rem;
        min-height: 140px;
    }

    .blog-card-text {
        font-size: 0.78rem;
    }
}
/* Blog Filter Tabs (nav-tabs) Enhancement */
#blogFilterTabs {
    overflow: hidden;
    display: flex;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1.5rem;
}

#blogFilterTabs .nav-link {
}

#blogFilterTabs .nav-link {
    color: #6b7280;
    /* muted gray, matches the muted text color in the theme */
    font-weight: 600;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    margin-right: 0.25rem;
    margin-left: 0.25rem;
    padding: 0.6rem 1.3rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(31, 41, 55, 0.04);
    position: relative;
    z-index: 1;
}

#blogFilterTabs .nav-link.active {
    color: #1f2937;
    background: #fff;
    border-bottom: 2px solid #f59e0b;
    font-weight: 700;
    z-index: 2;
}

#blogFilterTabs .nav-link:hover,
#blogFilterTabs .nav-link:focus {
    background: #e0e7ef;
    color: #f59e0b;
}

@media (max-width: 768px) {
    #blogFilterTabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100vw;
        max-width: 100vw;
        padding-bottom: 0.5rem;
    }

    #blogFilterTabs::-webkit-scrollbar {
        display: none;
    }

    #blogFilterTabs .nav-link {
        white-space: nowrap;
        padding: 0.5rem 0.9rem;
        font-size: 0.97rem;
        margin-left: 0.1rem;
        margin-right: 0.1rem;
    }
}

