/* ═══════════════════════════════════════════
   BUBBLE MENU  —  bubble-menu.css
═══════════════════════════════════════════ */

.bubble-menu {
  left: 0; right: 0; top: 2em;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 16px; padding: 0 2em;
  pointer-events: none; z-index: 99;
}
.bubble-menu.fixed  { position: fixed; }
.bubble-menu.absolute { position: absolute; }

.bubble-menu .bubble {
  --bubble-size: 48px;
  width: var(--bubble-size); height: var(--bubble-size);
  border-radius: 50%; background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  display: inline-flex; align-items: center; justify-content: center;
  pointer-events: auto;
}
.bubble-menu .logo-bubble,
.bubble-menu .toggle-bubble { will-change: transform; }

.bubble-menu .logo-bubble {
  width: auto; min-height: var(--bubble-size); height: var(--bubble-size);
  padding: 0 16px; border-radius: calc(var(--bubble-size) / 2); gap: 8px;
}
.bubble-menu .toggle-bubble { width: var(--bubble-size); height: var(--bubble-size); }

.bubble-menu .logo-content {
  display: inline-flex; align-items: center; justify-content: center;
  width: 140px; height: 100%; gap: 8px;
}
.bubble-menu .logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800; font-size: 14px; color: #0d0c1d;
  letter-spacing: -.3px; white-space: nowrap;
}
.bubble-menu .logo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, #B18CFF, #89AFFF);
  flex-shrink: 0;
}

.bubble-menu .menu-btn {
  border: none; background: #fff; cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 0;
}
.bubble-menu .menu-line {
  width: 22px; height: 2px; background: #111; border-radius: 2px;
  display: block; margin: 0 auto;
  transition: transform .3s ease, opacity .3s ease;
  transform-origin: center;
}
.bubble-menu .menu-line + .menu-line { margin-top: 6px; }
.bubble-menu .menu-btn.open .menu-line:first-child { transform: translateY(4px) rotate(45deg); }
.bubble-menu .menu-btn.open .menu-line:last-child  { transform: translateY(-4px) rotate(-45deg); }
.bubble-menu .menu-line.short { width: 16px; }

@media (min-width: 768px) {
  .bubble-menu .bubble { --bubble-size: 56px; }
  .bubble-menu .logo-bubble { padding: 0 18px; }
  .bubble-menu .logo-text { font-size: 15px; }
}

/* ── Overlay with pill links ── */
.bubble-menu-items {
  inset: 0; display: none;
  align-items: center; justify-content: center;
  pointer-events: none; z-index: 98;
}
.bubble-menu-items.fixed    { position: fixed; }
.bubble-menu-items.absolute { position: absolute; }
.bubble-menu-items.visible  { display: flex; }

.bubble-menu-items .pill-list {
  list-style: none; margin: 0; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 0; row-gap: 4px;
  width: 100%; max-width: 1400px;
  margin-left: auto; margin-right: auto;
  pointer-events: auto; justify-content: stretch;
}

.bubble-menu-items .pill-col {
  display: flex; justify-content: center; align-items: stretch;
  flex: 0 0 calc(100% / 3); box-sizing: border-box;
}
/* 4-item centering */
.bubble-menu-items .pill-col:nth-child(4):nth-last-child(2) { margin-left: calc(100% / 6); }
.bubble-menu-items .pill-col:nth-child(4):last-child        { margin-left: calc(100% / 3); }
/* 5-item layout  */
.bubble-menu-items .pill-col:nth-child(4):nth-last-child(2)  { margin-left: 0; }
.bubble-menu-items .pill-col:nth-child(5):last-child         { margin-left: 0; }

.bubble-menu-items .pill-link {
  --pill-bg: #ffffff;
  --pill-color: #111;
  --item-rot: 0deg;
  --pill-min-h: 140px;
  --hover-bg: #f3f4f6;
  --hover-color: #111;
  width: 100%; min-height: var(--pill-min-h);
  padding: clamp(1.2rem, 2.5vw, 6rem) 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 3.6rem);
  font-weight: 600; line-height: 0;
  border-radius: 999px; background: var(--pill-bg); color: var(--pill-color);
  text-decoration: none; box-shadow: 0 4px 20px rgba(0,0,0,.12);
  display: flex; align-items: center; justify-content: center;
  position: relative; transition: background .3s ease, color .3s ease, box-shadow .3s ease;
  will-change: transform; box-sizing: border-box;
  white-space: nowrap; overflow: hidden;
}
@media (min-width: 900px) {
  .bubble-menu-items .pill-link { transform: rotate(var(--item-rot)); }
  .bubble-menu-items .pill-link:hover {
    transform: rotate(var(--item-rot)) scale(1.05);
    background: var(--hover-bg); color: var(--hover-color);
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
  }
  .bubble-menu-items .pill-link:active { transform: rotate(var(--item-rot)) scale(0.95); }
}

.bubble-menu-items .pill-label {
  display: inline-block; will-change: transform, opacity;
  height: 1.2em; line-height: 1.2;
}

@media (max-width: 899px) {
  .bubble-menu-items { align-items: flex-start; padding-top: 110px; }
  .bubble-menu-items .pill-list { row-gap: 12px; }
  .bubble-menu-items .pill-col {
    flex: 0 0 100%; margin-left: 0 !important; overflow: visible;
  }
  .bubble-menu-items .pill-link {
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    padding: clamp(.9rem, 2vw, 2rem) 0; min-height: 72px;
  }
  .bubble-menu-items .pill-link:hover {
    transform: scale(1.04); background: var(--hover-bg); color: var(--hover-color);
  }
  .bubble-menu-items .pill-link:active { transform: scale(0.96); }
}

/* ── Logo image ── */
.bubble-menu .bubble-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.bubble-menu .logo-content {
  width: auto;
  min-width: 48px;
  gap: 0;
  justify-content: center;
}
