/* ─────────────────────────────────────
   AUTOMATIZACIÓN DE PROCESOS (/automatizacion-de-procesos)
   Estilos propios de la página. Se carga después de ui.css.
   ───────────────────────────────────── */

/* ── Demo del hero: editor de flujos ──
   Como las otras pantallas de ejemplo (.adsboard, .chat-demo), usa
   colores fijos: representa la herramienta, no el sitio. Escala con
   unidades de contenedor para verse igual en 390 px y en escritorio. */
.flow-stage { padding-bottom: clamp(88px, 8vw, 104px); }

.flowboard {
    container-type: inline-size;
    width: min(100%, 440px);
    padding: clamp(14px, 4.2cqw, 20px);
    border-radius: 18px;
    background: #FFFFFF;
    color: #16141D;
    box-shadow: 0 0 0 1px rgba(16, 14, 24, 0.06), 0 40px 80px -40px rgba(14, 11, 23, 0.5);
    font-family: var(--font-body);
    line-height: 1.35;
    text-align: left;
}

.flowboard__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ECEAF1;
    font-size: clamp(11px, 3cqw, 12.5px);
}

.flowboard__app {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #F1E6FF;
    color: #7A00C7;
    font-weight: 600;
}

.flowboard__name {
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flowboard__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: #15803D;
    font-weight: 600;
    white-space: nowrap;
}

.flowboard__live::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.flowboard__steps {
    display: grid;
    gap: clamp(10px, 3.2cqw, 14px);
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.flowboard__step {
    --icon: clamp(30px, 8.6cqw, 36px);
    position: relative;
    display: grid;
    grid-template-columns: var(--icon) minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(8px, 2.6cqw, 12px);
    padding: clamp(8px, 2.4cqw, 10px);
    border: 1px solid #ECEAF1;
    border-radius: 10px;
    background: #FFFFFF;
}

/* Conector de 1 px entre un paso y el siguiente */
.flowboard__step + .flowboard__step::before {
    content: "";
    position: absolute;
    left: calc(clamp(8px, 2.4cqw, 10px) + var(--icon) / 2);
    bottom: 100%;
    width: 1px;
    height: clamp(11px, 3.2cqw, 15px);
    background: #D0CDDA;
}

.flowboard__step--trigger {
    border-color: #DCC2FF;
    background: #FAF6FF;
}

.flowboard__icon {
    display: grid;
    place-items: center;
    width: var(--icon);
    height: var(--icon);
    border-radius: 8px;
    background: #F3F1F7;
    color: #4F4D5C;
    font-size: clamp(15px, 4.4cqw, 18px);
}

.flowboard__icon--wa { background: #E7F8EE; color: #16A34A; }

.flowboard__text { display: grid; gap: 1px; min-width: 0; }

.flowboard__text small {
    color: #6B6878;
    font-family: var(--font-mono);
    font-size: clamp(9.5px, 2.6cqw, 11px);
    letter-spacing: 0.01em;
}

.flowboard__text b {
    font-size: clamp(12px, 3.5cqw, 14px);
    font-weight: 600;
}

.flowboard__time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6B6878;
    font-family: var(--font-mono);
    font-size: clamp(10px, 2.8cqw, 11.5px);
    white-space: nowrap;
}

.flowboard__time .i { color: #16A34A; font-size: 1.15em; }

.flowboard__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #ECEAF1;
    color: #4F4D5C;
    font-size: clamp(11px, 3cqw, 12.5px);
    font-weight: 600;
}

.flowboard__total { color: #6B6878; font-family: var(--font-mono); font-weight: 400; }

/* Tarjeta flotante: el informe que llega solo */
.demo-stage .flow-card { bottom: clamp(16px, 2vw, 26px); right: max(8px, calc(50% - 240px)); }

/* Los pasos se completan uno tras otro cuando el panel entra en pantalla
   (.reveal → .active, script.js); la tarjeta llega al final. */
@media (prefers-reduced-motion: no-preference) {
    .js .flowboard.reveal .flowboard__step { opacity: 0.25; transform: translateY(4px); }
    .js .flowboard.reveal .flowboard__time { opacity: 0; }
    .flowboard.reveal.active .flowboard__step { animation: flow-in 0.4s ease forwards; animation-delay: var(--d, 0s); }
    .flowboard.reveal.active .flowboard__time { animation: flow-in 0.3s ease forwards; animation-delay: calc(var(--d, 0s) + 0.35s); }
    .flowboard.reveal .flowboard__foot { opacity: 0; transition: opacity 0.4s ease 3.6s; }
    .flowboard.reveal.active .flowboard__foot { opacity: 1; }
    .js .flow-stage:has(.flowboard.reveal) .flow-card { opacity: 0; transform: translateY(6px); }
    .flow-stage:has(.flowboard.active) .flow-card { animation: flow-in 0.45s ease forwards; animation-delay: 4.1s; }
}

@keyframes flow-in { to { opacity: 1; transform: none; } }

@media (max-width: 599px) {
    .flow-stage { padding: 20px 12px 84px; }
    .demo-stage .flow-card { right: 12px; left: auto; bottom: 14px; max-width: calc(100% - 24px); }
}

/* ── 01 · Seis columnas en dos filas de tres (escritorio) ── */
@media (min-width: 1000px) {
    .cols--six .col:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
    .cols--six .col:nth-child(n + 4) { margin-top: 36px; border-top: 1px solid var(--line); }
}

/* ── 02 · Automatización o asistente ── */
.versus {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.versus__card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: clamp(24px, 3vw, 36px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-2);
}

.versus__tag {
    margin: 0;
    font: 500 0.75rem var(--font-mono);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-3);
}

.versus__card:first-child .versus__tag { color: var(--link); }

.versus__list {
    display: grid;
    gap: 10px;
    margin: 4px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    list-style: none;
    color: var(--text-2);
    font-size: 0.95rem;
    line-height: 1.5;
}

.versus__list li { display: flex; gap: 10px; }
.versus__list .i { margin-top: 0.2em; color: var(--link); }

.versus__eg {
    flex: 1;
    margin: 0;
    color: var(--text-2);
    font-size: 0.95rem;
    line-height: 1.55;
}

.versus__eg b { color: var(--text); font-weight: 600; }

@media (max-width: 767px) {
    .versus { grid-template-columns: minmax(0, 1fr); }
}
