/* ==========================================================================
   Feramat – sekce „Naše služby“
   Dvousloupcový layout: vlevo lepivý (sticky) průvodce postupem,
   vpravo obsah jednotlivých kroků.

   Proč takto:
   – 5 kroků v mřížce 2×3 by nechalo poslední kartu osiřelou a pořadí
     by se četlo špatně; svislý postup s očíslovaným railem drží
     posloupnost čitelnou a vždy na očích,
   – hlavní text je vidět rovnou, na „Oblast využití“ je rozbalovátko
     (progressive disclosure),
   – rail ukazuje, ve které fázi se čtenář nachází.

   Písmo Barlow, barvy z palety skupiny C-energy.
   ========================================================================== */

#services {
    --sv-blue-90: #0b1432;
    --sv-blue-70: #172964;
    --sv-blue-60: #1b3280;
    --sv-blue-50: #4b5c95;
    --sv-blue-40: #6a79b0;
    --sv-blue-20: #c2c9e4;
    --sv-blue-10: #ebefff;
    --sv-green-80: #346603;   /* text na bílé – kontrast 6.89:1 */
    --sv-green-70: #5b9529;
    --sv-green-60: #72bd44;
    --sv-green-10: #eaf7de;

    padding: 88px 0 96px;
    background: #fff;
    font-family: "Barlow", Calibri, Helvetica, sans-serif;
}

/* Stejný kontejner jako zbytek webu (.container-fluid v pex.css),
   aby sekce lícovala s „O nás“, „Naši zákazníci“ atd. */
#services .sv-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ---------------------------------------------------------- dva sloupce */

#services .sv-grid {
    display: grid;
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

@media (max-width: 1024px) {
    #services .sv-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ------------------------------------------------------- levý sloupec */

#services .sv-aside {
    position: sticky;
    top: 32px;
}

@media (max-width: 1024px) {
    #services .sv-aside { position: static; }
}

#services .sv-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: .8125rem;
    font-weight: 400;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--sv-green-80);
}

#services .sv-eyebrow::before {
    content: "";
    width: 30px;
    height: 2px;
    background: var(--sv-green-60);
}

#services h2.sv-title {
    margin: 0 0 16px !important;
    font-size: clamp(2rem, 3.4vw, 2.75rem) !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: -.02em;
    text-align: left !important;
    color: var(--sv-blue-90) !important;
}

#services .sv-lead {
    margin: 0 0 32px;
    max-width: 40ch;
    font-size: 1rem;
    line-height: 1.62;
    color: var(--sv-blue-50);
}

/* ------------------------------------------------------------- stepper */

#services .sv-steps {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* nevyplněná linka postupu */
#services .sv-steps::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: var(--sv-blue-20);
}

/* vyplněná část – výšku řídí --sv-progress (0–1) nastavované JS */
#services .sv-steps::after {
    content: "";
    position: absolute;
    left: 15px;
    top: 14px;
    width: 2px;
    height: calc((100% - 28px) * var(--sv-progress, 0));
    background: var(--sv-green-60);
    transition: height .35s ease;
}

#services .sv-step {
    position: relative;
    z-index: 1;
}

#services .sv-step + .sv-step { margin-top: 4px; }

#services .sv-step a {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 44px;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;
    color: var(--sv-blue-50);
    transition: color .18s ease, background-color .18s ease;
}

#services .sv-step a:hover,
#services .sv-step a:focus-visible {
    color: var(--sv-blue-90);
    background: var(--sv-blue-10);
    text-decoration: none;
}

#services .sv-step a:focus-visible {
    outline: 3px solid var(--sv-green-60);
    outline-offset: 2px;
}

#services .sv-step .sv-dot {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid var(--sv-blue-20);
    border-radius: 50%;
    background: #fff;
    font-size: .8125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--sv-blue-50);
    transition: border-color .25s ease, background-color .25s ease, color .25s ease;
}

/* aktivní / již projitý krok */
#services .sv-step.is-active a { color: var(--sv-blue-90); font-weight: 700; }
#services .sv-step.is-active .sv-dot {
    border-color: var(--sv-green-60);
    background: var(--sv-green-60);
    /* bílá na značkové zelené dává jen 2.3:1, tmavá modrá 7.8:1 */
    color: var(--sv-blue-90);
}
#services .sv-step.is-done .sv-dot {
    border-color: var(--sv-green-60);
    background: var(--sv-green-10);
    color: var(--sv-green-70);
}

/* na užších displejích vodorovný pás místo svislého railu */
@media (max-width: 1024px) {
    #services .sv-steps {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: none;
    }
    #services .sv-steps::-webkit-scrollbar { display: none; }
    #services .sv-steps::before,
    #services .sv-steps::after { display: none; }
    #services .sv-step + .sv-step { margin-top: 0; }
    #services .sv-step a {
        white-space: nowrap;
        border: 1px solid var(--sv-blue-20);
    }
}

/* Grid i flex položky mají implicitně min-width:auto a odmítají se zmenšit
   pod šířku svého obsahu – na úzkých displejích kvůli tomu karty přetékaly
   mimo viewport. */
#services .sv-grid > *,
#services .sv-items,
#services .sv-items > *,
#services .sv-body > *,
#services .sv-head > * {
    min-width: 0;
}

/* pozn.: .sv-wrap zde být nesmí – max-width:100% by přebilo
   jeho max-width:1140px a sekce by se roztáhla přes celou šířku */
#services .sv-item {
    box-sizing: border-box;
    max-width: 100%;
}

#services .sv-item p.sv-text,
#services .sv-item h3,
#services .sv-item h4,
#services .sv-more li {
    overflow-wrap: break-word;
}

/* ------------------------------------------------------ pravý sloupec */

#services .sv-items {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

#services .sv-item {
    position: relative;
    scroll-margin-top: 90px;
    padding: 30px 32px 32px;
    border: 1px solid rgba(27, 50, 128, .1);
    border-left: 3px solid var(--sv-blue-20);
    border-radius: 10px;
    background: #fff;
    transition: border-left-color .3s ease, box-shadow .3s ease;
}

#services .sv-item.is-active {
    border-left-color: var(--sv-green-60);
    box-shadow: 0 8px 26px rgba(6, 10, 26, .08);
}

@media (max-width: 560px) {
    #services .sv-item { padding: 24px 20px 26px; }
}

/* hlavička kroku */
#services .sv-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 14px;
}

#services .sv-num {
    flex: 0 0 auto;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.03em;
    color: var(--sv-blue-40, #6a79b0);
}

#services .sv-item.is-active .sv-num { color: var(--sv-green-80); }

#services .sv-item h3 {
    margin: 0 0 4px !important;
    font-size: clamp(1.375rem, 2.1vw, 1.75rem) !important;
    font-weight: 700 !important;
    line-height: 1.16 !important;
    color: var(--sv-blue-90) !important;
}

#services .sv-item h4 {
    margin: 0 !important;
    font-size: 1.0625rem !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    color: var(--sv-blue-60) !important;
}

#services .sv-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 28px;
    align-items: start;
}

@media (max-width: 720px) {
    #services .sv-body { grid-template-columns: 1fr; gap: 18px; }
}

#services .sv-item p.sv-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.66;
    color: var(--sv-blue-50);
}

#services .sv-illu {
    width: 132px;
    height: auto;
    justify-self: end;
    opacity: .95;
}

@media (max-width: 720px) {
    #services .sv-illu { justify-self: start; width: 104px; }
}

/* --------------------------------------------- rozbalení „Oblast využití“ */

#services .sv-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-top: 14px;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 700;
    color: var(--sv-green-80);
    cursor: pointer;
    transition: color .18s ease;
}

#services .sv-toggle:hover { color: var(--sv-blue-60); }

#services .sv-toggle:focus-visible {
    outline: 3px solid var(--sv-green-60);
    outline-offset: 3px;
    border-radius: 4px;
}

#services .sv-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform .25s ease;
}

#services .sv-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

#services .sv-more[hidden] { display: none; }

#services .sv-more {
    margin-top: 6px;
    padding: 18px 20px;
    border-radius: 8px;
    background: var(--sv-blue-10);
}

#services .sv-more h5 {
    margin: 0 0 10px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--sv-blue-60);
}

#services .sv-more ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

#services .sv-more li {
    position: relative;
    padding-left: 22px;
    font-size: .9375rem;
    line-height: 1.55;
    color: var(--sv-blue-70);
}

#services .sv-more li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .52em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--sv-green-60);
}

/* pex.css justifikuje globálně všechny nadpisy (h1–h6); na úzkém sloupci
   to tvoří „řeky“ mezi slovy, proto zarovnáváme doleva. */
#services h2,
#services h3,
#services h4,
#services h5 {
    text-align: left !important;
    text-wrap: pretty;
}

#services .sv-item p.sv-text,
#services .sv-lead,
#services .sv-more li {
    text-align: left;
    hyphens: none;
}

/* ------------------------------------------------------------- pohyb */

@media (prefers-reduced-motion: reduce) {
    #services .sv-steps::after,
    #services .sv-item,
    #services .sv-dot,
    #services .sv-toggle svg {
        transition: none;
    }
}
