/* ==========================================================================
   Smart Serve – Seite «Funktionen» (DE/FR/IT/EN)
   Eigenes Layout: Produkt im Vordergrund. Lädt nach ss-site.css + ss-pages-a.css.
   Nur Klassen mit Präfix ssf-, Farben ausschliesslich über die gemeinsamen Tokens.
   ========================================================================== */

/* ---------- Hero: Text links, Produkt rechts ---------- */
.ssf-hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.ssf-hero::before {
    content: ""; position: absolute; z-index: 0; pointer-events: none;
    width: 980px; height: 980px; top: -360px; right: -320px; border-radius: 50%;
    background: radial-gradient(circle, rgba(56,116,255,.20), transparent 62%);
}
.ssf-hero > .ss-container { position: relative; z-index: 1; }
.ssf-hero__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.ssf-hero__title {
    font-size: clamp(2.1rem, 1.2rem + 2.8vw, 3.4rem) !important; color: var(--ss-ink);
    margin: 0 0 1.2rem; text-wrap: balance; -webkit-hyphens: manual; hyphens: manual;
}
.ssf-hero__title em { font-style: normal; color: var(--ss-blue-bright, #6f9bff); }
.ssf-hero .ss-lead { margin: 0 0 2rem; max-width: 34rem; }
.ssf-hero__visual { position: relative; padding-bottom: 28px; }
.ssf-hero__phone {
    position: absolute; z-index: 2; left: -6%; bottom: 0; width: 22%; max-width: 160px; height: auto;
    filter: drop-shadow(0 26px 40px rgba(0,0,0,.55));
}
/* Ab grosser Breite ragt der Screenshot leicht über die Inhaltsbreite hinaus */
@media (min-width: 1320px) { .ssf-hero__visual { margin-right: -72px; } }
@media (max-width: 991px) {
    .ssf-hero { padding: 40px 0 24px; }
    .ssf-hero__grid { grid-template-columns: 1fr; gap: 40px; }
    .ssf-hero__visual { max-width: 680px; width: 100%; margin: 0 auto; }
    .ssf-hero__phone { left: auto; right: 3%; width: 20%; }
}
@media (max-width: 575px) {
    .ssf-hero .ss-hero2__cta .ss-btn { width: 100%; }
    .ssf-hero__phone { width: 24%; bottom: -6px; }
}

/* ---------- Zahlen: schlanke Leiste statt Kachelblock ---------- */
.ssf-stats-sec { padding: 24px 0 8px; }
.ssf-stats.ss-stats { background: transparent; border-radius: 0; border-left: 0; border-right: 0; }
.ssf-stats .ss-stat { padding: 26px 24px; }
.ssf-stats .ss-stat__num { font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.4rem); }
@media (max-width: 400px) { .ssf-stats .ss-stat { padding: 20px 12px; } }

/* ==========================================================================
   Bereichs-Explorer: Tabs links, aktiver Bereich rechts
   Ohne JavaScript: Tabs ausgeblendet, alle Bereiche untereinander.
   ========================================================================== */
.ssf-x { display: grid; grid-template-columns: 1fr; gap: 40px; }
.ssf-x__side, .ssf-x__panels { min-width: 0; }
.ssf-x__head .ss-h2 { margin-bottom: .9rem; }
.ssf-x__head .ss-lead { font-size: 1.02rem; }
.ssf-x__panels { display: grid; gap: 72px; }

.ssf-x__panel { min-width: 0; outline: none; }
.ssf-x__panel:focus-visible { outline: 3px solid rgba(111,155,255,.5); outline-offset: 6px; border-radius: 18px; }
.ssf-x.is-ready .ssf-x__panel[hidden] { display: none; }
.ssf-x.is-ready .ssf-x__panel.is-entering { animation: ssf-in .45s var(--ss-ease) both; }
@keyframes ssf-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Medien: Browser-Screenshot oder freigestellte Handys auf gleich grosser Bühne */
.ssf-x__media { position: relative; }
.ssf-x__media::before {
    content: ""; position: absolute; inset: 8% 10%; z-index: 0; border-radius: 50%;
    background: radial-gradient(circle, rgba(56,116,255,.20), transparent 70%); filter: blur(30px);
}
.ssf-x__media > * { position: relative; z-index: 1; }
/* Handys frei auf der Seite, ohne Kasten: nur das weiche Licht von .ssf-x__media::before dahinter.
   Gleiches Seitenverhältnis wie die Browser-Screenshots, damit beim Wechsel der Bereiche nichts springt. */
.ssf-x__stage {
    aspect-ratio: 1372 / 940;
    display: flex; align-items: center; justify-content: center;
}
.ssf-x__stage img { display: block; height: 94%; width: auto; max-width: 92%; object-fit: contain; filter: drop-shadow(0 30px 50px rgba(0,0,0,.5)); }

/* Text unter dem Bild: Titel + Beschreibung links, Punkte rechts */
.ssf-x__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 40px; margin-top: 32px; align-items: start; }
.ssf-x__body .ss-tour__step { margin-bottom: .8rem; }
.ssf-x__body .ss-h3 { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem) !important; margin-bottom: .7rem; }
.ssf-x__body p { color: var(--ss-muted); font-size: 1rem; line-height: 1.65; margin: 0; }
.ssf-x__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.ssf-x__list li { display: flex; gap: .7rem; align-items: flex-start; color: var(--ss-muted); font-size: .95rem; line-height: 1.5; }
.ssf-x__list li strong { color: var(--ss-ink); font-weight: 700; }
.ssf-x__list li i {
    flex: 0 0 24px; width: 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ss-accent-soft); color: var(--ss-accent); font-size: .9rem; margin-top: 0;
}
.ssf-x__body .ss-stores { margin-top: 1.2rem; }
.ssf-x__body .ss-stores img { height: 38px; }

/* Tabs (werden per JS eingeblendet) */
.ssf-x__tabs { position: relative; display: grid; gap: 6px; margin-top: 32px; }
.ssf-x__tabs[hidden] { display: none; }
.ssf-x__tab {
    position: relative; display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 12px 16px 12px 12px; border-radius: 16px; border: 1px solid transparent; background: transparent;
    color: var(--ss-muted); font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.3; text-align: left; cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}
.ssf-x__tab:hover { background: rgba(255,255,255,.035); color: var(--ss-ink); }
.ssf-x__tab:focus-visible { outline: 3px solid rgba(111,155,255,.6); outline-offset: 2px; }
.ssf-x__tab[aria-selected="true"] { background: var(--ss-card); border-color: rgba(56,116,255,.35); color: var(--ss-ink); box-shadow: var(--ss-shadow, 0 18px 40px rgba(0,0,0,.25)); }
.ssf-x__tab[aria-selected="true"]::before {
    content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--ss-blue, #3874ff);
}
.ssf-x__ico {
    flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.04); border: 1px solid var(--ss-line); color: var(--ss-faint); font-size: 1.2rem;
    transition: background-color .2s, color .2s, border-color .2s;
}
.ssf-x__tab[aria-selected="true"] .ssf-x__ico { background: var(--ss-accent-soft); border-color: rgba(56,116,255,.3); color: var(--ss-accent); }
.ssf-x__name { display: flex; flex-direction: column; min-width: 0; }
.ssf-x__name small { font-size: .7rem; font-weight: 800; letter-spacing: .12em; color: var(--ss-faint); margin-bottom: 2px; }
.ssf-x__tab[aria-selected="true"] .ssf-x__name small { color: var(--ss-blue-bright, #6f9bff); }

/* Mit JS: zweispaltig ab Desktop, Tabs bleiben beim Scrollen sichtbar */
.ssf-x.is-ready .ssf-x__panels { gap: 0; }
@media (min-width: 992px) {
    /* Seitenspalte läuft über die ganze Höhe; nur die Tab-Liste klebt (passt auch auf niedrige Bildschirme) */
    .ssf-x.is-ready { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 56px; align-items: stretch; }
    .ssf-x.is-ready .ssf-x__tabs { position: sticky; top: 96px; }
    .ssf-x.is-ready .ssf-x__panels { align-self: start; }
    .ssf-x.is-ready .ssf-x__body .ss-tour__step { display: none; }
}
@media (min-width: 1200px) { .ssf-x.is-ready { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 72px; } }

/* Ohne JS (oder nicht aktiv) ab Desktop: Kopf zentriert über den Bereichen */
@media (min-width: 992px) {
    .ssf-x:not(.is-ready) .ssf-x__head { max-width: 760px; margin: 0 auto; text-align: center; }
    .ssf-x:not(.is-ready) .ssf-x__head .ss-eyebrow { justify-content: center; }
}

/* Tablet / Handy: Tabs als waagrecht scrollbare Chip-Reihe */
@media (max-width: 991px) {
    .ssf-x { gap: 28px; }
    .ssf-x__tabs {
        display: flex; gap: 8px; margin: 24px -20px 0; padding: 4px 20px 8px;
        overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
                mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
    }
    .ssf-x__tabs::-webkit-scrollbar { display: none; }
    .ssf-x__tab {
        flex: 0 0 auto; width: auto; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; scroll-snap-align: start;
        border-color: var(--ss-line); background: rgba(255,255,255,.03); font-size: .9rem; white-space: nowrap;
    }
    .ssf-x__tab[aria-selected="true"] { box-shadow: none; }
    .ssf-x__tab[aria-selected="true"]::before { display: none; }
    .ssf-x__ico { flex-basis: 30px; width: 30px; height: 30px; border-radius: 50%; font-size: .95rem; }
    .ssf-x__name small { display: none; }
    .ssf-x__body { grid-template-columns: 1fr; margin-top: 24px; }
    .ssf-x.is-ready .ssf-x__body .ss-tour__step { display: none; }
}
@media (max-width: 575px) {
    .ssf-x__panels { gap: 56px; }
    .ssf-x__stage { aspect-ratio: 4 / 3.4; }
}

/* ---------- «Für Sie, Ihre Trainer …»: ein geteiltes Panel statt zwei Karten ---------- */
.ssf-duo {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--ss-line); border-radius: var(--ss-radius); background: var(--ss-card); overflow: hidden;
    box-shadow: var(--ss-shadow, none);
}
.ssf-duo__item { padding: 36px 36px 34px; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0 20px; align-content: start; }
.ssf-duo__item + .ssf-duo__item { border-left: 1px solid var(--ss-line); }
.ssf-duo__item > .ss-why__icon { margin: 0; grid-row: span 4; width: 52px; height: 52px; font-size: 1.5rem; }
.ssf-duo__item .ss-tour__step { margin-bottom: .5rem; }
.ssf-duo__item h3 { font-size: 1.25rem !important; color: var(--ss-ink); margin: 0 0 .55rem; line-height: 1.25 !important; letter-spacing: -.015em !important; }
.ssf-duo__item p { color: var(--ss-muted); font-size: .95rem; line-height: 1.6; margin: 0; }
.ssf-duo__item ul { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ssf-duo__item li {
    display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .75rem; border-radius: 999px;
    background: rgba(255,255,255,.04); border: 1px solid var(--ss-line); color: var(--ss-muted); font-size: .84rem; font-weight: 600; line-height: 1.3;
}
.ssf-duo__item li::before { content: "✓"; color: var(--ss-accent); font-weight: 800; }
@media (max-width: 767px) {
    .ssf-duo { grid-template-columns: 1fr; }
    .ssf-duo__item { padding: 28px 22px; grid-template-columns: 1fr; }
    .ssf-duo__item > .ss-why__icon { grid-row: auto; margin-bottom: 1rem; width: 46px; height: 46px; font-size: 1.3rem; }
    .ssf-duo__item + .ssf-duo__item { border-left: 0; border-top: 1px solid var(--ss-line); }
}

/* ---------- Profi-Funktionen: Datenblatt (Kopf links fix, Liste rechts) ---------- */
.ssf-pro { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.ssf-pro__head .ss-h2 { margin: 0 0 1rem; }
@media (min-width: 992px) and (min-height: 720px) { .ssf-pro__head { position: sticky; top: 110px; } }
.ssf-pro__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ss-line); }
.ssf-pro__item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--ss-line); }
.ssf-pro__item > i {
    width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ss-accent-soft); color: var(--ss-accent); font-size: 1.25rem;
}
.ssf-pro__item h3 { font-size: 1.1rem !important; color: var(--ss-ink); margin: 0 0 .35rem; line-height: 1.3 !important; letter-spacing: -.01em !important; }
.ssf-pro__item p { color: var(--ss-muted); font-size: .94rem; line-height: 1.6; margin: 0; }
@media (max-width: 991px) { .ssf-pro { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 575px) { .ssf-pro__item { grid-template-columns: 38px minmax(0, 1fr); gap: 14px; padding: 20px 0; } .ssf-pro__item > i { width: 38px; height: 38px; font-size: 1.1rem; } }

/* ---------- Vergleich: etwas schmaler, mittig ---------- */
.ssf-vs-wrap { max-width: 980px; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
    .ssf-x.is-ready .ssf-x__panel.is-entering { animation: none; }
}
