/* ==========================================================================
   Index Page Specific Styles
   ========================================================================== */

/* Container for rotation logic */
#rotatingFeaturedItems {
    position: relative;
    min-height: 500px;
    overflow: hidden;
}

/* Individual card block */
.rotating-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
    z-index: 1;
}

.rotating-item.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

/* Uniform image sizing */
.rotating-item img {
    max-height: 280px;
    object-fit: contain;
    width: 100%;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .marketfeatured-background-wrapper {
        padding-bottom: 100px;
    }

    .rotating-item {
        font-size: 0.95rem;
        padding-bottom: 1rem;
    }
}

/* Pause rotation on desktop hover */
@media (hover: hover) and (pointer: fine) {
    #rotatingFeaturedItems:hover {
        animation-play-state: paused !important;
    }
}

/* Side News Articles - Card Layout */
.side-article-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.side-article-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 193, 7, 0.5);
}

.side-article-card > a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.side-article-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.side-article-content {
    padding: 0.75rem;
}

.side-article-title {
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-article-card:hover .side-article-title {
    color: #ffc107;
}

.side-article-date {
    color: #adb5bd;
    font-size: 0.75rem;
}

/* Additional Index Page Styles */
.welcome-section,
.sponsor-section {
    width: 100%;
}

.member-listings-section {
    width: 100%;
}

.sponsor-hover {
    transition: transform 0.2s ease-in-out;
}

.sponsor-hover:hover {
    transform: scale(1.05);
}

.news-article-image {
    max-height: 400px;
    width: 100%;
    object-fit: cover;
}

/* Community Grid */
.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.swiper-slide.h-100 {
    height: 100%;
}
