/* CIM Faze – frontend. Stil namjerno prati izvorni dizajn. */
.cim-widget,
.cim-widget * {
    box-sizing: border-box;
}

.cim-widget .cim-outer-container {
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
    margin: 50px auto 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.cim-widget .cim-progress-bar-area {
    width: 100%;
    height: 24px;
    background-color: #e0e0e0;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    z-index: 1;
}

.cim-widget .cim-progress-bar-fill {
    height: 100%;
    background-color: #c9af65;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    border-radius: 0;
    transition: width .35s ease;
}

.cim-widget .cim-progress-divider {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background-color: #b39a53;
    transform: translateX(-1px);
    z-index: 4;
    pointer-events: none;
}

.cim-widget .cim-buttons-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(var(--cim-phase-count), minmax(0, 1fr));
    gap: 0;
    margin-top: 0;
    background-color: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
    z-index: 3;
}

.cim-widget .cim-button {
    appearance: none;
    -webkit-appearance: none;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    border: none;
    padding: 0 8px;
    margin: 0;
    cursor: pointer;
    transition: all 0.2s ease-out;
    position: relative;
    z-index: 1;
    font: inherit;
}

.cim-widget .cim-button-label {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    color: #1f488c;
    transition: color 0.2s ease-out;
}

.cim-widget .cim-button.active .cim-button-label {
    color: #fff;
}

.cim-widget .cim-button.active {
    background-color: #1f488c;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
    z-index: 5;
}

.cim-widget .cim-button:hover:not(.active) {
    background-color: #f8f8f8;
    box-shadow: 0 1px 5px rgba(0,0,0,0.03);
}

.cim-widget .cim-button:focus-visible {
    outline: 2px solid #1f488c;
    outline-offset: -2px;
}

.cim-widget .cim-button:not(:last-child)::after {
    content: '';
    position: absolute;
    top: -24px;
    right: 0;
    width: 1px;
    height: calc(24px + 48px);
    background-color: #b39a53;
    z-index: 4;
    pointer-events: none;
}

.cim-widget .cim-current-phase-text {
    font-family: "Montserrat", Sans-serif;
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 44px;
    color: #1F488C;
    margin-top: 40px;
    margin-bottom: 25px;
    text-align: center;
    width: 100%;
}

.cim-widget .cim-phase-descriptions {
    margin: 0 auto 50px auto;
    text-align: left;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 25px;
    min-height: 150px;
    width: 100%;
    max-width: 900px;
}

.cim-widget .cim-phase-description {
    display: none;
    animation: cimFadeIn 0.6s ease-out;
}

.cim-widget .cim-phase-description.active {
    display: block;
}

.cim-widget .cim-phase-description p {
    position: relative;
    padding-left: 35px;
    margin-top: 0;
    margin-bottom: 10px;
    color: #555;
    line-height: 1.6;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.cim-widget .cim-phase-description p::before {
    content: '';
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #1F488C;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    line-height: 1;
}

.cim-widget .cim-phase-description p.cim-checked::before {
    content: '✓';
    background-color: #1F488C;
    border-color: #1F488C;
}

.cim-widget .cim-phase-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.cim-widget .cim-phase-text {
    flex: 1;
    min-width: 0;
}

.cim-widget .cim-phase-image {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.cim-widget .cim-phase-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

@keyframes cimFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .cim-widget .cim-phase-content {
        flex-direction: column;
    }

    .cim-widget .cim-phase-image {
        margin-top: 15px;
        width: 100%;
    }
}
