/* ═══════════════════════════════════════════════════════════
   KAIZEN INSIGHTS EN VIVO — franja de tarjetas + burbuja emergente
   Datos curiosos generados por IA desde las publicaciones.
═══════════════════════════════════════════════════════════ */

/* ── Franja / sección ──────────────────────────────────── */
.kif-section {
    background: linear-gradient(180deg, #030d1e 0%, #061529 100%);
    padding: 3rem 0 3.25rem;
    overflow: hidden;
}
.kif-inner { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }

.kif-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.6rem;
    text-align: center;
    flex-wrap: wrap;
}
.kif-pulse {
    width: 9px; height: 9px; border-radius: 50%;
    background: #22c55e; flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
    animation: kifPulse 2s infinite;
}
@keyframes kifPulse {
    0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.kif-eyebrow {
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em;
    text-transform: uppercase; color: #d4af37;
}
.kif-eyebrow span { color: rgba(255,255,255,0.4); font-weight: 700; }

/* ── Grid de tarjetas ──────────────────────────────────── */
.kif-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (max-width: 900px) { .kif-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .kif-grid { grid-template-columns: 1fr; } }

.kif-card {
    position: relative;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 1.3rem 1.35rem 1.15rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease, opacity 0.5s ease;
    overflow: hidden;
}
.kif-card::before {
    content: '';
    position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--kif-accent, #d4af37), transparent);
    opacity: 0.75;
}
.kif-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212,175,55,0.35);
    background: rgba(255,255,255,0.06);
}
.kif-card.kif-swap { opacity: 0; transform: translateY(8px); }

.kif-type {
    display: inline-flex; align-items: center; gap: 6px;
    align-self: flex-start;
    font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--kif-accent, #d4af37);
    background: color-mix(in srgb, var(--kif-accent, #d4af37) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--kif-accent, #d4af37) 30%, transparent);
    border-radius: 20px; padding: 3px 9px;
    margin-bottom: 0.7rem;
}
.kif-text {
    font-size: 0.95rem; line-height: 1.5; color: rgba(255,255,255,0.9);
    margin: 0 0 0.9rem;
    flex-grow: 1;
}
.kif-cta {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem; font-weight: 700;
    color: var(--kif-accent, #d4af37);
    opacity: 0.85; transition: gap 0.2s ease, opacity 0.2s ease;
    margin-top: auto;
}
.kif-card:hover .kif-cta { opacity: 1; gap: 10px; }
.kif-cta.kif-cta--static { cursor: default; }

/* ── Burbuja emergente (abajo-izquierda) ───────────────── */
.kif-toast {
    position: fixed;
    left: 24px; bottom: 24px;
    width: 320px; max-width: calc(100vw - 48px);
    z-index: 1035; /* por debajo del orbe KAI (1040) y de los modales */
    background: linear-gradient(160deg, rgba(10,28,54,0.97) 0%, rgba(4,14,30,0.98) 100%);
    border: 1px solid rgba(212,175,55,0.22);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    padding: 1rem 1.1rem 1.05rem;
    transform: translateY(140%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.55s cubic-bezier(0.16,1,0.3,1), opacity 0.5s ease;
}
.kif-toast.kif-toast--show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.kif-toast-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 0.6rem;
}
.kif-toast-orb {
    width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
    background: radial-gradient(circle at 30% 30%, #e8cf7a, #b8952f);
    box-shadow: 0 0 12px rgba(212,175,55,0.5);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem;
}
.kif-toast-title {
    font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em;
    text-transform: uppercase; color: #d4af37; flex-grow: 1;
}
.kif-toast-close {
    background: rgba(255,255,255,0.06); border: none;
    color: rgba(255,255,255,0.55);
    width: 22px; height: 22px; border-radius: 50%;
    cursor: pointer; font-size: 0.8rem; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}
.kif-toast-close:hover { background: rgba(255,255,255,0.12); color: #fff; }
.kif-toast-type {
    display: inline-block;
    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--kif-accent, #d4af37);
    margin-bottom: 0.4rem;
}
.kif-toast-text {
    font-size: 0.9rem; line-height: 1.5; color: rgba(255,255,255,0.92);
    margin: 0 0 0.7rem;
}
.kif-toast-cta {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.76rem; font-weight: 700; text-decoration: none;
    color: var(--kif-accent, #d4af37);
    transition: gap 0.2s ease;
}
.kif-toast-cta:hover { gap: 10px; }

@media (max-width: 520px) {
    /* A ancho completo y con bottom:16px, el orbe de KAI (#kai-orb: right 30px,
       bottom 30px, 60x60, z-index superior) caia encima de su esquina inferior
       derecha. Se sube por encima del orbe (que termina a 90px del borde) y se
       compacta: ocupaba el 25% de la pantalla. */
    .kif-toast { left: 12px; right: 12px; bottom: 104px; width: auto; padding: .8rem .9rem .85rem; }
    .kif-toast-head { margin-bottom: .4rem; }
    .kif-toast-text { font-size: .84rem; line-height: 1.45; margin-bottom: .55rem; }
}
