/* QuantumBlox Floating Dock (qbd3)
   Port fiel del Aceternity FloatingDock a vanilla, tema morado.
   Especificacion: h-16 pill, items circulares (rounded-full),
   magnificacion de 40 a 80px segun distancia al cursor,
   tooltip oscuro arriba. */

/* Reserva espacio al pie de la pagina para que el contenido no quede
   tapado por el dock fijo. Dock = 64px + bottom inset. */
body {
    padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important;
}

.qbd3-wrap {
    position: fixed;
    /* Abajo: respetando safe-area de iOS y gesture bar */
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
    left: 0; right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    pointer-events: none;
    padding: 0 12px;
}
.qbd3 {
    pointer-events: auto;
    display: flex;
    align-items: end;
    gap: 12px;
    height: 64px;
    padding: 0 16px 10px;
    border-radius: 20px;
    background: rgba(15, 11, 23, 0.85);
    border: 1px solid rgba(168, 85, 247, 0.15);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
    max-width: calc(100vw - 24px);
}
.qbd3-item {
    position: relative;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: var(--qbd3-size, 40px);
    height: var(--qbd3-size, 40px);
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.12);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0;
    cursor: pointer;
    font-family: inherit;
    border: 0;
    padding: 0;
    margin-bottom: 4px;
    transition: width 140ms ease, height 140ms ease,
                background 200ms ease, color 200ms ease;
}
.qbd3-item:hover {
    background: rgba(168, 85, 247, 0.22);
    color: #fff;
}
.qbd3-item.is-active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.42), rgba(244, 63, 94, 0.28));
    color: #fff;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.45);
}
.qbd3-item.is-brand {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.45), rgba(244, 63, 94, 0.3));
    cursor: default;
}
/* Iconos: tamano interno escala suavemente con el item (50% del size). */
.qbd3-item img,
.qbd3-item i,
.qbd3-item svg {
    width: calc(var(--qbd3-size, 40px) * 0.5);
    height: calc(var(--qbd3-size, 40px) * 0.5);
    font-size: calc(var(--qbd3-size, 40px) * 0.45);
    line-height: 1;
    font-style: normal;
    display: block;
    object-fit: contain;
    max-width: none;
    max-height: none;
    min-width: 0;
    min-height: 0;
    pointer-events: none;
    transition: width 140ms ease, height 140ms ease, font-size 140ms ease;
}
.qbd3-item i {
    width: auto;
    height: auto;
}
.qbd3-item .qbd3-brand-logo {
    border-radius: 50%;
}
/* Tooltip arriba (estilo Aceternity: pill oscuro con texto blanco). */
.qbd3-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    padding: 5px 10px;
    background: rgba(28, 22, 38, 0.96);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 6px);
    transition: opacity 160ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.qbd3-item:hover .qbd3-tip {
    opacity: 1;
    transform: translate(-50%, 0);
}
/* Mobile: collapse */
.qbd3-burger {
    display: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.12);
    border: 0;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
    flex-shrink: 0;
}
.qbd3-burger span {
    display: block;
    width: 16px; height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.qbd3-burger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.qbd3-burger.active span:nth-child(2) { opacity: 0; }
.qbd3-burger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }
@media (max-width: 880px) {
    .qbd3-item:not(.is-brand) { display: none; }
    .qbd3-burger { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
    .qbd3-item, .qbd3-item img, .qbd3-item i,
    .qbd3-item svg, .qbd3-tip { transition: none; }
}
