/* Process — i2t3 component styles
 * Horizontal sequence of steps. Markers show a number (numbered/connected) or an
 * icon (icon style). Default markers are outline circles that fill with the accent
 * colour on hover (Karma interaction). "connected" draws a continuous baseline.
 * The "shapes" styles add two concentric pulsing rings behind the marker.
 * Steps-per-row uses the shared i2t3_images_per_row column. Vertical sequences
 * are covered by the timeline element.
 */

.i2t3-process__step {
    position: relative;
    text-align: center;
}

/* Default marker — outline circle, fills with the accent colour on hover */
.i2t3-process__marker {
    width: 5.5rem;
    height: 5.5rem;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    border: 2px solid var(--i2t3-process-accent, #0d6efd);
    background: transparent;
    color: var(--i2t3-process-accent, #0d6efd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    transition: background-color .2s ease-in-out, color .2s ease-in-out, border-color .2s ease-in-out;
}

.i2t3-process__marker-content {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s ease-in-out;
}

/* sharp border — square marker instead of round */
.i2t3-process__marker--sharp {
    border-radius: 0;
}

.i2t3-process__step:hover .i2t3-process__marker {
    background-color: var(--i2t3-process-accent, #0d6efd);
    color: #fff;
}

.i2t3-process__title {
    margin-bottom: .5rem;
}

.i2t3-process__text > :last-child {
    margin-bottom: 0;
}

/* Horizontal connecting line between markers from the lg breakpoint up.
 * Applies to numbered and icon styles (Karma draws it for all horizontal styles). */
@media (min-width: 992px) {
    .i2t3-process--numbered .i2t3-process__step::before,
    .i2t3-process--icon .i2t3-process__step::before {
        content: "";
        position: absolute;
        top: 2.75rem;
        left: 75%;
        width: 50%;
        height: 2px;
        background: var(--i2t3-border-color, #dee2e6);
        z-index: 0;
    }
    .i2t3-process--numbered .row > div:last-child .i2t3-process__step::before,
    .i2t3-process--icon .row > div:last-child .i2t3-process__step::before {
        display: none;
    }
}

/* connected — ONE continuous line behind the markers (Karma process-connecting-line).
 * Smaller white-filled markers sit on top so the line passes behind them. */
.i2t3-process--connected .row {
    position: relative;
}
.i2t3-process--connected .i2t3-process__marker {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.1rem;
    background: #fff;
    border-width: 3px;
    margin-bottom: 1rem;
}
.i2t3-process--connected .row::before {
    content: "";
    position: absolute;
    /* gutter-y (g-4) pushes the columns/markers down; add it so the line hits
     * the marker centre (gutter + half of the 3.25rem marker). */
    top: calc(var(--bs-gutter-y, 1.5rem) + 1.625rem);
    left: 2rem;
    right: 2rem;
    height: 3px;
    background: var(--i2t3-border-color, #dee2e6);
    z-index: 0;
}
@media (max-width: 991.98px) {
    .i2t3-process--connected .row::before {
        display: none;
    }
}

/* vertical — left-aligned stack with a vertical connector line (Karma process-vertical) */
.i2t3-process--vertical .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
}
.i2t3-process--vertical .i2t3-process__step {
    display: flex;
    align-items: flex-start;
    text-align: left;
    position: relative;
    padding-bottom: 2.5rem;
}
.i2t3-process--vertical .i2t3-process__marker {
    width: 3.75rem;
    height: 3.75rem;
    flex: 0 0 3.75rem;
    margin: 0 1rem 0 0;
    font-size: 1.2rem;
}
.i2t3-process--vertical .i2t3-process__body {
    padding-top: .35rem;
}
.i2t3-process--vertical .i2t3-process__step::after {
    content: "";
    position: absolute;
    left: 1.875rem;           /* centre of the 3.75rem marker */
    top: 4.25rem;
    width: 2px;
    height: calc(100% - 4.5rem);
    background: var(--i2t3-border-color, #ededed);
    z-index: 0;
}
.i2t3-process--vertical .row > div:last-child .i2t3-process__step::after {
    display: none;
}

/* Shapes styles — marker sits inside two concentric pulsing rings.
 * The marker is filled by default (no hover-fill needed here). */
.i2t3-process--shapes .i2t3-process__step,
.i2t3-process--shapes-hover .i2t3-process__step,
.i2t3-process--shapes-always .i2t3-process__step {
    padding-top: 1.5rem;
}

.i2t3-process--shapes .i2t3-process__marker,
.i2t3-process--shapes-hover .i2t3-process__marker,
.i2t3-process--shapes-always .i2t3-process__marker {
    width: auto;
    height: auto;
    border: 0;
    background: transparent;
    margin-bottom: 1.2rem;
    overflow: visible;
}

.i2t3-process--shapes .i2t3-process__marker-content,
.i2t3-process--shapes-hover .i2t3-process__marker-content,
.i2t3-process--shapes-always .i2t3-process__marker-content {
    position: relative;
    width: 2.8rem;
    height: 2.8rem;
    background-color: var(--i2t3-process-accent, #0d6efd);
    border-radius: 50%;
    color: #fff;
    z-index: 3;
}

.i2t3-process--shapes .i2t3-process__marker--sharp .i2t3-process__marker-content,
.i2t3-process--shapes-hover .i2t3-process__marker--sharp .i2t3-process__marker-content,
.i2t3-process--shapes-always .i2t3-process__marker--sharp .i2t3-process__marker-content {
    border-radius: 0;
}

/* the two concentric rings */
.i2t3-process--shapes .i2t3-process__marker::before,
.i2t3-process--shapes .i2t3-process__marker::after,
.i2t3-process--shapes-hover .i2t3-process__marker::before,
.i2t3-process--shapes-hover .i2t3-process__marker::after,
.i2t3-process--shapes-always .i2t3-process__marker::before,
.i2t3-process--shapes-always .i2t3-process__marker::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2.8rem;
    height: 2.8rem;
    background-color: rgba(var(--i2t3-process-accent-rgb, 13,110,253), 1);
    border-radius: 50%;
    opacity: .6;
    transform: translate3d(-50%, -50%, 0) scale(1.5);
    transition: transform 1s ease;
    z-index: 2;
}
.i2t3-process--shapes .i2t3-process__marker::after,
.i2t3-process--shapes-hover .i2t3-process__marker::after,
.i2t3-process--shapes-always .i2t3-process__marker::after {
    opacity: .3;
    transform: translate3d(-50%, -50%, 0) scale(2);
    z-index: 1;
}

/* hover animate */
.i2t3-process--shapes-hover .i2t3-process__step:hover .i2t3-process__marker::before {
    animation-name: i2t3ProcessShapesScaleOne;
    animation-delay: 300ms;
}
.i2t3-process--shapes-hover .i2t3-process__step:hover .i2t3-process__marker::after {
    animation-name: i2t3ProcessShapesScaleTwo;
}
.i2t3-process--shapes-hover .i2t3-process__step:hover .i2t3-process__marker::before,
.i2t3-process--shapes-hover .i2t3-process__step:hover .i2t3-process__marker::after {
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-duration: 3s;
    animation-timing-function: linear;
}

/* always animate */
.i2t3-process--shapes-always .i2t3-process__marker::before {
    animation-name: i2t3ProcessShapesScaleOne;
    animation-delay: 300ms;
}
.i2t3-process--shapes-always .i2t3-process__marker::after {
    animation-name: i2t3ProcessShapesScaleTwo;
}
.i2t3-process--shapes-always .i2t3-process__marker::before,
.i2t3-process--shapes-always .i2t3-process__marker::after {
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-duration: 3s;
    animation-timing-function: linear;
}

@keyframes i2t3ProcessShapesScaleOne {
    0%   { opacity: .6; transform: translate3d(-50%, -50%, 0) scale(1.5); }
    25%  { opacity: 0;  transform: translate3d(-50%, -50%, 0) scale(1.8); }
    50%  { opacity: 0;  transform: translate3d(-50%, -50%, 0) scale(1); }
    100% { opacity: .6; transform: translate3d(-50%, -50%, 0) scale(1.5); }
}

@keyframes i2t3ProcessShapesScaleTwo {
    0%   { opacity: .3; transform: translate3d(-50%, -50%, 0) scale(2); }
    25%  { opacity: 0;  transform: translate3d(-50%, -50%, 0) scale(2.3); }
    50%  { opacity: 0;  transform: translate3d(-50%, -50%, 0) scale(1); }
    100% { opacity: .3; transform: translate3d(-50%, -50%, 0) scale(2); }
}

@media (prefers-reduced-motion: reduce) {
    .i2t3-process__marker,
    .i2t3-process__marker-content,
    .i2t3-process--shapes-hover .i2t3-process__step:hover .i2t3-process__marker::before,
    .i2t3-process--shapes-hover .i2t3-process__step:hover .i2t3-process__marker::after,
    .i2t3-process--shapes-always .i2t3-process__marker::before,
    .i2t3-process--shapes-always .i2t3-process__marker::after {
        animation: none;
        transition: none;
    }
}
