:root {
    --bg-dark: #121212;
    --text-muted: grey;
    --text-dark: #444444;
    --accent: #edb049;
    --dot-inactive: #e0e0e0;
    --spacing-sm: 10px;
    --spacing-md: 15px;
}

.recommendation-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    width: 100%;
    padding-bottom: 60px; /* Space for dots, managed by JS for min-height */
    overflow: hidden;
}

.recommendation {
    flex-direction: column;
    gap: var(--spacing-sm);
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0; /* Start hidden with opacity */
    transform: translate-X(100%); /* Start off-screen to the right */
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: transform, opacity;
    font-family: 'Poppins', sans-serif;
    pointer-events: none; /* Prevent interaction when not active */
}

.recommendation.active {
    opacity: 1;
    transform: translateX(0); /* Slide to center when active */
    position: relative; /* Stack correctly when active */
    pointer-events: auto; /* Allow interaction when active */
}

.recommendation-exit-left {
    transform: translateX(-100%);
    opacity: 0;
}

.recommendation-enter-right {
    transform: translateX(100%);
    opacity: 0;
}

.recommendation-exit-right {
    transform: translateX(100%);
    opacity: 0;
}

.recommendation-enter-left {
    transform: translateX(-100%);
    opacity: 0;
}

.recommendation-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.recommendation-avatar {
    width: 80px;
    height: 80px;
    border-radius: 0.5em;
}

.recommendation-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    justify-content: center;
}

.recommendations-panel {
    background-color: var(--bg-dark);
    border-radius: 5px;
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    margin-bottom: 20px;
}

.recommendation h2 {
    font-size: 20px;
    margin: 0;
    color: var(--accent);
}

.recommendation h3 {
    font-size: 18px;
    font-weight: 400;
    margin: 0;
    color: var(--text-muted);
}

.recommendation-date {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    color: var(--text-dark);
}

.recommendation-quote {
    padding-top: 10px;
    font-size: 16px;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.recommendation-dots {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    justify-content: center;
}

.dot {
    height: 10px;
    width: 10px;
    background-color: var(--dot-inactive);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--accent);
}


/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .recommendation {
        transition: none;
    }
    .recommendation-exit-left,
    .recommendation-enter-right,
    .recommendation-exit-right,
    .recommendation-enter-left {
        transform: none;
        opacity: 0; /* Keep hidden but no animation */
    }
    .recommendation.active {
        opacity: 1;
        transform: none;
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .recommendation-content {
        justify-content: flex-start;
        padding-bottom: 60px;
    }

    .recommendation-avatar {
        width: 80px;
        height: 80px;
    }

    .recommendation h2 {
        font-size: 18px;
    }

    .recommendation h3 {
        font-size: 16px;
    }

    .recommendation-date {
        font-size: 12px;
    }

    .recommendation-quote {
        font-size: 14px;
    }

    .recommendations-panel {
        padding: 8px;
    }

    .dot {
        height: 10px;
        width: 10px;
    }

    .recommendation-header {
        gap: var(--spacing-sm);
    }

    .recommendation-details {
        gap: 5px;
    }
}