/* ===================================================================
   FISTECH — ROADMAP COMERCIAL PARA CLÍNICAS
   CSS — Desktop + Mobile responsive com scroll interno
   =================================================================== */

/* --- Tokens --- */
:root {
    --bg: #020617;
    --bg-card: rgba(30, 41, 59, 0.45);
    --border: rgba(148, 163, 184, 0.15);
    --border-hl: rgba(139, 92, 246, 0.4);
    --purple: #8B5CF6;
    --blue: #3B82F6;
    --cyan: #06B6D4;
    --green: #10B981;
    --red: #EF4444;
    --white: #ffffff;
    --t1: #F1F5F9;
    --t2: #94A3B8;
    --t3: #64748B;
    --ff: 'Outfit', sans-serif;
    --fb: 'Inter', sans-serif;
    --grad: linear-gradient(135deg, var(--purple), var(--blue));

    /* Controls bar height */
    --controls-h: 56px;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    width: 100%; height: 100%;
    overflow: hidden;
    background: var(--bg);
}

body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--t1);
    font-family: var(--fb);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5 { font-family: var(--ff); color: var(--white); line-height: 1.15; font-weight: 700; }

img, svg { max-width: 100%; display: block; }

/* ===================================================================
   DECK & SLIDES — Core structure
   =================================================================== */
.deck {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.97);
    transition: opacity .5s ease, visibility .5s ease, transform .5s ease;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(139,92,246,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(6,182,212,0.06) 0%, transparent 50%),
        var(--bg);
}

.slide.active { opacity: 1; visibility: visible; transform: scale(1); z-index: 10; }

/* --- Scroll container inside each slide --- */
.slide-scroll {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

/* --- Inner content area --- */
.slide-inner {
    width: 100%;
    min-height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* Desktop: center content, generous padding */
    justify-content: center;
    padding: clamp(3rem, 5vh, 5rem) clamp(2rem, 5vw, 5rem);
    /* Reserve space for controls bar at bottom */
    padding-bottom: calc(var(--controls-h) + clamp(2rem, 4vh, 4rem));
}

/* Centered slides (cover, closing) */
.slide--centered .slide-inner {
    align-items: center;
    text-align: center;
}

/* ===================================================================
   LOGO
   =================================================================== */
.logo-main { display: inline-flex; }
.logo-img { height: clamp(36px, 5vh, 60px); object-fit: contain; }

.slide-logo {
    margin-bottom: 1rem;
}
.logo-sm { height: 24px; object-fit: contain; opacity: 0.7; display: inline-block; }

/* ===================================================================
   TYPOGRAPHY
   =================================================================== */
.title-xl { font-size: clamp(32px, 5.5vw, 72px); letter-spacing: -1px; }
.title-md { font-size: clamp(22px, 3vw, 44px); }
.sub-lg { font-size: clamp(15px, 1.8vw, 22px); color: var(--t2); max-width: 800px; font-weight: 400; }
.sub-md { font-size: clamp(14px, 1.4vw, 20px); color: var(--t2); max-width: 800px; }

/* ===================================================================
   HELPERS
   =================================================================== */
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; } .mt-5 { margin-top: 2rem; } .mt-6 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }

.tag {
    display: inline-block; padding: .4rem 1rem; border-radius: 999px;
    background: rgba(255,255,255,.04); border: 1px solid var(--border);
    font-size: clamp(11px, 1vw, 14px); color: var(--t2);
    text-transform: uppercase; letter-spacing: 1.5px; font-weight: 500;
}

.note {
    font-size: clamp(13px, 1.1vw, 16px); color: var(--t1); font-weight: 500;
    padding: .75rem 1.25rem; border-left: 3px solid var(--purple);
    background: rgba(139,92,246,.06); border-radius: 0 8px 8px 0;
}

.aside { font-size: clamp(12px, 1vw, 14px); color: var(--t3); font-style: italic; }

/* ===================================================================
   GRIDS
   =================================================================== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.tri-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.quad-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

/* ===================================================================
   CARDS
   =================================================================== */
.q-card, .tri-card, .resp-card, .split-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.25rem;
    height: auto; min-height: 0;
}
.hl-card { border-color: var(--border-hl); background: rgba(139,92,246,.08); }
.q-title { font-size: clamp(13px, 1.1vw, 16px); color: var(--cyan); letter-spacing: .5px; font-weight: 600; }

/* Tri-card headers */
.tri-head, .resp-head {
    font-family: var(--ff); font-size: clamp(12px, 1vw, 14px);
    font-weight: 700; letter-spacing: 2px; padding: .4rem .75rem;
    border-radius: 6px; margin-bottom: .75rem; text-align: center;
}
.partner-head { background: rgba(59,130,246,.15); color: var(--blue); }
.fistech-head { background: rgba(139,92,246,.15); color: var(--purple); }
.clinic-head { background: rgba(6,182,212,.15); color: var(--cyan); }

/* ===================================================================
   LISTS
   =================================================================== */
.check-list, .mini-list { list-style: none; }
.check-list li, .mini-list li {
    position: relative; padding-left: 1.2rem;
    font-size: clamp(13px, 1.1vw, 16px); color: var(--t1);
    margin-bottom: .45rem;
}
.check-list li::before, .mini-list li::before {
    content: ''; position: absolute; left: 0; top: .5em;
    width: 6px; height: 6px; border-radius: 50%; background: var(--purple);
}
.compact li { margin-bottom: .3rem; }

.funnel-list { list-style: none; counter-reset: fn; }
.funnel-list li {
    counter-increment: fn; position: relative; padding-left: 2rem;
    font-size: clamp(13px, 1.1vw, 16px); color: var(--t1); margin-bottom: .35rem;
}
.funnel-list li::before {
    content: counter(fn); position: absolute; left: 0;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(255,255,255,.08); color: var(--t2);
    font-size: 10px; display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-family: var(--ff);
}
.funnel-list li.funnel-ok { color: var(--green); font-weight: 600; }
.funnel-list li.funnel-ok::before { background: var(--green); color: #000; }

/* ===================================================================
   TAGS
   =================================================================== */
.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.sm-tag {
    padding: .25rem .6rem; border-radius: 6px;
    background: rgba(255,255,255,.05); border: 1px solid var(--border);
    font-size: clamp(11px, .85vw, 13px); color: var(--t2); font-weight: 500;
}
.warn-tag { border-color: rgba(239,68,68,.3); color: var(--red); background: rgba(239,68,68,.06); }

.tag-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.data-tag {
    padding: .3rem .6rem; border-radius: 6px;
    background: rgba(6,182,212,.06); border: 1px solid rgba(6,182,212,.2);
    font-size: clamp(11px, .85vw, 13px); color: var(--cyan); font-weight: 500;
}

/* ===================================================================
   INLINE FLOWS
   =================================================================== */
.inline-flow {
    display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
    padding: .75rem 1rem; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; font-size: clamp(12px, 1vw, 15px); font-weight: 500;
}
.sm-flow { font-size: clamp(12px, .9vw, 14px); padding: .6rem .75rem; }
.inline-flow .arr { color: var(--t3); }
.hl-inline { color: var(--purple); font-weight: 700; }
.ok-inline { color: var(--green); font-weight: 700; }

/* ===================================================================
   ROADMAP FLOW (Slide 3)
   =================================================================== */
.roadmap-flow {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem;
    padding: 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
}
.rm-step {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .4rem .8rem; border-radius: 8px;
    background: rgba(255,255,255,.04); border: 1px solid var(--border);
    font-size: clamp(11px, 1vw, 14px); font-weight: 500;
}
.rm-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(255,255,255,.1); font-size: 9px; font-weight: 700; font-family: var(--ff);
}
.rm-arrow { color: var(--t3); font-size: 1rem; }
.hl-step { background: rgba(139,92,246,.2); border-color: var(--purple); color: var(--white); }
.hl-step .rm-num { background: var(--purple); }
.ok-step { background: rgba(16,185,129,.15); border-color: var(--green); color: var(--green); }
.ok-step .rm-num { background: var(--green); color: #000; }
.data-step { background: rgba(6,182,212,.15); border-color: var(--cyan); color: var(--cyan); }
.data-step .rm-num { background: var(--cyan); color: #000; }

/* ===================================================================
   LP MOCKUP (Slide 5)
   =================================================================== */
.lp-mock {
    background: #0c1222; border: 1px solid var(--border); border-radius: 12px;
    padding: 1rem; display: flex; flex-direction: column; gap: .6rem;
    position: relative; box-shadow: 0 12px 30px rgba(0,0,0,.4);
    width: 100%; max-width: 340px; margin: 0 auto;
}
.lp-bar { height: 8px; width: 30%; background: rgba(255,255,255,.1); border-radius: 4px; }
.lp-hero-block { padding: .75rem; background: rgba(255,255,255,.03); border-radius: 8px; }
.lp-line { height: 6px; background: rgba(255,255,255,.12); border-radius: 3px; margin-bottom: .4rem; }
.w80 { width: 80%; } .w70 { width: 70%; } .w60 { width: 60%; } .w50 { width: 50%; } .w90 { width: 90%; }
.lp-section { padding: .6rem; background: rgba(255,255,255,.02); border-radius: 6px; }
.lp-form-block { padding: .75rem; background: rgba(139,92,246,.1); border-radius: 8px; display: flex; flex-direction: column; gap: .4rem; }
.lp-input { height: 10px; background: rgba(255,255,255,.15); border-radius: 3px; }
.lp-btn-mock { padding: .3rem .6rem; background: var(--purple); color: white; border-radius: 4px; font-size: 10px; font-weight: 600; text-align: center; width: fit-content; }
.lp-connection {
    position: absolute; bottom: -12px; right: 12px;
    background: var(--blue); color: white; padding: .25rem .6rem; border-radius: 6px;
    font-size: 10px; font-weight: 700;
}

/* ===================================================================
   GMB FLOW (Slide 6)
   =================================================================== */
.gmb-flow { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.flow-node {
    padding: .5rem 1rem; border-radius: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    font-size: clamp(12px, 1vw, 15px); font-weight: 500; text-align: center;
    width: 100%; max-width: 300px;
}
.hl-node { border-color: var(--purple); background: rgba(139,92,246,.12); }
.fs-node { border-color: var(--cyan); background: rgba(6,182,212,.08); font-size: clamp(11px,.9vw,13px); }
.flow-arrow { color: var(--t3); font-size: 1.1rem; }
.flow-branch { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.flow-leaf {
    padding: .3rem .6rem; border-radius: 6px; font-size: clamp(11px,.85vw,13px);
    background: rgba(255,255,255,.05); border: 1px solid var(--border); font-weight: 500;
}

/* ===================================================================
   SPLIT (Slide 7)
   =================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.split-title { font-size: clamp(14px, 1.3vw, 18px); letter-spacing: 2px; margin-bottom: .75rem; }
.meta-title { color: var(--blue); }
.google-title { color: var(--green); }

/* ===================================================================
   FS MOCK (Slide 8)
   =================================================================== */
.fs-mock {
    background: #0c1222; border: 1px solid var(--border); border-radius: 12px;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,.4);
    width: 100%; max-width: 400px; margin: 0 auto;
}
.fs-top {
    padding: .4rem .75rem; background: #1e293b; font-size: 10px;
    font-weight: 700; letter-spacing: 2px; color: var(--t3);
}
.fs-body { display: flex; min-height: 180px; }
.fs-side {
    width: 36px; background: #1e293b; border-right: 1px solid rgba(255,255,255,.05);
    padding: .5rem 0; display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.fs-dot { width: 18px; height: 18px; border-radius: 4px; background: rgba(255,255,255,.08); }
.fs-kanban { flex: 1; display: flex; padding: .5rem; gap: .4rem; }
.fs-col { flex: 1; background: rgba(255,255,255,.02); border-radius: 6px; padding: .35rem; display: flex; flex-direction: column; gap: .3rem; }
.fs-col-title { font-size: 8px; text-transform: uppercase; letter-spacing: 1px; color: var(--t3); text-align: center; padding-bottom: .2rem; border-bottom: 1px solid rgba(255,255,255,.05); }
.fs-card-item { height: 24px; background: rgba(255,255,255,.06); border-radius: 3px; }
.hl-card-item { background: rgba(139,92,246,.2); border-left: 2px solid var(--purple); }
.ok-card-item { background: rgba(16,185,129,.2); border-left: 2px solid var(--green); }

/* ===================================================================
   EXAMPLES (Slide 9)
   =================================================================== */
.ex-block { background: rgba(255,255,255,.02); border: 1px solid var(--border); border-radius: 8px; padding: .75rem; }
.ex-block h5 { font-size: clamp(12px, 1vw, 14px); color: var(--cyan); margin-bottom: .4rem; letter-spacing: .5px; }

/* ===================================================================
   AUTOMATION DIAGRAM (Slide 10)
   =================================================================== */
.auto-diagram {
    display: flex; align-items: center; justify-content: center; gap: 0;
    padding: 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
}
.auto-col { display: flex; flex-direction: column; gap: .5rem; }
.auto-box {
    padding: .4rem 1rem; border-radius: 8px; font-size: clamp(12px, 1vw, 14px);
    font-weight: 500; background: rgba(255,255,255,.05); border: 1px solid var(--border); text-align: center;
}
.auto-box.engine {
    background: var(--cyan); color: #000; font-weight: 700; font-size: clamp(14px, 1.3vw, 18px);
    padding: .6rem 1.5rem; border: none;
}
.auto-box.target-box { border-color: rgba(59,130,246,.3); background: rgba(59,130,246,.08); }
.auto-arrow-col { display: flex; align-items: center; justify-content: center; padding: 0 .75rem; }
.auto-arrow-line { width: 30px; height: 2px; background: rgba(255,255,255,.2); position: relative; }
.auto-arrow-line::after {
    content: ''; position: absolute; right: -3px; top: -3px;
    border-left: 5px solid rgba(255,255,255,.2); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.auto-center { display: flex; align-items: center; }

/* ===================================================================
   RULES BOX (Slide 11)
   =================================================================== */
.rules-box {
    background: rgba(239,68,68,.05); border: 1px solid rgba(239,68,68,.2);
    border-radius: 10px; padding: .75rem 1rem;
}
.rules-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.rules-row span {
    padding: .25rem .6rem; border-radius: 6px;
    background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.15);
    font-size: clamp(11px, .85vw, 13px); color: var(--red); font-weight: 500;
}

/* ===================================================================
   POST-SALE FLOW (Slide 13)
   =================================================================== */
.post-flow {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem;
}
.pf-step {
    padding: .5rem 1rem; border-radius: 99px;
    background: var(--bg-card); border: 1px solid var(--border);
    font-size: clamp(12px, 1vw, 14px); font-weight: 500;
}
.pf-arrow { color: var(--t3); font-size: 1rem; }
.init-pf { background: rgba(255,255,255,.08); }
.hl-pf { background: var(--grad); border: none; color: var(--white); font-weight: 600; }

/* ===================================================================
   EQUATION (Slide 15)
   =================================================================== */
.equation {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem;
    padding: 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
    width: 100%;
}
.eq-item { font-family: var(--ff); font-size: clamp(13px, 1.2vw, 17px); font-weight: 600; color: var(--t1); }
.hl-eq { color: var(--purple); }
.eq-op { color: var(--t3); font-size: 1.3rem; font-weight: 300; }
.eq-result {
    width: 100%; text-align: center;
    font-family: var(--ff); font-size: clamp(16px, 2vw, 26px);
    font-weight: 700; color: var(--cyan); margin-top: .5rem;
}

/* ===================================================================
   CTA (Slide 15)
   =================================================================== */
.cta-block {
    padding: 1.25rem 1.5rem; border-radius: 12px;
    background: rgba(139,92,246,.08); border: 1px solid var(--border-hl);
    width: 100%; max-width: 700px;
}
.cta-text { font-size: clamp(15px, 1.4vw, 20px); font-weight: 600; color: var(--white); }

/* ===================================================================
   CONTROLS — Fixed bottom bar
   =================================================================== */
.controls {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(2, 6, 23, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.progress-track { width: 100%; height: 3px; background: rgba(255,255,255,.08); }
.progress-fill { height: 100%; width: 0; background: var(--purple); transition: width .3s ease; }

.controls-bar {
    display: flex; align-items: center; justify-content: center; gap: 1.25rem;
    padding: .6rem 1.5rem;
    height: var(--controls-h);
}

.ctrl-btn {
    background: rgba(255,255,255,.08); border: none; color: var(--white);
    width: 44px; height: 44px; min-width: 44px; min-height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s;
    -webkit-tap-highlight-color: transparent;
}
.ctrl-btn:hover { background: rgba(255,255,255,.15); }
.ctrl-btn:disabled { opacity: .25; cursor: default; }

.counter {
    font-family: var(--ff); font-size: 1.1rem; font-weight: 600; letter-spacing: 2px; color: var(--t3);
    min-width: 60px; text-align: center;
    user-select: none;
}
.counter #cur { color: var(--white); }
.sep { margin: 0 2px; }

/* ===================================================================
   RESPONSIVE — Tablets (≤ 1024px)
   =================================================================== */
@media (max-width: 1024px) {
    .two-col { grid-template-columns: 1fr; gap: 1.5rem; }
    .tri-grid { grid-template-columns: 1fr; gap: 1rem; }
    .quad-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .split { grid-template-columns: 1fr; gap: 1rem; }

    .auto-diagram { flex-direction: column; gap: .75rem; }
    .auto-arrow-col { transform: rotate(90deg); padding: 0; }
    .auto-col { flex-direction: row; flex-wrap: wrap; justify-content: center; }
}

/* ===================================================================
   RESPONSIVE — Mobile (≤ 768px)
   =================================================================== */
@media (max-width: 768px) {
    :root {
        --controls-h: 52px;
    }

    .slide-inner {
        justify-content: flex-start;
        padding: calc(20px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(var(--controls-h) + 24px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
    }

    .slide--centered .slide-inner {
        justify-content: center;
    }

    .quad-grid { grid-template-columns: 1fr; gap: .75rem; }

    /* Cards */
    .q-card, .tri-card, .resp-card, .split-card { padding: 1rem; }

    /* Roadmap flow */
    .roadmap-flow { padding: .75rem; gap: .3rem; }
    .rm-step { padding: .3rem .5rem; font-size: 11px; }
    .rm-num { width: 16px; height: 16px; font-size: 8px; }
    .rm-arrow { font-size: .9rem; }

    /* Mockups */
    .lp-mock { max-width: 280px; }
    .fs-mock { max-width: 300px; }
    .fs-body { min-height: 140px; }

    /* Post-sale flow */
    .post-flow { flex-direction: column; align-items: stretch; gap: .3rem; }
    .pf-step { text-align: center; border-radius: 8px; }
    .pf-arrow { text-align: center; transform: rotate(90deg); font-size: .8rem; }

    /* Equation */
    .equation { gap: .4rem; padding: 1rem; }
    .eq-item { font-size: 13px; }
    .eq-result { font-size: 16px; }

    /* Controls bar */
    .controls-bar { padding: .4rem 1rem; gap: 1rem; }
    .ctrl-btn { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }

    /* Spacings */
    .mt-5 { margin-top: 1.5rem; }
    .mt-6 { margin-top: 2rem; }
}

/* ===================================================================
   RESPONSIVE — Small phones (≤ 400px)
   =================================================================== */
@media (max-width: 400px) {
    .title-xl { font-size: 26px; }
    .title-md { font-size: 20px; }

    .rm-step { padding: .25rem .4rem; font-size: 10px; }
    .rm-num { width: 14px; height: 14px; font-size: 7px; }

    .lp-mock { max-width: 240px; }
    .fs-mock { max-width: 260px; }
}

/* ===================================================================
   RESPONSIVE — Landscape mobile (low height)
   =================================================================== */
@media (max-height: 700px) and (orientation: landscape) {
    .slide-inner {
        justify-content: flex-start;
        padding-top: 1.5rem;
        padding-bottom: calc(var(--controls-h) + 16px + env(safe-area-inset-bottom));
    }

    .slide--centered .slide-inner {
        justify-content: center;
    }

    .title-xl { font-size: clamp(24px, 4vw, 40px); }
    .title-md { font-size: clamp(18px, 2.5vw, 28px); }

    .mt-5, .mt-6 { margin-top: 1rem; }

    .tri-grid { grid-template-columns: repeat(3, 1fr); gap: .75rem; }
    .quad-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
}
