/* Advertisement Styles for Homepage */
.advertisements-section {
    margin: 30px 0;
    overflow: hidden;
    position: relative;
}

.advertisements-container {
    display: flex;
    flex-wrap: nowrap; /* Keep all items in one line */
    justify-content: flex-start; /* Start from left */
    gap: 20px;
    margin: 0;
    animation: scrollAdvertisements 30s linear infinite; /* Slower speed for reading */
    width: max-content; /* Allow container to expand */
}

.advertisement-item {
    flex: 0 0 300px; /* Fixed width, no shrinking or growing */
    width: 300px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.advertisement-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.advertisement-banner img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.advertisement-text {
    padding: 15px;
    background: white;
}

.advertisement-text h5 {
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.advertisement-text p {
    margin-bottom: 12px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.advertisement-text .btn {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.advertisement-text .btn-primary {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.advertisement-text .btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: white;
    text-decoration: none;
}

.advertisement-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.advertisement-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Responsive Design */
@media (max-width: 768px) {
    .advertisements-container {
        gap: 15px;
        animation-duration: 20s; /* Slower scrolling on mobile for reading */
    }
    
    .advertisement-item {
        flex: 0 0 250px; /* Smaller width on mobile */
        width: 250px;
    }
}

@media (max-width: 576px) {
    .advertisements-section {
        margin: 20px 0;
    }
    
    .advertisement-text {
        padding: 12px;
    }
    
    .advertisement-text h5 {
        font-size: 15px;
    }
    
    .advertisement-text p {
        font-size: 13px;
    }
}

/* Scrolling animation for advertisements */
@keyframes scrollAdvertisements {
    0% {
        transform: translateX(0%); /* Start from visible position */
    }
    100% {
        transform: translateX(-100%); /* Move to left side */
    }
}

/* Pause animation on hover */
.advertisements-container:hover {
    animation-play-state: paused;
}

/* Initial fade in animation for individual items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.advertisement-item {
    animation: fadeInUp 0.3s ease forwards; /* Faster fade in */
}

.advertisement-item:nth-child(1) { animation-delay: 0s; }
.advertisement-item:nth-child(2) { animation-delay: 0.05s; }
.advertisement-item:nth-child(3) { animation-delay: 0.1s; }
.advertisement-item:nth-child(4) { animation-delay: 0.15s; }
.advertisement-item:nth-child(5) { animation-delay: 0.2s; } 