.progress-snake-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    overflow-x: auto;
    overflow: visible; /* Změněno z hidden */
}

.progress-snake {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: center;
    flex-wrap: nowrap;
}

/* Wrapper pro segment a dropdown */
.segment-wrapper {
    position: relative;
    display: inline-block;
}

.segment-wrapper[data-phase="0"] { width: 8.89%; }
.segment-wrapper[data-phase="1"] { width: 6.67%; }
.segment-wrapper[data-phase="2"] { width: 13.33%; }
.segment-wrapper[data-phase="3"] { width: 7.78%; }
.segment-wrapper[data-phase="4"] { width: 11.11%; }
.segment-wrapper[data-phase="5"] { width: 4.44%; }
.segment-wrapper[data-phase="6"] { width: 22.22%; }
.segment-wrapper[data-phase="7"] { width: 8.33%; }
.segment-wrapper[data-phase="8"] { width: 10.00%; }
.segment-wrapper[data-phase="9"] { width: 7.22%; }

.phase-segment {
    width: 100%;
    height: 60px;
    border: 2px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.segment-wrapper:first-child .phase-segment {
    border-top-left-radius: 30px;
    border-bottom-left-radius: 30px;
}

.segment-wrapper:last-child .phase-segment {
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
}

.phase-segment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.phase-segment.completed {
    background: #64d2b5;
    border-color: #64d2b5;
    color: white;
}

.phase-segment.active {
    background: #ff4f4f;
    border-color: #ff4f4f;
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 79, 79, 0.3);
    z-index: 10;
    border-radius: 5px;
}

.segment-wrapper:first-child .phase-segment.active {
    border-top-left-radius: 30px;
    border-bottom-left-radius: 30px;
}

.segment-wrapper:last-child .phase-segment.active {
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
}

/* Dropdown menu styly */
.phase-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateY(-10px);
}

.segment-wrapper:hover .phase-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-title {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    background: #f8f8f8;
    border-radius: 6px 6px 0 0;
}

.dropdown-item {
    padding: 10px 16px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 6px 6px;
}

.dropdown-item:hover {
    background: #f5f5f5;
    color: #333;
    padding-left: 20px;
}

.phase-labels {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 0;
    flex-wrap: nowrap;
}

.phase-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    line-height: 1.2;
    padding: 0 2px;
}

.segment-wrapper[data-phase="9"] .phase-dropdown {
    left: auto;
    right: 0;
}

.phase-label[data-phase="0"] { width: 8.89%; }
.phase-label[data-phase="1"] { width: 6.67%; }
.phase-label[data-phase="2"] { width: 13.33%; }
.phase-label[data-phase="3"] { width: 7.78%; }
.phase-label[data-phase="4"] { width: 11.11%; }
.phase-label[data-phase="5"] { width: 4.44%; }
.phase-label[data-phase="6"] { width: 22.22%; }
.phase-label[data-phase="7"] { width: 8.33%; }
.phase-label[data-phase="8"] { width: 10.00%; }
.phase-label[data-phase="9"] { width: 7.22%; }

.phase-label.active {
    color: #ff4f4f;
    font-weight: 600;
}

.phase-label.completed {
    color: #64d2b5;
    font-weight: 600;
}

@media (max-width: 768px) {
    #timeline {
        display: none;
    }

    .progress-snake-container {
        overflow-x: scroll;
        padding: 10px 5px 150px 5px;
    }

    .phase-segment {
        height: 50px;
        font-size: 12px;
    }

    .phase-label {
        font-size: 10px;
        height: 25px;
    }

    .phase-dropdown {
        min-width: 180px;
    }

    .dropdown-title {
        font-size: 12px;
        padding: 10px 12px;
    }

    .dropdown-item {
        font-size: 11px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .phase-dropdown {
        min-width: 160px;
    }
}