/* Map Rank Climb Animation - FIXED */
.map-rank-container {
    width: 100%;
    height: 250px; /* MATCHING OTHER IMAGES */
    background: #eef2f5;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center the list */
    border-bottom: 1px solid #eee;
}

/* Background Map Pattern - More distinct to match photo weight */
.map-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* CSS Pattern resembling city blocks/streets */
    background-image: 
        linear-gradient(#dbe4eb 2px, transparent 2px),
        linear-gradient(90deg, #dbe4eb 2px, transparent 2px);
    background-size: 40px 40px;
    background-position: center;
    opacity: 0.6;
    z-index: 1;
}

/* Vignette overlay to focus on the center list */
.map-rank-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.8) 100%);
    z-index: 1;
}

/* The List Container */
.rank-list {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 12px; /* Increased gap for better spacing */
    width: 80%;
    margin: 0 auto;
}

/* Generic Competitor Rows */
.rank-row {
    height: 44px; /* Slightly taller */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    padding: 0 15px;
    transition: all 0.5s ease;
    position: relative;
}

.rank-row.competitor {
    background: #fff;
    opacity: 0.7;
    filter: grayscale(100%);
}

/* The Client Row (The Hero) */
.rank-row.client {
    background: #fff;
    border: 2px solid #b87333; /* Brand Gold */
    opacity: 1;
    z-index: 20;
    animation: climbRank 4s infinite ease-in-out;
    box-shadow: 0 8px 20px rgba(184, 115, 51, 0.25);
}

/* Rank Number */
.rank-num {
    font-weight: 800;
    color: #cbd5e0;
    margin-right: 15px;
    font-size: 1.1rem;
    min-width: 20px;
}

.client .rank-num {
    color: #b87333;
}

/* Placeholder Bars for text */
.text-bar {
    height: 10px;
    border-radius: 5px;
    background: #e2e8f0;
    flex: 1;
}

.client .text-bar {
    background: linear-gradient(90deg, #b87333, #d68f4d); /* Gradient Gold */
}

/* Star Rating */
.stars {
    color: #f1c40f;
    font-size: 10px;
    margin-left: 10px;
    letter-spacing: 1px;
}

/* Animation Keyframes - adjusted for new height */
@keyframes climbRank {
    0% {
        transform: translateY(112px); /* Start at bottom position */
    }
    20% {
        transform: translateY(112px); /* Hold */
    }
    50% {
        transform: translateY(0); /* Move to top */
    }
    60% {
        transform: translateY(0) scale(1.03); /* Pop */
        box-shadow: 0 12px 25px rgba(184, 115, 51, 0.4);
    }
    90% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(0);
    }
}

/* Shuffle Animations - Smoother */
.rank-row.competitor.c1 { animation: shuffleDown1 4s infinite ease-in-out; }
.rank-row.competitor.c2 { animation: shuffleDown2 4s infinite ease-in-out; }
.rank-row.competitor.c3 { animation: shuffleDown3 4s infinite ease-in-out; }

@keyframes shuffleDown1 {
    0%, 20% { transform: translateY(0); }
    50%, 100% { transform: translateY(56px); }
}
@keyframes shuffleDown2 {
    0%, 20% { transform: translateY(0); }
    50%, 100% { transform: translateY(56px); }
}
@keyframes shuffleDown3 {
    0%, 20% { transform: translateY(0); }
    50%, 100% { transform: translateY(56px); }
}