/* Feed Banner Carousel Styles */

.feed-banner-section {
    width: 100%;
    margin: 20px 0 30px;
}

.feed-banner-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f9f9f9;
}

/* Slides Container - Fluid width, fixed height approach */
.feed-banner-slides {
    position: relative;
    width: 100%;
    height: 280px; /* Fixed height matching card images */
}

.feed-banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.feed-banner-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.feed-banner-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.feed-banner-slide:not(:has(.feed-banner-link)) {
    cursor: default;
}

.feed-banner-image {
    display: block;
    width: 100%;
    height: 100%;
}

.feed-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Maintains aspect ratio, crops if needed */
    object-position: center;
    border-radius: 8px;
}

/* Progress Bar */
.feed-banner-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 10;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.feed-banner-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, #FFAC33, #FF9999);
    transition: width 0.1s linear;
}

.feed-banner-carousel.paused .feed-banner-progress-bar {
    transition: none;
}

/* Controls Container */
.feed-banner-controls {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 15;
    pointer-events: none;
}

/* Dots */
.feed-banner-dots {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.feed-banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(128, 128, 128, 0.6);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.feed-banner-dot:hover {
    background-color: rgba(128, 128, 128, 0.9);
    transform: scale(1.1);
}

.feed-banner-dot.active {
    width: 12px;
    height: 12px;
    background-color: rgba(0, 0, 0, 0.8);
}

/* Arrows */
.feed-banner-arrows {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.feed-banner-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #333;
    font-size: 12px;
    padding: 0;
    flex-shrink: 0; /* Prevents squishing */
}

.feed-banner-arrow:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.feed-banner-arrow:active {
    transform: scale(0.95);
}

.feed-banner-arrow i {
    pointer-events: none;
    line-height: 1;
}

/* Pause on hover is handled via JavaScript - see feed-banner.js */

/* Mobile Styles */
@media (max-width: 576px) {
    .feed-banner-slides {
        height: 200px; /* Shorter height on mobile */
    }
    
    .feed-banner-controls {
        bottom: 10px;
        padding: 0 15px;
    }
    
    .feed-banner-dot {
        width: 6px;
        height: 6px;
    }
    
    .feed-banner-dot.active {
        width: 10px;
        height: 10px;
    }
    
    /* Hide arrows on mobile (swipe instead) */
    .feed-banner-arrows {
        display: none;
    }
    
    .feed-banner-progress {
        height: 2px;
    }
}

/* Tablet Styles */
@media (min-width: 577px) and (max-width: 992px) {
    .feed-banner-slides {
        height: 240px; /* Medium height for tablet */
    }
}

/* Loading State */
.feed-banner-carousel.loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-banner-carousel.loading::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #4a6ee0;
    animation: spin 1s ease-in-out infinite;
}

/* Accessibility */
.feed-banner-dot:focus,
.feed-banner-arrow:focus {
    outline: 2px solid #4a6ee0;
    outline-offset: 2px;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .feed-banner-dot,
    .feed-banner-arrow {
        /* Larger touch targets */
        min-width: 44px;
        min-height: 44px;
    }
    
    .feed-banner-dot {
        width: 10px;
        height: 10px;
    }
    
    .feed-banner-dot.active {
        width: 14px;
        height: 14px;
    }
}