/* =========================================================
   Fitness First Case Study - Scoped CSS
   Requires Bootstrap 4 (grid + modal). No font stack is set.
   Every rule is scoped under .ff-case-study
   ========================================================= */

.ff-case-study {
    --ff-bg: #050505;
    --ff-bg2: #0d0d0d;
    --ff-card: #141414;
    --ff-line: #262626;
    --ff-red: #e4162b;
    --ff-red2: #ff3b4d;
    --ff-tx: #f5f5f5;
    --ff-mu: #a8a8a8;
    --ff-r: 16px;
    background: var(--ff-bg);
    color: var(--ff-tx);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ---------- Base resets (scoped) ---------- */
.ff-case-study img {
    max-width: 100%;
    height: auto;
    display: block;
}

.ff-case-study h1,
.ff-case-study h2,
.ff-case-study h3,
.ff-case-study p,
.ff-case-study figure {
    margin: 0;
}

.ff-case-study h1,
.ff-case-study h2,
.ff-case-study h3 {
    color: var(--ff-tx);
    font-weight: 700;
}

.ff-case-study h1 {
    font-size: clamp(30px, 4.6vw, 54px);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.ff-case-study h2 {
    font-size: clamp(26px, 3.4vw, 40px);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
}

.ff-case-study h3 {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.ff-case-study p {
    color: var(--ff-mu);
}

.ff-case-study .container {
    max-width: 1180px;
}

.ff-case-study .ff-section {
    padding: 30px 0;
    border-top: 1px solid var(--ff-line);
}

.ff-case-study .ff-lead {
    max-width: 860px;
    font-size: 17px;
    margin-bottom: 36px;
}

.ff-case-study button:focus-visible,
.ff-case-study a:focus-visible {
    outline: 2px solid var(--ff-red2);
    outline-offset: 3px;
}

/* ---------- Buttons ---------- */
.ff-case-study .ff-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid var(--ff-red);
    background: transparent;
    color: var(--ff-tx);
    transition: 0.25s;
}

.ff-case-study .ff-btn-primary {
    background: var(--ff-red);
    color: #fff;
}

.ff-case-study .ff-btn-primary:hover,
.ff-case-study .ff-btn-primary:focus {
    background: var(--ff-red2);
    border-color: var(--ff-red2);
    color: #fff;
    box-shadow: 0 8px 28px rgba(228, 22, 43, 0.4);
    transform: translateY(-2px);
}

.ff-case-study .ff-btn-outline,
.ff-case-study .ff-btn-outline:visited {
    color: var(--ff-tx);
    border: 2px solid var(--ff-red);
}

.ff-case-study .ff-btn-outline:hover,
.ff-case-study .ff-btn-outline:focus {
    background: var(--ff-red);
    border-color: var(--ff-red);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(228, 22, 43, 0.3);
    transform: translateY(-2px);
}

.ff-case-study .ff-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* ---------- Hero ---------- */
.ff-case-study .ff-hero {
    border-top: 0;
    padding: 30px 0;
    background: radial-gradient(900px 480px at 85% 10%, rgba(228, 22, 43, 0.28), transparent 60%), var(--ff-bg);
}

.ff-case-study .ff-tag {
    display: inline-block;
    color: var(--ff-red2);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    padding: 6px 14px;
    border: 1px solid rgba(228, 22, 43, 0.5);
    border-radius: 999px;
}

.ff-case-study .ff-hero-text {
    font-size: 18px;
    margin: 22px 0 30px;
}

.ff-case-study .ff-hero .ff-shot {
    max-width: 340px;
    margin: 0 auto;
}

/* ---------- Screenshots ---------- */
.ff-case-study .ff-shot {
    margin: 0;
    transition: 0.35s;
}

.ff-case-study .ff-shot img {
    width: 100%;
    border-radius: 20px;
}

.ff-case-study .ff-shot:hover {
    transform: translateY(-6px);
}

/* ---------- About ---------- */
.ff-case-study .ff-mark {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.ff-case-study .ff-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.ff-case-study .ff-kv {
    display: grid;
    gap: 1px;
    background: var(--ff-line);
    border: 1px solid var(--ff-line);
    border-radius: var(--ff-r);
    overflow: hidden;
}

.ff-case-study .ff-kv>div {
    background: var(--ff-card);
    padding: 14px 18px;
}

.ff-case-study .ff-kv b {
    display: block;
    font-size: 13px;
    color: var(--ff-red2);
    font-weight: 600;
}

.ff-case-study .ff-kv span {
    font-size: 15px;
}

/* ---------- Cards ---------- */
.ff-case-study .ff-card {
    background: var(--ff-card);
    border: 1px solid var(--ff-line);
    border-radius: var(--ff-r);
    padding: 28px;
    transition: 0.3s;
}

.ff-case-study .ff-card:hover {
    border-color: var(--ff-red);
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(228, 22, 43, 0.12);
}

.ff-case-study .ff-num {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(228, 22, 43, 0.15);
    color: var(--ff-red2);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 14px;
}

.ff-case-study .ff-req p {
    color: var(--ff-mu);
    margin-bottom: 14px;
}

.ff-case-study .ff-req-card {
    margin-top: 6px;
}

.ff-case-study .ff-req-list {
    margin-top: 18px;
    margin-bottom: -14px;
}

/* ---------- Stats ---------- */
.ff-case-study .ff-stat strong {
    display: block;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ff-red2);
    margin-bottom: 6px;
}

.ff-case-study .ff-stat span {
    color: var(--ff-tx);
    font-weight: 500;
}

/* ---------- Solution blocks ---------- */
.ff-case-study .ff-sol {
    margin-top: 72px;
}

.ff-case-study .ff-vis {
    display: flex;
    gap: 20px;
    align-items: center;
}

.ff-case-study .ff-vis .ff-shot-app {
    flex: 0 0 32%;
    max-width: 340px;
}

.ff-case-study .ff-vis .ff-shot-web {
    flex: 1;
    min-width: 0;
}

.ff-case-study .ff-pair {
    display: flex;
    gap: 18px;
    justify-content: center;
}

.ff-case-study .ff-pair .ff-shot {
    flex: 0 1 280px;
    min-width: 0;
}

.ff-case-study .ff-single {
    max-width: 340px;
    margin: 0 auto;
}

/* ---------- Features ---------- */
.ff-case-study .ff-feat-card p {
    margin-bottom: 12px;
}

.ff-case-study .ff-benefit {
    display: block;
    color: var(--ff-tx);
    font-weight: 600;
    padding-top: 12px;
    border-top: 1px dashed var(--ff-line);
}

.ff-case-study .ff-benefit::first-line {
    color: var(--ff-red2);
}

/* ---------- Process ---------- */
.ff-case-study .ff-steps {
    position: relative;
}

.ff-case-study .ff-steps::before {
    content: "";
    position: absolute;
    top: 26px;
    left: 5%;
    right: 5%;
    height: 2px;
    background: linear-gradient(90deg, var(--ff-red), #401015);
}

.ff-case-study .ff-step {
    position: relative;
}

.ff-case-study .ff-step .ff-num {
    width: 52px;
    height: 52px;
    background: var(--ff-red);
    color: #fff;
    font-size: 20px;
    box-shadow: 0 0 0 6px var(--ff-bg);
}

/* ---------- Technology ---------- */
.ff-case-study .ff-tech-card {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px;
}

.ff-case-study .ff-ic {
    flex: none;
    width: 52px;
    height: 52px;
    padding: 7px;
    border-radius: 12px;
    background: #fff;
    display: block;
}

.ff-case-study .ff-ic img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.ff-case-study .ff-tech-card small {
    display: block;
    color: var(--ff-mu);
    font-size: 13px;
    line-height: 1.5;
}

.ff-case-study .ff-tech-card b {
    display: block;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
}

/* ---------- Inside the solution ---------- */
.ff-case-study .ff-inside h3 {
    font-size: 16px;
    margin-top: 18px;
}

.ff-case-study .ff-inside p {
    font-size: 14px;
}

/* ---------- Results ---------- */
.ff-case-study .ff-res {
    background: linear-gradient(180deg, var(--ff-bg2), var(--ff-bg));
}

.ff-case-study .ff-res-inner {
    max-width: 900px;
}

.ff-case-study .ff-res-inner p {
    font-size: 17px;
    margin-bottom: 20px;
}

/* ---------- Final CTA ---------- */
.ff-case-study .ff-cta {
    text-align: center;
    background: radial-gradient(700px 320px at 50% 100%, rgba(228, 22, 43, 0.45), transparent 70%), var(--ff-bg2);
}

.ff-case-study .ff-cta p {
    max-width: 780px;
    margin: 0 auto 32px;
    font-size: 17px;
}

/* ---------- Scroll reveal (added by JS only) ---------- */
.ff-case-study.ff-js .ff-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.ff-case-study.ff-js .ff-reveal.ff-in {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .ff-case-study .ff-steps::before {
        display: none;
    }

    .ff-case-study .ff-hero .ff-shot {
        margin-top: 40px;
    }

    .ff-case-study .ff-about-side {
        margin-top: 32px;
    }

    .ff-case-study .ff-sol .ff-txt {
        margin-bottom: 28px;
    }
}

@media (max-width: 767.98px) {
    .ff-case-study .ff-sol {
        margin-top: 48px;
    }

    .ff-case-study .ff-card {
        padding: 22px;
    }
}

@media (max-width: 575.98px) {
    .ff-case-study .ff-btn {
        width: 100%;
    }

    .ff-case-study .ff-ctas {
        flex-direction: column;
    }

    .ff-case-study .ff-vis {
        flex-direction: column;
    }

    .ff-case-study .ff-vis .ff-shot-app {
        flex: none;
        width: 70%;
    }

    .ff-case-study .ff-vis .ff-shot-web {
        flex: none;
        width: 100%;
    }

    .ff-case-study .ff-pair {
        flex-direction: column;
        align-items: center;
    }

    .ff-case-study .ff-pair .ff-shot {
        flex: none;
        width: 100%;
        max-width: 300px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ff-case-study .ff-shot,
    .ff-case-study .ff-card,
    .ff-case-study .ff-btn {
        transition: none;
    }
}