/* ===== INSIGHTS CAROUSEL ===== */

.insights-section {
    max-width: 1400px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.insights-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #202124);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insights-header h3 i {
    color: #fbbf24;
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.carousel-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--gray-300, #d1d5db);
    background: var(--white, #ffffff);
    color: var(--gray-600, #4b5563);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.carousel-btn:hover {
    background: var(--primary, #4361ee);
    border-color: var(--primary, #4361ee);
    color: white;
    transform: scale(1.05);
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-indicator {
    font-size: 0.875rem;
    color: var(--gray-500, #6b7280);
    min-width: 60px;
    text-align: center;
}

/* Carousel Wrapper */
.insights-carousel-wrapper {
    overflow: hidden;
    position: relative;
}

.insights-carousel {
    display: flex;
    gap: 1rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Insight Card */
.insight-card {
    flex: 0 0 320px;
    min-width: 320px;
    background: var(--white, #ffffff);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid var(--gray-200, #e5e7eb);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Card types with colored left border */
.insight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 16px 0 0 16px;
}

.insight-card.type-excellent::before {
    background: linear-gradient(180deg, #10b981, #34d399);
}

.insight-card.type-good::before {
    background: linear-gradient(180deg, #3b82f6, #60a5fa);
}

.insight-card.type-warning::before {
    background: linear-gradient(180deg, #f59e0b, #fbbf24);
}

.insight-card.type-critical::before {
    background: linear-gradient(180deg, #ef4444, #f87171);
}

.insight-card.type-tip::before {
    background: linear-gradient(180deg, #8b5cf6, #a78bfa);
}

/* Card Header */
.insight-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.insight-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.insight-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #202124);
    flex: 1;
}

/* Card Body */
.insight-message {
    font-size: 0.9rem;
    color: var(--text-secondary, #5f6368);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

/* Card Footer */
.insight-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100, #f3f4f6);
}

.insight-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #202124);
}

.insight-benchmark {
    font-size: 0.75rem;
    color: var(--gray-500, #6b7280);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.insight-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.insight-badge.excellent {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.insight-badge.good {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.insight-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.insight-badge.critical {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.insight-badge.tip {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

/* Dark Mode */
[data-theme="dark"] .insights-header h3 {
    color: #ffffff;
}

[data-theme="dark"] .carousel-btn {
    background: #2d2d2d;
    border-color: #444;
    color: #ffffff;
}

[data-theme="dark"] .carousel-btn:hover {
    background: var(--primary, #4361ee);
}

[data-theme="dark"] .insight-card {
    background: #1e1e1e;
    border-color: #333;
}

[data-theme="dark"] .insight-title {
    color: #ffffff;
}

[data-theme="dark"] .insight-message {
    color: #b0b0b0;
}

[data-theme="dark"] .insight-value {
    color: #ffffff;
}

[data-theme="dark"] .insight-card-footer {
    border-color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .insight-card {
        flex: 0 0 280px;
        min-width: 280px;
    }

    .insights-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}