/**
 * Comprehensive Carousel Component CSS
 * Consolidated from beste-etfs-anfaenger and other ratgeber pages
 * Include this file for full carousel functionality
 */

/* ========================================
   BROKER COMPARISON GRID CAROUSEL
   ======================================== */

/* Broker Comparison Grid Container */
.broker-comparison-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

/* Desktop: Hide carousel controls but show cards in normal grid */
.carousel-btn,
.carousel-indicators {
    display: none;
}

.carousel-track-container {
    overflow: visible;
}

.carousel-track {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    transform: none;
}

/* ========================================
   BROKER CARD STYLES
   ======================================== */

.broker-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius-large);
    padding: 2rem;
    text-align: center;
    position: relative;
    width: fit-content;
    min-width: 280px;
    max-width: 320px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    height: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.broker-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
    border-color: #bae6fd;
}

.broker-card.winner {
    border-color: #38bdf8;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.05) 0%, rgba(56, 189, 248, 0.02) 100%);
}

.broker-card.winner:hover {
    border-color: #38bdf8;
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.25);
}

/* Badge Styles */
.broker-card .badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #38bdf8;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    z-index: 10;
}

.broker-card.winner .badge {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Broker Card Content */
.broker-card img {
    max-width: 180px;
    height: 50px;
    margin: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}

.broker-card h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.broker-card .rating {
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.broker-card .features {
    margin-bottom: 1.5rem;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-item {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid transparent;
}

.feature-item strong {
    color: #1f2937;
    font-weight: 600;
}

/* Learn More Button */
.broker-card .learn-more {
    background: #38bdf8;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.broker-card .learn-more:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* ========================================
   MOBILE CAROUSEL FUNCTIONALITY
   ======================================== */

@media (max-width: 768px) {
    .carousel-btn,
    .carousel-indicators {
        display: flex;
    }
    
    /* Override the grid layout from ratgeber.css on mobile */
    .broker-comparison-grid {
        display: block;
        max-width: 350px;
        grid-template-columns: none;
        margin: auto;
        overflow: hidden;
        padding: 0 1rem;
        gap: 0;
    }
    
    .broker-comparison-grid .carousel-container {
        display: block;
        position: relative;
        width: 100%;
        margin: 0;
    }
    
    .broker-comparison-grid .carousel-track-container {
        overflow: hidden;
        border-radius: 12px;
        padding-top: 20px;
        width: 100%;
        position: relative;
        max-width: 100%;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }
    
    .carousel-track {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0;
        transition: transform 0.3s ease;
        width: 100%;
    }
    
    .broker-comparison-grid .carousel-item.broker-card,
    .broker-comparison-grid .broker-card,
    .carousel-container .broker-card {
        flex: 0 0 calc(100% - 1rem);
        min-width: calc(100% - 1rem);
        width: calc(100% - 1rem);
        max-width: calc(100% - 1rem);
        box-sizing: border-box;
        margin: 0 0.5rem;
        border: 1px solid #e5e7eb;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
        padding: 1.5rem;
        border-radius: var(--border-radius-large);
        background: white;
        text-align: center;
        position: relative;
        height: fit-content;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .broker-comparison-grid .carousel-item.broker-card.winner,
    .broker-comparison-grid .broker-card.winner,
    .carousel-container .broker-card.winner {
        border-color: #38bdf8;
        background: linear-gradient(135deg, rgba(56, 189, 248, 0.05) 0%, rgba(56, 189, 248, 0.02) 100%);
    }
    
    .broker-comparison-grid .carousel-item.broker-card:hover,
    .broker-comparison-grid .broker-card:hover,
    .carousel-container .broker-card:hover {
        transform: none;
    }
    
    .broker-comparison-grid .carousel-item.broker-card img,
    .broker-comparison-grid .broker-card img,
    .carousel-container .broker-card img {
        width: 80%;
        max-width: 180px;
        height: 50px;
        object-fit: contain;
        margin: auto;
        display: block;
        align-self: center;
    }
    
    .broker-comparison-grid .carousel-item.broker-card h3,
    .broker-comparison-grid .broker-card h3,
    .carousel-container .broker-card h3 {
        color: #1f2937;
        padding: 1rem;
        margin-bottom: 0rem;
        font-size: 1.25rem;
        font-weight: 700;
        text-align: center;
        width: 100%;
    }
    
    .broker-comparison-grid .carousel-item.broker-card .rating,
    .broker-comparison-grid .broker-card .rating,
    .carousel-container .broker-card .rating {
        color: #1f2937;
        margin-bottom: 1.5rem;
        font-size: 0.875rem;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        text-align: center;
        width: 100%;
    }
    
    .broker-comparison-grid .carousel-item.broker-card .features,
    .broker-comparison-grid .broker-card .features,
    .carousel-container .broker-card .features {
        margin-bottom: 1.5rem;
        text-align: left;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .broker-comparison-grid .carousel-item.broker-card .learn-more,
    .broker-comparison-grid .broker-card .learn-more,
    .carousel-container .broker-card .learn-more {
        background: var(--primary-color);
        color: white;
        text-decoration: none;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        font-weight: 600;
        transition: all 0.3s ease;
        display: block;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    
    .broker-comparison-grid .carousel-item.broker-card .learn-more:hover,
    .broker-comparison-grid .broker-card .learn-more:hover,
    .carousel-container .broker-card .learn-more:hover {
        background: #2350b0;
        color: white;
    }
    
    .broker-comparison-grid .carousel-item.broker-card .badge,
    .broker-comparison-grid .broker-card .badge,
    .carousel-container .broker-card .badge {
        position: absolute;
        top: -17px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 100;
        background: #38bdf8;
        color: white;
        padding: 0.4rem 0.8rem;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }
    
    .broker-comparison-grid .carousel-item.broker-card.winner .badge,
    .broker-comparison-grid .broker-card.winner .badge,
    .carousel-container .broker-card.winner .badge {
        background: linear-gradient(135deg, #38bdf8, #96caeb);
        box-shadow: 0 4px 10px rgb(70 159 220 / 40%);
    }
    
    /* Carousel Navigation Buttons */
    .carousel-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid #e5e7eb;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        font-weight: bold;
        color: #374151;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 100;
        pointer-events: auto;
        user-select: none;
    }
    
    .carousel-btn:hover {
        background: white;
        border-color: #38bdf8;
        color: #38bdf8;
    }
    
    .carousel-prev {
        left: -12px;
    }
    
    .carousel-next {
        right: -12px;
    }
    
    /* Carousel Indicators */
    .carousel-indicators {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: none;
        background: #d1d5db;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .indicator.active {
        background: #38bdf8;
    }
}

/* ========================================
   ALTERNATIVE CAROUSEL THEMES
   ======================================== */

/* Compact Theme */
.carousel-container.theme-compact .broker-card {
    min-width: 240px;
    max-width: 280px;
    padding: 1.5rem;
}

.carousel-container.theme-compact .broker-card h3 {
    font-size: 1.125rem;
}

/* Premium Theme */
.carousel-container.theme-premium .broker-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid transparent;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.carousel-container.theme-premium .broker-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
}

/* Dark Theme */
.carousel-container.theme-dark .broker-card {
    background: #1f2937;
    border-color: #374151;
    color: white;
}

.carousel-container.theme-dark .broker-card h3 {
    color: white;
}

.carousel-container.theme-dark .broker-card .learn-more {
    background: #60a5fa;
}

.carousel-container.theme-dark .broker-card .learn-more:hover {
    background: #3b82f6;
}

.carousel-container.theme-dark .carousel-btn {
    background: rgba(0, 0, 0, 0.8);
    border-color: #374151;
    color: white;
}

.carousel-container.theme-dark .carousel-btn:hover {
    background: #1f2937;
    border-color: #3b82f6;
}

.carousel-container.theme-dark .indicator {
    background: #4b5563;
}

.carousel-container.theme-dark .indicator.active {
    background: #60a5fa;
} 