.blogs-scroll::-webkit-scrollbar {
    display: none;
}

.blogs-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.blog-preview-popup {
    position: relative;
    /* inside backdrop */
    transform: none;
    width: 90%;
    max-width: 700px;
    max-height: 75vh;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
    /* display: block by default inside backdrop */
}

.blog-preview-popup.active {
    opacity: 1;
    transform: scale(1);
    /* 👈 center me zoom-in */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.blog-preview-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #475569;
    cursor: pointer;
    font-size: 1.2rem;
}

.blog-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-backdrop.hidden {
    display: none;
}

.popup-header {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    /* buttons vertical stack */
    gap: 0.5rem;
    /* spacing between buttons */
    z-index: 10;
}

/* Mobile View Styling for Resources Section */
@media (max-width: 1023px) {
    #resources {
        margin-top: 1.5rem;
    }

    /* Show only 8 blogs (2 per row, 4 rows) on mobile */
    .blog-card:nth-child(n+9) {
        display: none !important;
    }

    /* Square Blog Cards on Mobile */
    .blog-card {
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
        overflow: hidden !important;
    }

    .blog-card img {
        height: 54% !important;
        object-fit: cover;
    }

    .blog-card .p-5 {
        padding: 0.75rem !important;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .blog-card .text-xs {
        font-size: 0.6rem !important;
        line-height: 1;
        margin: 0 !important;
    }

    .blog-card h3 {
        font-size: 0.9rem !important;
        line-height: 1.2;
        margin-bottom: 0.25rem !important;
    }

    .blog-card p {
        display: none !important;
    }

    .blog-card .mt-4 {
        display: none !important;
    }

    /* Smaller Read More button on mobile */
    .blog-card a {
        font-size: 0.65rem !important;
        padding: 0.5rem 0.75rem !important;
    }

    .blog-card a svg {
        width: 0.9rem !important;
        height: 0.9rem !important;
    }
}