/* Home page: "Our services" showcase (views/site/_services-showcase.php, assets/js/home-services.js) */
.sv {
    --sv-dur: 9s;
    position: relative;
}
.sv-layer {
    display: block;
    position: relative;
    height: 20px;
    border-radius: 30px 30px 0 0;
    background: #fff;
    box-shadow: 0 0 200px rgba(0, 0, 0, .1);
}
.sv-layer-back { margin: 0 59px; }
.sv-layer-front { margin: 0 30px; }
.sv-body {
    position: relative;
    padding: 28px;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 0 200px rgba(0, 0, 0, .1);
}

/* header */
.sv-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, rgba(238, 93, 56, .55), rgba(238, 93, 56, 0) 70%) 1;
}
[dir="rtl"] .sv-head {
    border-image: linear-gradient(270deg, rgba(238, 93, 56, .55), rgba(238, 93, 56, 0) 70%) 1;
}
.sv-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 60px;
    height: 66px;
    border-radius: 18px;
    border-start-start-radius: 6px;
    color: #EE5D38;
    background: #F7DBD4;
}
.sv-head-text {
    flex: 1;
    min-width: 0;
}
.sv-title {
    font-size: 26px;
    line-height: 1.5;
    color: #110E2D;
}
.sv-sub {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.9;
    color: rgba(17, 14, 45, .5);
}
.sv-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.sv-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(17, 14, 45, .12);
    border-radius: 999px;
    color: #110E2D;
    background: #fff;
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.sv-toggle:hover {
    border-color: #EE5D38;
    color: #EE5D38;
}
.sv-ico-play,
.sv-label-play,
.sv:not(.is-playing) .sv-ico-pause,
.sv:not(.is-playing) .sv-label-pause {
    display: none;
}
.sv:not(.is-playing) .sv-ico-play,
.sv:not(.is-playing) .sv-label-play {
    display: inline;
}
.sv-counter {
    min-width: 64px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    background: #110E2D;
    font-size: 13px;
    text-align: center;
}
.sv:not(.sv-ready) .sv-controls {
    display: none;
}

/* list */
.sv-grid {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 22px;
    margin-top: 22px;
}
.sv-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sv-item {
    position: relative;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: #110E2D;
    font-size: 14.5px;
    line-height: 1.6;
    transition: background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.sv-item:hover {
    border-color: rgba(238, 93, 56, .3);
    background: #FFF8F5;
}
.sv-item:focus-visible {
    outline: 2px solid #EE5D38;
    outline-offset: 2px;
}
.sv-item-num {
    width: 22px;
    font-size: 12px;
    color: rgba(17, 14, 45, .35);
}
.sv-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #F4F6FA;
    overflow: hidden;
}
.sv-item-icon svg,
.sv-item-icon img {
    width: 20px;
    height: 20px;
}
.sv-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sv-ring {
    width: 24px;
    height: 24px;
    transform: rotate(-90deg);
    opacity: 0;
}
.sv-ring circle {
    fill: none;
    stroke-width: 3.5;
}
.sv-ring-bg {
    stroke: rgba(255, 255, 255, .18);
}
.sv-ring-fill {
    stroke: #EE5D38;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}
.sv-item.is-active {
    color: #fff;
    background: linear-gradient(135deg, #110E2D, #241E58);
    box-shadow: 0 14px 28px -16px rgba(17, 14, 45, .8);
}
.sv-item.is-active .sv-item-num {
    color: #FF9A6B;
}
.sv-item.is-active .sv-item-icon {
    background: #fff;
}
/* a little nub pointing at the panel */
.sv-item.is-active::after {
    content: "";
    position: absolute;
    top: 50%;
    inset-inline-end: -7px;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-radius: 3px;
    background: #241E58;
    transform: rotate(45deg);
}
.sv.is-playing .sv-item.is-active .sv-ring {
    opacity: 1;
}
.sv.is-playing .sv-item.is-active .sv-ring-fill {
    animation: svFill var(--sv-dur) linear forwards;
}
.sv.is-hold .sv-item.is-active .sv-ring-fill {
    animation-play-state: paused;
}
@keyframes svFill {
    to { stroke-dashoffset: 0; }
}

/* stage */
.sv-stage {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    color: #fff;
    background:
        radial-gradient(420px circle at 85% 0, rgba(238, 93, 56, .28), transparent 70%),
        radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.4px) 0 0 / 18px 18px,
        linear-gradient(135deg, #110E2D, #221C54);
    box-shadow: 0 24px 50px -24px rgba(17, 14, 45, .7);
    touch-action: pan-y;
}
[dir="rtl"] .sv-stage {
    background:
        radial-gradient(420px circle at 15% 0, rgba(238, 93, 56, .28), transparent 70%),
        radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.4px) 0 0 / 18px 18px,
        linear-gradient(225deg, #110E2D, #221C54);
}
.sv-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 38px 40px 34px;
}
.sv-panel[hidden] {
    display: none;
}
.sv-panel.is-active {
    animation: svIn .55s cubic-bezier(.2, .7, .2, 1);
}
@keyframes svIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
.sv-panel-num {
    position: absolute;
    top: 8px;
    inset-inline-end: 28px;
    font-size: 130px;
    font-weight: 900;
    line-height: 1;
    color: rgba(255, 255, 255, .05);
    pointer-events: none;
}
.sv-panel-top {
    display: flex;
    align-items: center;
    gap: 18px;
}
.sv-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 84px;
    height: 84px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, .05), 0 16px 30px -12px rgba(238, 93, 56, .6);
}
.sv-panel-icon svg,
.sv-panel-icon img {
    width: 44px;
    height: 44px;
}
.sv-panel-en {
    font-family: Montserrat, MontserratBold, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #FF9A6B;
}
[dir="rtl"] .sv-panel-en {
    text-align: right;
}
.sv-panel-title {
    margin-top: 4px;
    font-size: 30px;
    line-height: 1.5;
    color: #fff;
}
.sv-panel-lead {
    margin-top: 22px;
    font-size: 16px;
    line-height: 2;
    color: rgba(255, 255, 255, .9);
}
.sv-panel-text {
    margin-top: 10px;
    font-size: 14.5px;
    line-height: 2.15;
    color: rgba(255, 255, 255, .62);
    text-align: justify;
}
.sv-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
    padding-top: 26px;
}
.sv-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    transition: transform .2s, background .2s;
}
.sv-btn:hover {
    transform: translateY(-2px);
}
.sv-btn-main {
    color: #fff;
    background: linear-gradient(135deg, #EE5D38, #FF7A4C);
    box-shadow: 0 12px 26px -12px rgba(238, 93, 56, .95);
}
.sv-btn-ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .05);
}
.sv-btn-ghost:hover {
    background: rgba(255, 255, 255, .12);
}

@media (max-width: 1023px) {
    .sv-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
    .sv-list {
        flex-direction: row;
        gap: 8px;
        margin-inline: -28px;
        padding: 2px 28px 6px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .sv-list::-webkit-scrollbar {
        display: none;
    }
    .sv-item {
        flex-shrink: 0;
        grid-template-columns: auto auto auto;
        scroll-snap-align: center;
        border-color: rgba(17, 14, 45, .08);
    }
    .sv-item-num {
        display: none;
    }
    .sv-item-name {
        overflow: visible;
    }
    .sv-item.is-active::after {
        display: none;
    }
}
@media (max-width: 640px) {
    .sv-layer-back { margin: 0 36px; }
    .sv-layer-front { margin: 0 18px; }
    .sv-body {
        padding: 16px 14px 18px;
        border-radius: 22px;
    }
    .sv-head {
        flex-wrap: wrap;
        gap: 12px;
    }
    .sv-head-icon {
        width: 48px;
        height: 54px;
    }
    .sv-title {
        font-size: 20px;
    }
    .sv-sub {
        display: none;
    }
    .sv-controls {
        width: 100%;
        justify-content: space-between;
    }
    .sv-list {
        margin-inline: -14px;
        padding-inline: 14px;
    }
    .sv-item {
        padding: 7px 10px;
        font-size: 13px;
    }
    .sv-item-icon {
        width: 28px;
        height: 28px;
    }
    .sv-panel {
        padding: 24px 18px 22px;
    }
    .sv-panel-num {
        font-size: 90px;
        inset-inline-end: 14px;
    }
    .sv-panel-icon {
        width: 62px;
        height: 62px;
        border-radius: 18px;
    }
    .sv-panel-icon svg,
    .sv-panel-icon img {
        width: 34px;
        height: 34px;
    }
    .sv-panel-title {
        font-size: 21px;
    }
    .sv-panel-lead {
        margin-top: 16px;
        font-size: 14.5px;
    }
    .sv-panel-text {
        font-size: 13.5px;
    }
    .sv-btn {
        flex: 1;
        justify-content: center;
        padding: 11px 14px;
        font-size: 13px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .sv-panel.is-active {
        animation: none;
    }
}

/* with JS every panel shares one grid cell, so the stage keeps the height of the tallest one */
.sv-ready .sv-stage {
    display: grid;
}
.sv-ready .sv-panel {
    grid-area: 1 / 1;
    visibility: hidden;
    opacity: 0;
}
.sv-ready .sv-panel.is-active {
    visibility: visible;
    opacity: 1;
}

/* the service's projects: a curved row of logos, each opening that project */
.sv-works {
    margin-top: auto;
    padding-top: 22px;
}
.sv-works + .sv-panel-actions {
    margin-top: 0;
    padding-top: 22px;
}
.sv-works-label {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .5);
}
.sv-works-arc {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 30px 30px 6px;
}
.sv-work {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 86px;
    height: 110px;
    margin-inline-start: -12px;
    overflow: visible;
    border: 3px solid #fff;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .6);
    transform-origin: 50% 140%;
    transform: translateY(var(--y)) rotate(var(--r));
    transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s;
    z-index: 1;
}
.sv-work:first-child {
    margin-inline-start: 0;
}
.sv-work img {
    width: 100%;
    height: 100%;
    border-radius: 11px;
    object-fit: cover;
}
.sv-work img.is-logo {
    width: 70%;
    height: auto;
    object-fit: contain;
}
.sv-work:hover,
.sv-work:focus-visible {
    z-index: 5;
    transform: translateY(calc(var(--y) - 18px)) rotate(0deg) scale(1.1);
    box-shadow: 0 0 0 3px rgba(238, 93, 56, .7), 0 20px 34px -12px rgba(238, 93, 56, .8);
    outline: none;
}
.sv-work-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    padding: 4px 10px;
    border-radius: 8px;
    color: #110E2D;
    background: #fff;
    font-size: 11.5px;
    line-height: 1.6;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 4px);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
}
.sv-work:hover .sv-work-tip,
.sv-work:focus-visible .sv-work-tip {
    opacity: 1;
    transform: translate(-50%, 0);
}
.sv-work-more {
    color: #fff;
    background: linear-gradient(135deg, #EE5D38, #FF7A4C);
    font-size: 15px;
    font-weight: 700;
}
.sv-panel.is-active .sv-work {
    animation: svWorkIn .5s cubic-bezier(.3, 1.4, .5, 1) backwards;
    animation-delay: calc(var(--k) * 60ms + 200ms);
}
@keyframes svWorkIn {
    from { opacity: 0; translate: 0 14px; }
    to { opacity: 1; translate: 0 0; }
}
@media (max-width: 640px) {
    .sv-works-arc {
        padding-top: 20px;
    }
    .sv-works-arc {
        padding-inline: 16px;
    }
    .sv-work {
        width: 62px;
        height: 80px;
        margin-inline-start: -16px;
        border-width: 2px;
        border-radius: 11px;
    }
    .sv-work img {
        border-radius: 9px;
    }
    .sv-work:nth-child(n+6):not(.sv-work-more) {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .sv-panel.is-active .sv-work {
        animation: none;
    }
}
