/* Marquee container */
.ongoing-posts-marquee {
    overflow: hidden;
    white-space: nowrap;
    background-color: #ffffff;
    border-radius: 1rem;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 90vw;
    box-sizing: border-box;
    margin-top: 1rem;
}

/* Flash text animation */
@keyframes flash-text {
    0%, 100% { color: #d9fa7b; }
    50% { color: #cbacfe; }
}

.flash-text {
    animation: flash-text 2s infinite;
}

/* Flashing background animation */
@keyframes flash-background {
    0%, 100% { background-color: #d9fa7b }
    50% { background-color: #cbacfe; }
}

/* Header styling */
.ongoing-posts-marquee h3 {
    margin: 0.5rem;
    padding: 0 1rem;
    font-size: 1.7rem;
    animation: flash-background 2s linear infinite;
    border-radius: 5rem;
    display: inline-block;
}

/* Link styling */
.ongoing-posts-marquee a {
    text-decoration: none !important;
    color: #000 !important;
    margin: 0 15px;
}

.ongoing-posts-marquee a:hover {
    text-decoration: underline !important;
}

/* Main marquee content container */
.marquee-content {
    display: flex;
    animation: scroll-left 30s linear infinite;
    width: auto;
    align-items: center; /* Center items vertically */
    animation-delay:-10s;
}

/* Marquee scroll animation */
@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* For mobile view */
@media (max-width: 768px) {
    .marquee-content {
        animation: scroll-left-mobile 40s linear infinite;
        animation-delay: 0s;
        transform: translateX(50%);
    }
}

/* For extra small mobile screens */
@media (max-width: 480px) {
    .marquee-content {
        animation: scroll-left-mobile 45s linear infinite;
        animation-delay: 0s;
        transform: translateX(50%);
    }
}

/* Mobile scroll behavior */
@keyframes scroll-left-mobile {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}


/* Layout for the marquee inner content */
.marquee-inner {
    display: flex;
}

/* Individual post card styling */
.marquee-post-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: #f6f6f6;
    color: #333;
    border-radius: 5rem;
    padding: 0.5rem 1rem;
    margin: 0 1rem;
    box-shadow: 0 4px 10px rgba(1, 0, 1, 0.1);
    border: 2px solid black; /* Black border */
    overflow: hidden;
    min-width: 200px;
    max-width: 300px;
    height: auto; /* Allow height to be dynamic */
}

/* Image styling */
.ongoing-posts-marquee img {
    width: 70px; /* Increased width */
    height: auto;
    border-radius: .5rem;
    margin-right: 10px; /* Add margin to separate image and text */
}

/* Pause animation on hover */
.ongoing-posts-marquee:hover .marquee-content {
    animation-play-state: paused;
}
