:root {
  --bg-blur: rgba(255, 255, 255, 0.7);
  --text-main: #1A202C;
  --text-muted: #4A5568;
  --brand-gradient: linear-gradient(135deg, #626FA6 0%, #4A5585 100%);
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Contenedor Principal (Fijo) ---------- */
.vb-tabs-menu-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding: 25px 0;
  pointer-events: none;
  transition: padding 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.vb-tabs-menu-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  z-index: -1;
  pointer-events: none;
}

/* ---------- El Menú (Cápsula) ---------- */
.vb-tabs-menu {
  display: flex;
  position: relative;
  background: var(--bg-blur);
  padding: 6px;
  border-radius: 100px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  pointer-events: auto;
  gap: 4px;
  transition: var(--transition-smooth);
  transform-origin: center top;
}

/* ---------- ESTADO COLAPSADO ---------- */
.vb-tabs-menu-wrapper.is-collapsed {
  padding: 10px 0;
}

.vb-tabs-menu-wrapper.is-collapsed .vb-tabs-menu {
  transform: scale(0.8);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.vb-tabs-menu-wrapper.is-collapsed .vb-tabs-menu:hover {
  transform: scale(0.85);
  background: white;
}

/* Indicador deslizante */
.nav-indicator {
  position: absolute;
  height: calc(100% - 12px);
  top: 6px;
  left: 6px;
  border-radius: 100px;
  background: var(--brand-gradient);
  box-shadow: 0 4px 15px rgba(98, 111, 166, 0.3);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 1;
}

/* Botones */
.vb-tab-btn {
  position: relative;
  z-index: 2;
  padding: 12px 26px;
  border-radius: 50px;
  font-family: 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.4s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.vb-tab-btn.active {
  color: #ffffff !important;
}

/* ---------- HAMBURGUESA (oculta en desktop) ---------- */
.vb-hamburger {
  display: none;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--bg-blur);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: var(--transition-smooth);
}

.vb-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

.vb-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.vb-hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.vb-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- MENÚ MÓVIL (dropdown) ---------- */
.vb-mobile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 240px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  padding: 8px;
  flex-direction: column;
  gap: 4px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.vb-mobile-dropdown.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.vb-mobile-dropdown .vb-tab-btn-mobile {
  display: block;
  padding: 14px 20px;
  border-radius: 14px;
  font-family: 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: var(--text-muted);
  transition: background 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.vb-mobile-dropdown .vb-tab-btn-mobile:hover {
  background: rgba(98, 111, 166, 0.08);
}

.vb-mobile-dropdown .vb-tab-btn-mobile.active {
  background: var(--brand-gradient);
  color: #ffffff !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 900px) {
  .vb-tab-btn { padding: 10px 18px; font-size: 14px; }
  .vb-tabs-menu { gap: 2px; }
}

/* Móvil: Hamburguesa */
@media (max-width: 640px) {
  .vb-tabs-menu-wrapper {
    justify-content: flex-end;
    padding: 16px 20px;
  }

  .vb-tabs-menu {
    display: none !important;
  }

  .vb-hamburger {
    display: flex;
  }

  .vb-mobile-dropdown {
    display: flex;
  }

  .vb-tabs-menu-wrapper.is-collapsed .vb-hamburger {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  }
}
